@pipedream/topdesk 0.0.1 → 0.2.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/actions/create-incident/create-incident.mjs +415 -0
- package/actions/get-incident/get-incident.mjs +39 -0
- package/actions/get-incidents/get-incidents.mjs +87 -0
- package/actions/get-knowledge-item-statuses/get-knowledge-item-statuses.mjs +42 -0
- package/actions/get-knowledge-items/get-knowledge-items.mjs +124 -0
- package/actions/update-incident/update-incident.mjs +442 -0
- package/package.json +4 -1
- package/sources/common/base-polling.mjs +99 -0
- package/sources/incident-updated/incident-updated.mjs +28 -0
- package/sources/new-incident-assignee/new-incident-assignee.mjs +52 -0
- package/sources/new-incident-created/new-incident-created.mjs +30 -0
- package/sources/new-incident-group-assigned/new-incident-group-assigned.mjs +52 -0
- package/sources/new-incident-memo-reply/new-incident-memo-reply.mjs +52 -0
- package/sources/new-incident-reply/new-incident-reply.mjs +52 -0
- package/sources/new-incident-status/new-incident-status.mjs +52 -0
- package/topdesk.app.mjs +709 -5
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import common from "../common/base-polling.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "topdesk-new-incident-memo-reply",
|
|
6
|
+
name: "New Incident Memo Reply",
|
|
7
|
+
description: "Emit new event when a new memo reply is created. [See the documentation](https://developers.topdesk.com/explorer/?page=incident#/progress%20trail%20%2F%20actions%20%2F%20requests/get_incidents_id__id__progresstrail)",
|
|
8
|
+
version: "0.0.1",
|
|
9
|
+
type: "source",
|
|
10
|
+
dedupe: "unique",
|
|
11
|
+
props: {
|
|
12
|
+
...common.props,
|
|
13
|
+
incidentId: {
|
|
14
|
+
propDefinition: [
|
|
15
|
+
common.props.topdesk,
|
|
16
|
+
"incidentId",
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
methods: {
|
|
21
|
+
...common.methods,
|
|
22
|
+
getResourceFn() {
|
|
23
|
+
return this.topdesk.listProgressTrail;
|
|
24
|
+
},
|
|
25
|
+
getArgs() {
|
|
26
|
+
return {
|
|
27
|
+
incidentId: this.incidentId,
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
getTsField() {
|
|
31
|
+
return "creationDate";
|
|
32
|
+
},
|
|
33
|
+
paginateResults() {
|
|
34
|
+
return true;
|
|
35
|
+
},
|
|
36
|
+
isRelevant(item) {
|
|
37
|
+
const previousValue = this._getPreviousValue();
|
|
38
|
+
if (item.memoText !== previousValue) {
|
|
39
|
+
this._setPreviousValue(item.memoText);
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
},
|
|
44
|
+
generateMeta(item) {
|
|
45
|
+
return {
|
|
46
|
+
id: item.id,
|
|
47
|
+
summary: `New Incident Memo Reply: ${item.memoText}`,
|
|
48
|
+
ts: Date.parse(item.creationDate),
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import common from "../common/base-polling.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "topdesk-new-incident-reply",
|
|
6
|
+
name: "New Incident Reply",
|
|
7
|
+
description: "Emit new event when a new incident reply is created. [See the documentation](https://developers.topdesk.com/explorer/?page=incident#/progress%20trail%20%2F%20actions%20%2F%20requests/get_incidents_id__id__progresstrail)",
|
|
8
|
+
version: "0.0.1",
|
|
9
|
+
type: "source",
|
|
10
|
+
dedupe: "unique",
|
|
11
|
+
props: {
|
|
12
|
+
...common.props,
|
|
13
|
+
incidentId: {
|
|
14
|
+
propDefinition: [
|
|
15
|
+
common.props.topdesk,
|
|
16
|
+
"incidentId",
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
methods: {
|
|
21
|
+
...common.methods,
|
|
22
|
+
getResourceFn() {
|
|
23
|
+
return this.topdesk.listProgressTrail;
|
|
24
|
+
},
|
|
25
|
+
getArgs() {
|
|
26
|
+
return {
|
|
27
|
+
incidentId: this.incidentId,
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
getTsField() {
|
|
31
|
+
return "creationDate";
|
|
32
|
+
},
|
|
33
|
+
paginateResults() {
|
|
34
|
+
return true;
|
|
35
|
+
},
|
|
36
|
+
isRelevant(item) {
|
|
37
|
+
const previousValue = this._getPreviousValue();
|
|
38
|
+
if (item.plainText !== previousValue) {
|
|
39
|
+
this._setPreviousValue(item.plainText);
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
},
|
|
44
|
+
generateMeta(item) {
|
|
45
|
+
return {
|
|
46
|
+
id: item.id,
|
|
47
|
+
summary: `New Incident Reply: ${item.plainText}`,
|
|
48
|
+
ts: Date.parse(item.creationDate),
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import common from "../common/base-polling.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "topdesk-new-incident-status",
|
|
6
|
+
name: "New Incident Status",
|
|
7
|
+
description: "Emit new event when an incident status is updated. [See the documentation](https://developers.topdesk.com/explorer/?page=incident#/incident/get_incidents_id__id_)",
|
|
8
|
+
version: "0.0.1",
|
|
9
|
+
type: "source",
|
|
10
|
+
dedupe: "unique",
|
|
11
|
+
props: {
|
|
12
|
+
...common.props,
|
|
13
|
+
incidentId: {
|
|
14
|
+
propDefinition: [
|
|
15
|
+
common.props.topdesk,
|
|
16
|
+
"incidentId",
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
methods: {
|
|
21
|
+
...common.methods,
|
|
22
|
+
getResourceFn() {
|
|
23
|
+
return this.topdesk.getIncident;
|
|
24
|
+
},
|
|
25
|
+
getArgs() {
|
|
26
|
+
return {
|
|
27
|
+
incidentId: this.incidentId,
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
getTsField() {
|
|
31
|
+
return "modificationDate";
|
|
32
|
+
},
|
|
33
|
+
paginateResults() {
|
|
34
|
+
return false;
|
|
35
|
+
},
|
|
36
|
+
isRelevant(incident) {
|
|
37
|
+
const previousValue = this._getPreviousValue();
|
|
38
|
+
if (incident.processingStatus?.id !== previousValue) {
|
|
39
|
+
this._setPreviousValue(incident.processingStatus?.id);
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
},
|
|
44
|
+
generateMeta(incident) {
|
|
45
|
+
return {
|
|
46
|
+
id: incident.id,
|
|
47
|
+
summary: `New Incident Status: ${incident.processingStatus?.name || `ID: ${incident.processingStatus?.id}`}`,
|
|
48
|
+
ts: Date.parse(incident.modificationDate),
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|