@pipedream/connectwise_psa 0.2.2 → 0.3.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-company/create-company.mjs +1 -1
- package/actions/create-contact/create-contact.mjs +1 -1
- package/actions/create-ticket/create-ticket.mjs +1 -1
- package/actions/get-ticket/get-ticket.mjs +47 -0
- package/actions/list-reports/list-reports.mjs +71 -0
- package/actions/list-tickets/list-tickets.mjs +71 -0
- package/actions/list-time-entries/list-time-entries.mjs +73 -0
- package/connectwise_psa.app.mjs +38 -0
- package/package.json +2 -2
- package/sources/new-contact-created/new-contact-created.mjs +1 -1
- package/sources/new-project-created/new-project-created.mjs +1 -1
- package/sources/new-ticket-created/new-ticket-created.mjs +1 -1
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "connectwise_psa-create-company",
|
|
5
5
|
name: "Create Company",
|
|
6
6
|
description: "Creates a new company in Connectwise. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/REST#/Companies/postCompanyCompanies)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.4",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "connectwise_psa-create-contact",
|
|
6
6
|
name: "Create Contact",
|
|
7
7
|
description: "Creates a new contact in Connectwise. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/REST#/Contacts/postCompanyContacts)",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.3",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "connectwise_psa-create-ticket",
|
|
5
5
|
name: "Create Ticket",
|
|
6
6
|
description: "Creates a new ticket in Connectwise. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/REST#/Tickets/postServiceTickets)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.3",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import app from "../../connectwise_psa.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "connectwise_psa-get-ticket",
|
|
5
|
+
name: "Get Ticket",
|
|
6
|
+
description: "Retrieves details of a specific ticket. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/REST#/Tickets/getServiceTicketsById)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
app,
|
|
16
|
+
ticketId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
app,
|
|
19
|
+
"ticketId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
fields: {
|
|
23
|
+
type: "string",
|
|
24
|
+
label: "Fields",
|
|
25
|
+
description: "Comma-separated list of fields to return. E.g., `id,summary,status,company`",
|
|
26
|
+
optional: true,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
async run({ $ }) {
|
|
30
|
+
const {
|
|
31
|
+
app,
|
|
32
|
+
ticketId,
|
|
33
|
+
fields,
|
|
34
|
+
} = this;
|
|
35
|
+
|
|
36
|
+
const response = await app.getTicket({
|
|
37
|
+
$,
|
|
38
|
+
ticketId,
|
|
39
|
+
params: {
|
|
40
|
+
fields,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
$.export("$summary", `Successfully retrieved ticket with ID \`${ticketId}\``);
|
|
45
|
+
return response;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import app from "../../connectwise_psa.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "connectwise_psa-list-reports",
|
|
5
|
+
name: "List Reports",
|
|
6
|
+
description: "Retrieves a list of available reports. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/REST#/Reports/getSystemReports)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
app,
|
|
16
|
+
conditions: {
|
|
17
|
+
type: "string",
|
|
18
|
+
label: "Conditions",
|
|
19
|
+
description: "Conditions to filter the reports. E.g., `name contains \"Sales\"`. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/Developer_Guide) for more information.",
|
|
20
|
+
optional: true,
|
|
21
|
+
},
|
|
22
|
+
orderBy: {
|
|
23
|
+
type: "string",
|
|
24
|
+
label: "Order By",
|
|
25
|
+
description: "Field to order results by. E.g., `name asc` or `id desc`",
|
|
26
|
+
optional: true,
|
|
27
|
+
},
|
|
28
|
+
fields: {
|
|
29
|
+
type: "string",
|
|
30
|
+
label: "Fields",
|
|
31
|
+
description: "Comma-separated list of fields to return. E.g., `id,name,reportUrl`",
|
|
32
|
+
optional: true,
|
|
33
|
+
},
|
|
34
|
+
pageSize: {
|
|
35
|
+
type: "integer",
|
|
36
|
+
label: "Page Size",
|
|
37
|
+
description: "Number of results to return per page (max 1000)",
|
|
38
|
+
optional: true,
|
|
39
|
+
},
|
|
40
|
+
page: {
|
|
41
|
+
type: "integer",
|
|
42
|
+
label: "Page",
|
|
43
|
+
description: "Page number to retrieve (1-based)",
|
|
44
|
+
optional: true,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
async run({ $ }) {
|
|
48
|
+
const {
|
|
49
|
+
app,
|
|
50
|
+
conditions,
|
|
51
|
+
orderBy,
|
|
52
|
+
fields,
|
|
53
|
+
pageSize,
|
|
54
|
+
page,
|
|
55
|
+
} = this;
|
|
56
|
+
|
|
57
|
+
const response = await app.listReports({
|
|
58
|
+
$,
|
|
59
|
+
params: {
|
|
60
|
+
conditions,
|
|
61
|
+
orderBy,
|
|
62
|
+
fields,
|
|
63
|
+
pageSize,
|
|
64
|
+
page,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
$.export("$summary", `Successfully retrieved \`${response.length}\` report(s)`);
|
|
69
|
+
return response;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import app from "../../connectwise_psa.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "connectwise_psa-list-tickets",
|
|
5
|
+
name: "List Tickets",
|
|
6
|
+
description: "Retrieves a list of tickets. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/REST#/Tickets/getServiceTickets)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
app,
|
|
16
|
+
conditions: {
|
|
17
|
+
type: "string",
|
|
18
|
+
label: "Conditions",
|
|
19
|
+
description: "Conditions to filter the tickets. E.g., `summary contains \"issue\"` or `status/name=\"New\"`. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/Developer_Guide) for more information.",
|
|
20
|
+
optional: true,
|
|
21
|
+
},
|
|
22
|
+
orderBy: {
|
|
23
|
+
type: "string",
|
|
24
|
+
label: "Order By",
|
|
25
|
+
description: "Field to order results by. E.g., `id desc` or `summary asc`",
|
|
26
|
+
optional: true,
|
|
27
|
+
},
|
|
28
|
+
fields: {
|
|
29
|
+
type: "string",
|
|
30
|
+
label: "Fields",
|
|
31
|
+
description: "Comma-separated list of fields to return. E.g., `id,summary,status`",
|
|
32
|
+
optional: true,
|
|
33
|
+
},
|
|
34
|
+
pageSize: {
|
|
35
|
+
type: "integer",
|
|
36
|
+
label: "Page Size",
|
|
37
|
+
description: "Number of results to return per page (max 1000)",
|
|
38
|
+
optional: true,
|
|
39
|
+
},
|
|
40
|
+
page: {
|
|
41
|
+
type: "integer",
|
|
42
|
+
label: "Page",
|
|
43
|
+
description: "Page number to retrieve (1-based)",
|
|
44
|
+
optional: true,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
async run({ $ }) {
|
|
48
|
+
const {
|
|
49
|
+
app,
|
|
50
|
+
conditions,
|
|
51
|
+
orderBy,
|
|
52
|
+
fields,
|
|
53
|
+
pageSize,
|
|
54
|
+
page,
|
|
55
|
+
} = this;
|
|
56
|
+
|
|
57
|
+
const response = await app.listTickets({
|
|
58
|
+
$,
|
|
59
|
+
params: {
|
|
60
|
+
conditions,
|
|
61
|
+
orderBy,
|
|
62
|
+
fields,
|
|
63
|
+
pageSize,
|
|
64
|
+
page,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
$.export("$summary", `Successfully retrieved \`${response.length}\` ticket(s)`);
|
|
69
|
+
return response;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import app from "../../connectwise_psa.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "connectwise_psa-list-time-entries",
|
|
5
|
+
name: "List Time Entries",
|
|
6
|
+
description: "Retrieves a list of time entries. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/REST#/TimeEntries/getTimeEntries)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
app,
|
|
16
|
+
conditions: {
|
|
17
|
+
type: "string",
|
|
18
|
+
label: "Conditions",
|
|
19
|
+
description: "Conditions to filter the time entries. E.g., `member/identifier=\"username\"` or `chargeToId=123 AND chargeToType=\"ServiceTicket\"`. [See the documentation](https://developer.connectwise.com/Products/ConnectWise_PSA/Developer_Guide) for more information.",
|
|
20
|
+
optional: true,
|
|
21
|
+
},
|
|
22
|
+
orderBy: {
|
|
23
|
+
type: "string",
|
|
24
|
+
label: "Order By",
|
|
25
|
+
description: "Field to order results by. E.g., `id desc` or `timeStart asc`",
|
|
26
|
+
optional: true,
|
|
27
|
+
},
|
|
28
|
+
fields: {
|
|
29
|
+
type: "string",
|
|
30
|
+
label: "Fields",
|
|
31
|
+
description: "Comma-separated list of fields to return. E.g., `id,timeStart,timeEnd,member`",
|
|
32
|
+
optional: true,
|
|
33
|
+
},
|
|
34
|
+
pageSize: {
|
|
35
|
+
type: "integer",
|
|
36
|
+
label: "Page Size",
|
|
37
|
+
description: "Number of results to return per page (max 1000)",
|
|
38
|
+
optional: true,
|
|
39
|
+
},
|
|
40
|
+
page: {
|
|
41
|
+
type: "integer",
|
|
42
|
+
label: "Page",
|
|
43
|
+
description: "Page number to retrieve (1-based)",
|
|
44
|
+
optional: true,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
async run({ $ }) {
|
|
48
|
+
const {
|
|
49
|
+
app,
|
|
50
|
+
conditions,
|
|
51
|
+
orderBy,
|
|
52
|
+
fields,
|
|
53
|
+
pageSize,
|
|
54
|
+
page,
|
|
55
|
+
} = this;
|
|
56
|
+
|
|
57
|
+
const response = await app.listTimeEntries({
|
|
58
|
+
$,
|
|
59
|
+
params: {
|
|
60
|
+
conditions,
|
|
61
|
+
orderBy,
|
|
62
|
+
fields,
|
|
63
|
+
pageSize,
|
|
64
|
+
page,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
$.export("$summary", `Successfully retrieved \`${response.length}\` time entr${response.length === 1
|
|
69
|
+
? "y"
|
|
70
|
+
: "ies"}`);
|
|
71
|
+
return response;
|
|
72
|
+
},
|
|
73
|
+
};
|
package/connectwise_psa.app.mjs
CHANGED
|
@@ -208,6 +208,24 @@ export default {
|
|
|
208
208
|
})) || [];
|
|
209
209
|
},
|
|
210
210
|
},
|
|
211
|
+
ticketId: {
|
|
212
|
+
type: "string",
|
|
213
|
+
label: "Ticket ID",
|
|
214
|
+
description: "The ID of the ticket to retrieve",
|
|
215
|
+
async options({ page }) {
|
|
216
|
+
const tickets = await this.listTickets({
|
|
217
|
+
params: {
|
|
218
|
+
page: page + 1,
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
return tickets?.map(({
|
|
222
|
+
id: value, summary: label,
|
|
223
|
+
}) => ({
|
|
224
|
+
value,
|
|
225
|
+
label,
|
|
226
|
+
})) || [];
|
|
227
|
+
},
|
|
228
|
+
},
|
|
211
229
|
},
|
|
212
230
|
methods: {
|
|
213
231
|
_baseUrl() {
|
|
@@ -260,6 +278,26 @@ export default {
|
|
|
260
278
|
...opts,
|
|
261
279
|
});
|
|
262
280
|
},
|
|
281
|
+
getTicket({
|
|
282
|
+
ticketId, ...opts
|
|
283
|
+
}) {
|
|
284
|
+
return this._makeRequest({
|
|
285
|
+
path: `/service/tickets/${ticketId}`,
|
|
286
|
+
...opts,
|
|
287
|
+
});
|
|
288
|
+
},
|
|
289
|
+
listTimeEntries(opts = {}) {
|
|
290
|
+
return this._makeRequest({
|
|
291
|
+
path: "/time/entries",
|
|
292
|
+
...opts,
|
|
293
|
+
});
|
|
294
|
+
},
|
|
295
|
+
listReports(opts = {}) {
|
|
296
|
+
return this._makeRequest({
|
|
297
|
+
path: "/system/reports",
|
|
298
|
+
...opts,
|
|
299
|
+
});
|
|
300
|
+
},
|
|
263
301
|
listCompanyTypes(opts = {}) {
|
|
264
302
|
return this._makeRequest({
|
|
265
303
|
path: "/company/companies/types",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/connectwise_psa",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Pipedream Connectwise PSA Components",
|
|
5
5
|
"main": "connectwise_psa.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@pipedream/platform": "^2.0.
|
|
16
|
+
"@pipedream/platform": "^2.0.2"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "connectwise_psa-new-contact-created",
|
|
7
7
|
name: "New Contact Created",
|
|
8
8
|
description: "Emit new event when a new contact is created in Connectwise.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.4",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "connectwise_psa-new-project-created",
|
|
7
7
|
name: "New Project Created",
|
|
8
8
|
description: "Emit new event when a new project is created in Connectwise.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.4",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|