@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,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addNoteToChange = 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.addNoteToChange = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'add_note_to_change',
|
|
13
|
-
displayName: 'Add Note to Change',
|
|
14
|
-
description: 'Adds a private or public note to an existing change request.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Appends a note to an existing Freshservice change request identified by change id. The note can be private (agent-only, the default) or public. Use to record commentary or an update on a change. Not idempotent — each call appends another note.',
|
|
18
|
-
idempotent: false,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
change_id: props_1.freshserviceCommon.change(true),
|
|
22
|
-
body: pieces_framework_1.Property.LongText({
|
|
23
|
-
displayName: 'Note Content',
|
|
24
|
-
description: 'The content of the note. HTML is supported.',
|
|
25
|
-
required: true,
|
|
26
|
-
}),
|
|
27
|
-
private: pieces_framework_1.Property.Checkbox({
|
|
28
|
-
displayName: 'Private Note',
|
|
29
|
-
description: 'If checked, the note is only visible to agents. If unchecked, the requester can also see it.',
|
|
30
|
-
required: false,
|
|
31
|
-
defaultValue: true,
|
|
32
|
-
}),
|
|
33
|
-
},
|
|
34
|
-
run(context) {
|
|
35
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
var _a;
|
|
37
|
-
const response = yield (0, client_1.freshserviceApiCall)({
|
|
38
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
39
|
-
endpoint: `changes/${context.propsValue.change_id}/notes`,
|
|
40
|
-
auth: context.auth,
|
|
41
|
-
body: {
|
|
42
|
-
body: context.propsValue.body,
|
|
43
|
-
private: (_a = context.propsValue.private) !== null && _a !== void 0 ? _a : true,
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
return response.body.note;
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
//# sourceMappingURL=add-note-to-change.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-note-to-change.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-note-to-change.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,oBAAgB;IACtB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,8DAA8D;IAC3E,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,qPAAqP;QAClQ,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,0BAAkB,CAAC,MAAM,CAAC,IAAI,CAAC;QAC1C,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,8FAA8F;YAC3G,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAmB,EAAoC;gBAC5E,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,QAAQ,EAAE,WAAW,OAAO,CAAC,UAAU,CAAC,SAAS,QAAQ;gBACzD,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE;oBACJ,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;oBAC7B,OAAO,EAAE,MAAA,OAAO,CAAC,UAAU,CAAC,OAAO,mCAAI,IAAI;iBAC5C;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const addNoteToTicket: 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
|
-
body: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
13
|
-
private: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=add-note-to-ticket.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-note-to-ticket.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-note-to-ticket.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;;;;;;;;;EAqC1B,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addNoteToTicket = 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.addNoteToTicket = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'add_note_to_ticket',
|
|
13
|
-
displayName: 'Add Note to Ticket',
|
|
14
|
-
description: 'Adds a private or public note to an existing ticket.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Appends a note (conversation entry) to an existing Freshservice ticket identified by ticket id. The note can be private (agent-only, the default) or public (visible to the requester). Use to record an update or comment on a ticket. Not idempotent — each call appends another note.',
|
|
18
|
-
idempotent: false,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
ticket_id: props_1.freshserviceCommon.ticket(true),
|
|
22
|
-
body: pieces_framework_1.Property.LongText({
|
|
23
|
-
displayName: 'Note Content',
|
|
24
|
-
description: 'The content of the note. HTML is supported.',
|
|
25
|
-
required: true,
|
|
26
|
-
}),
|
|
27
|
-
private: pieces_framework_1.Property.Checkbox({
|
|
28
|
-
displayName: 'Private Note',
|
|
29
|
-
description: 'If checked, the note is only visible to agents. If unchecked, the requester can also see it.',
|
|
30
|
-
required: false,
|
|
31
|
-
defaultValue: true,
|
|
32
|
-
}),
|
|
33
|
-
},
|
|
34
|
-
run(context) {
|
|
35
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
var _a;
|
|
37
|
-
const response = yield (0, client_1.freshserviceApiCall)({
|
|
38
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
39
|
-
endpoint: `tickets/${context.propsValue.ticket_id}/notes`,
|
|
40
|
-
auth: context.auth,
|
|
41
|
-
body: {
|
|
42
|
-
body: context.propsValue.body,
|
|
43
|
-
private: (_a = context.propsValue.private) !== null && _a !== void 0 ? _a : true,
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
return response.body.conversation;
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
//# sourceMappingURL=add-note-to-ticket.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-note-to-ticket.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-note-to-ticket.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,oBAAgB;IACtB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,sDAAsD;IACnE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,0RAA0R;QACvS,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,0BAAkB,CAAC,MAAM,CAAC,IAAI,CAAC;QAC1C,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,8FAA8F;YAC3G,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAmB,EAA4C;gBACpF,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,QAAQ,EAAE,WAAW,OAAO,CAAC,UAAU,CAAC,SAAS,QAAQ;gBACzD,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE;oBACJ,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;oBAC7B,OAAO,EAAE,MAAA,OAAO,CAAC,UAAU,CAAC,OAAO,mCAAI,IAAI;iBAC5C;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC;QACpC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export declare const createChangeTask: 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
|
-
title: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
14
|
-
agent_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
|
-
group_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
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
29
|
-
due_date: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
30
|
-
notify_before: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
31
|
-
}>;
|
|
32
|
-
//# sourceMappingURL=create-change-task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-change-task.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-change-task.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6D3B,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createChangeTask = 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.createChangeTask = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'create_change_task',
|
|
13
|
-
displayName: 'Create Change Task',
|
|
14
|
-
description: 'Creates a new task on a change request in Freshservice.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Adds a task (sub-item of work) to an existing Freshservice change request identified by change id. Use to break a change into actionable steps; requires a title, with optional assignee, group, status, and due date. Not idempotent — each call creates a separate task.',
|
|
18
|
-
idempotent: false,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
change_id: props_1.freshserviceCommon.change(true),
|
|
22
|
-
title: pieces_framework_1.Property.ShortText({
|
|
23
|
-
displayName: 'Title',
|
|
24
|
-
description: 'The title of the task.',
|
|
25
|
-
required: true,
|
|
26
|
-
}),
|
|
27
|
-
description: pieces_framework_1.Property.LongText({
|
|
28
|
-
displayName: 'Description',
|
|
29
|
-
description: 'Description of the task.',
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
agent_id: props_1.freshserviceCommon.agent(false),
|
|
33
|
-
group_id: props_1.freshserviceCommon.group(false),
|
|
34
|
-
status: props_1.freshserviceCommon.taskStatus,
|
|
35
|
-
due_date: pieces_framework_1.Property.ShortText({
|
|
36
|
-
displayName: 'Due Date',
|
|
37
|
-
description: 'Task due date and time (ISO 8601, e.g. 2025-01-15T17:00:00Z).',
|
|
38
|
-
required: false,
|
|
39
|
-
}),
|
|
40
|
-
notify_before: pieces_framework_1.Property.Number({
|
|
41
|
-
displayName: 'Notify Before (seconds)',
|
|
42
|
-
description: 'Time in seconds before the due date to send a reminder notification.',
|
|
43
|
-
required: false,
|
|
44
|
-
}),
|
|
45
|
-
},
|
|
46
|
-
run(context) {
|
|
47
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const props = context.propsValue;
|
|
49
|
-
const body = {
|
|
50
|
-
title: props.title,
|
|
51
|
-
};
|
|
52
|
-
if (props.description)
|
|
53
|
-
body['description'] = props.description;
|
|
54
|
-
if (props.agent_id)
|
|
55
|
-
body['agent_id'] = props.agent_id;
|
|
56
|
-
if (props.group_id)
|
|
57
|
-
body['group_id'] = props.group_id;
|
|
58
|
-
if (props.status)
|
|
59
|
-
body['status'] = props.status;
|
|
60
|
-
if (props.due_date)
|
|
61
|
-
body['due_date'] = props.due_date;
|
|
62
|
-
if (props.notify_before !== null && props.notify_before !== undefined) {
|
|
63
|
-
body['notify_before'] = props.notify_before;
|
|
64
|
-
}
|
|
65
|
-
const response = yield (0, client_1.freshserviceApiCall)({
|
|
66
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
67
|
-
endpoint: `changes/${props.change_id}/tasks`,
|
|
68
|
-
auth: context.auth,
|
|
69
|
-
body,
|
|
70
|
-
});
|
|
71
|
-
return response.body.task;
|
|
72
|
-
});
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
//# sourceMappingURL=create-change-task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,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,CAAC;YAEjC,MAAM,IAAI,GAA4B;gBACpC,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB,CAAC;YAEF,IAAI,KAAK,CAAC,WAAW;gBAAE,IAAI,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC;YAC/D,IAAI,KAAK,CAAC,QAAQ;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;YACtD,IAAI,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,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAmB,EAAoC;gBAC5E,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,QAAQ,EAAE,WAAW,KAAK,CAAC,SAAS,QAAQ;gBAC5C,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,47 +0,0 @@
|
|
|
1
|
-
export declare const createChange: 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
|
-
subject: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
-
requester_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
7
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
9
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
10
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
12
|
-
}>>;
|
|
13
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
14
|
-
agent_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
|
-
group_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
|
-
department_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
|
-
priority: import("@activepieces/pieces-framework").StaticDropdownProperty<number, true>;
|
|
36
|
-
impact: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
37
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
38
|
-
risk: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
39
|
-
change_type: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
40
|
-
planned_start_date: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
41
|
-
planned_end_date: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
42
|
-
category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
43
|
-
sub_category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
44
|
-
item_category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
45
|
-
custom_fields: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
46
|
-
}>;
|
|
47
|
-
//# sourceMappingURL=create-change.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-change.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-change.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8FvB,CAAC"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createChange = 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.createChange = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'create_change',
|
|
13
|
-
displayName: 'Create Change',
|
|
14
|
-
description: 'Creates a new change request in Freshservice.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Opens a new change request (change management record) in Freshservice. Use to propose an IT change for planning, approval, and tracking; requires a subject and the requester id, with optional risk, impact, change type, status, and planned start/end dates. Not idempotent — each call creates a separate change.',
|
|
18
|
-
idempotent: false,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
subject: pieces_framework_1.Property.ShortText({
|
|
22
|
-
displayName: 'Subject',
|
|
23
|
-
description: 'The subject of the change.',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
requester_id: props_1.freshserviceCommon.requester(true),
|
|
27
|
-
description: pieces_framework_1.Property.LongText({
|
|
28
|
-
displayName: 'Description',
|
|
29
|
-
description: 'HTML content describing the change.',
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
agent_id: props_1.freshserviceCommon.agent(false),
|
|
33
|
-
group_id: props_1.freshserviceCommon.group(false),
|
|
34
|
-
department_id: props_1.freshserviceCommon.department(false),
|
|
35
|
-
priority: props_1.freshserviceCommon.priority,
|
|
36
|
-
impact: props_1.freshserviceCommon.impact,
|
|
37
|
-
status: props_1.freshserviceCommon.changeStatus,
|
|
38
|
-
risk: props_1.freshserviceCommon.changeRisk,
|
|
39
|
-
change_type: props_1.freshserviceCommon.changeType,
|
|
40
|
-
planned_start_date: pieces_framework_1.Property.ShortText({
|
|
41
|
-
displayName: 'Planned Start Date',
|
|
42
|
-
description: 'Planned start date and time (ISO 8601, e.g. 2025-01-15T09:00:00Z).',
|
|
43
|
-
required: false,
|
|
44
|
-
}),
|
|
45
|
-
planned_end_date: pieces_framework_1.Property.ShortText({
|
|
46
|
-
displayName: 'Planned End Date',
|
|
47
|
-
description: 'Planned end date and time (ISO 8601, e.g. 2025-01-15T17:00:00Z).',
|
|
48
|
-
required: false,
|
|
49
|
-
}),
|
|
50
|
-
category: pieces_framework_1.Property.ShortText({
|
|
51
|
-
displayName: 'Category',
|
|
52
|
-
description: 'Category of the change.',
|
|
53
|
-
required: false,
|
|
54
|
-
}),
|
|
55
|
-
sub_category: pieces_framework_1.Property.ShortText({
|
|
56
|
-
displayName: 'Sub Category',
|
|
57
|
-
description: 'Sub-category of the change.',
|
|
58
|
-
required: false,
|
|
59
|
-
}),
|
|
60
|
-
item_category: pieces_framework_1.Property.ShortText({
|
|
61
|
-
displayName: 'Item Category',
|
|
62
|
-
description: 'Item category of the change.',
|
|
63
|
-
required: false,
|
|
64
|
-
}),
|
|
65
|
-
custom_fields: pieces_framework_1.Property.Json({
|
|
66
|
-
displayName: 'Custom Fields',
|
|
67
|
-
description: 'A JSON object of custom field names and values.',
|
|
68
|
-
required: false,
|
|
69
|
-
}),
|
|
70
|
-
},
|
|
71
|
-
run(context) {
|
|
72
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
const props = context.propsValue;
|
|
74
|
-
const body = {
|
|
75
|
-
subject: props.subject,
|
|
76
|
-
requester_id: props.requester_id,
|
|
77
|
-
};
|
|
78
|
-
if (props.description)
|
|
79
|
-
body['description'] = props.description;
|
|
80
|
-
if (props.agent_id)
|
|
81
|
-
body['agent_id'] = props.agent_id;
|
|
82
|
-
if (props.group_id)
|
|
83
|
-
body['group_id'] = props.group_id;
|
|
84
|
-
if (props.department_id)
|
|
85
|
-
body['department_id'] = props.department_id;
|
|
86
|
-
if (props.priority)
|
|
87
|
-
body['priority'] = props.priority;
|
|
88
|
-
if (props.impact)
|
|
89
|
-
body['impact'] = props.impact;
|
|
90
|
-
if (props.status)
|
|
91
|
-
body['status'] = props.status;
|
|
92
|
-
if (props.risk)
|
|
93
|
-
body['risk'] = props.risk;
|
|
94
|
-
if (props.change_type)
|
|
95
|
-
body['change_type'] = props.change_type;
|
|
96
|
-
if (props.planned_start_date)
|
|
97
|
-
body['planned_start_date'] = props.planned_start_date;
|
|
98
|
-
if (props.planned_end_date)
|
|
99
|
-
body['planned_end_date'] = props.planned_end_date;
|
|
100
|
-
if (props.category)
|
|
101
|
-
body['category'] = props.category;
|
|
102
|
-
if (props.sub_category)
|
|
103
|
-
body['sub_category'] = props.sub_category;
|
|
104
|
-
if (props.item_category)
|
|
105
|
-
body['item_category'] = props.item_category;
|
|
106
|
-
if (props.custom_fields)
|
|
107
|
-
body['custom_fields'] = props.custom_fields;
|
|
108
|
-
const response = yield (0, client_1.freshserviceApiCall)({
|
|
109
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
110
|
-
endpoint: 'changes',
|
|
111
|
-
auth: context.auth,
|
|
112
|
-
body,
|
|
113
|
-
});
|
|
114
|
-
return response.body.change;
|
|
115
|
-
});
|
|
116
|
-
},
|
|
117
|
-
});
|
|
118
|
-
//# sourceMappingURL=create-change.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-change.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-change.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+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,W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,MAAM,CAAC;YAChD,IAAI,KAAK,CAAC,IAAI;gBAAE,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;YAC1C,IAAI,KAAK,CAAC,WAAW;gBAAE,IAAI,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC;YAC/D,IAAI,KAAK,CAAC,kBAAkB;gBAAE,IAAI,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,kBAAkB,CAAC;YACpF,IAAI,KAAK,CAAC,gBAAgB;gBAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC;YAC9E,IAAI,KAAK,CAAC,QAAQ;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;YACtD,IAAI,KAAK,CAAC,YAAY;gBAAE,IAAI,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;YAClE,IAAI,KAAK,CAAC,aAAa;gBAAE,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;YACrE,IAAI,KAAK,CAAC,aAAa;gBAAE,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;YAErE,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;aACL,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAC9B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const createRequester: 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
|
-
first_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
-
primary_email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
last_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
job_title: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
mobile_phone_number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
-
department_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
12
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
14
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
15
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
16
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
17
|
-
}>>;
|
|
18
|
-
custom_fields: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
19
|
-
}>;
|
|
20
|
-
//# sourceMappingURL=create-requester.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-requester.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-requester.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;EA2E1B,CAAC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRequester = 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.createRequester = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'create_requester',
|
|
13
|
-
displayName: 'Create Requester',
|
|
14
|
-
description: 'Creates a new requester (end user) in Freshservice.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Creates a new requester (end-user) record in Freshservice. Use to onboard a person who will submit tickets; requires a first name and primary email. Not idempotent — each call creates a new requester and will fail if the email already belongs to an existing requester.',
|
|
18
|
-
idempotent: false,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
first_name: pieces_framework_1.Property.ShortText({
|
|
22
|
-
displayName: 'First Name',
|
|
23
|
-
description: 'The first name of the requester.',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
primary_email: pieces_framework_1.Property.ShortText({
|
|
27
|
-
displayName: 'Email',
|
|
28
|
-
description: 'The primary email address of the requester.',
|
|
29
|
-
required: true,
|
|
30
|
-
}),
|
|
31
|
-
last_name: pieces_framework_1.Property.ShortText({
|
|
32
|
-
displayName: 'Last Name',
|
|
33
|
-
description: 'The last name of the requester.',
|
|
34
|
-
required: false,
|
|
35
|
-
}),
|
|
36
|
-
job_title: pieces_framework_1.Property.ShortText({
|
|
37
|
-
displayName: 'Job Title',
|
|
38
|
-
description: 'The job title of the requester.',
|
|
39
|
-
required: false,
|
|
40
|
-
}),
|
|
41
|
-
phone: pieces_framework_1.Property.ShortText({
|
|
42
|
-
displayName: 'Work Phone',
|
|
43
|
-
description: 'The work phone number of the requester.',
|
|
44
|
-
required: false,
|
|
45
|
-
}),
|
|
46
|
-
mobile_phone_number: pieces_framework_1.Property.ShortText({
|
|
47
|
-
displayName: 'Mobile Phone',
|
|
48
|
-
description: 'The mobile phone number of the requester.',
|
|
49
|
-
required: false,
|
|
50
|
-
}),
|
|
51
|
-
department_id: props_1.freshserviceCommon.department(false),
|
|
52
|
-
custom_fields: pieces_framework_1.Property.Json({
|
|
53
|
-
displayName: 'Custom Fields',
|
|
54
|
-
description: 'A JSON object of custom field names and values.',
|
|
55
|
-
required: false,
|
|
56
|
-
}),
|
|
57
|
-
},
|
|
58
|
-
run(context) {
|
|
59
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
const props = context.propsValue;
|
|
61
|
-
const requesterBody = {
|
|
62
|
-
first_name: props.first_name,
|
|
63
|
-
primary_email: props.primary_email,
|
|
64
|
-
};
|
|
65
|
-
if (props.last_name)
|
|
66
|
-
requesterBody['last_name'] = props.last_name;
|
|
67
|
-
if (props.job_title)
|
|
68
|
-
requesterBody['job_title'] = props.job_title;
|
|
69
|
-
if (props.phone)
|
|
70
|
-
requesterBody['phone'] = props.phone;
|
|
71
|
-
if (props.mobile_phone_number)
|
|
72
|
-
requesterBody['mobile_phone_number'] = props.mobile_phone_number;
|
|
73
|
-
if (props.department_id)
|
|
74
|
-
requesterBody['department_ids'] = [props.department_id];
|
|
75
|
-
if (props.custom_fields)
|
|
76
|
-
requesterBody['custom_fields'] = props.custom_fields;
|
|
77
|
-
const response = yield (0, client_1.freshserviceApiCall)({
|
|
78
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
79
|
-
endpoint: 'requesters',
|
|
80
|
-
auth: context.auth,
|
|
81
|
-
body: requesterBody,
|
|
82
|
-
});
|
|
83
|
-
return response.body.requester;
|
|
84
|
-
});
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
//# sourceMappingURL=create-requester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-requester.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-requester.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,eAAe,GAAG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C;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC;YAEjC,MAAM,aAAa,GAA4B;gBAC7C,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,aAAa,EAAE,KAAK,CAAC,aAAa;aACnC,CAAC;YAEF,IAAI,KAAK,CAAC,SAAS;gBAAE,aAAa,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;YAClE,IAAI,KAAK,CAAC,SAAS;gBAAE,aAAa,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;YAClE,IAAI,KAAK,CAAC,KAAK;gBAAE,aAAa,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;YACtD,IAAI,KAAK,CAAC,mBAAmB;gBAC3B,aAAa,CAAC,qBAAqB,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC;YACnE,IAAI,KAAK,CAAC,aAAa;gBACrB,aAAa,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;YAC1D,IAAI,KAAK,CAAC,aAAa;gBACrB,aAAa,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;YAEvD,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAmB,EAAyC;gBACjF,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,QAAQ,EAAE,YAAY;gBACtB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE,aAAa;aACpB,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;QACjC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare const createTicket: 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
|
-
subject: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
7
|
-
requester_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
8
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
10
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
11
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
12
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
13
|
-
}>>;
|
|
14
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<number, true>;
|
|
15
|
-
priority: import("@activepieces/pieces-framework").StaticDropdownProperty<number, true>;
|
|
16
|
-
source: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
17
|
-
urgency: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
18
|
-
impact: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
19
|
-
type: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
20
|
-
responder_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
21
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
22
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
23
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
24
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
25
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
26
|
-
}>>;
|
|
27
|
-
department_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
28
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
29
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
30
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
31
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
32
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
33
|
-
}>>;
|
|
34
|
-
group_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
35
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
36
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
37
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
38
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
39
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
40
|
-
}>>;
|
|
41
|
-
category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
42
|
-
sub_category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
43
|
-
tags: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
44
|
-
custom_fields: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
45
|
-
}>;
|
|
46
|
-
//# sourceMappingURL=create-ticket.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-ticket.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-ticket.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwFvB,CAAC"}
|