Skip to content

Commit 97c7644

Browse files
committed
Description improvements
1 parent 99f6ccf commit 97c7644

File tree

6 files changed

+26
-20
lines changed

6 files changed

+26
-20
lines changed

components/frontapp/actions/create-inbox/create-inbox.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ export default {
1414
description: "The name of the inbox",
1515
},
1616
teammateIds: {
17-
type: "string[]",
18-
label: "Teammate IDs",
19-
description: "An array of teammate IDs that should have access to the inbox. Alternatively, you can supply teammate emails as a resource alias.",
2017
propDefinition: [
2118
frontApp,
2219
"teammateId",
2320
],
21+
type: "string[]",
22+
label: "Teammate IDs",
23+
description: "One or more IDs of teammates that should have access to the inbox",
2424
optional: true,
2525
},
2626
},

components/frontapp/actions/create-message-template/create-message-template.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default {
2424
body: {
2525
type: "string",
2626
label: "Body",
27-
description: "Body of the message template. You can supply HTML with inline CSS to structure and style your template.",
27+
description: "Body of the message template. You can supply HTML with inline CSS to structure and style your template",
2828
},
2929
folderId: {
3030
propDefinition: [
@@ -36,7 +36,7 @@ export default {
3636
inboxIds: {
3737
type: "string[]",
3838
label: "Inbox IDs",
39-
description: "The specific inboxes this template is available in. If not specified, it will be available in all inboxes.",
39+
description: "The specific inboxes this template is available in. If not specified, it will be available in all inboxes",
4040
propDefinition: [
4141
frontApp,
4242
"inboxId",
@@ -64,7 +64,7 @@ export default {
6464
let data, headers = {};
6565

6666
// Handle attachments if provided
67-
if (attachments && attachments.length > 0) {
67+
if (attachments?.length > 0) {
6868
const formData = new FormData();
6969

7070
formData.append("name", name);

components/frontapp/actions/delete-message-template/delete-message-template.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
frontApp,
1414
"messageTemplateId",
1515
],
16-
description: "The message template ID",
16+
description: "ID of the message template to delete",
1717
},
1818
},
1919
async run({ $ }) {

components/frontapp/actions/import-message/import-message.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "frontapp-import-message",
66
name: "Import Message",
77
description: "Appends a new message into an inbox. [See the documentation](https://dev.frontapp.com/reference/import-inbox-message).",
8-
version: "0.1.7",
8+
version: "0.1.8",
99
type: "action",
1010
props: {
1111
frontApp,

components/frontapp/actions/list-message-templates/list-message-templates.mjs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ export default {
1111
sortBy: {
1212
type: "string",
1313
label: "Sort By",
14-
description: "Field used to sort the message templates.",
14+
description: "Field used to sort the message templates",
1515
options: [
1616
"created_at",
1717
"updated_at",
18-
"sort_order",
1918
],
2019
optional: true,
2120
},
@@ -24,8 +23,14 @@ export default {
2423
label: "Sort Order",
2524
description: "Order by which results should be sorted",
2625
options: [
27-
"asc",
28-
"desc",
26+
{
27+
label: "Ascending",
28+
value: "asc",
29+
},
30+
{
31+
label: "Descending",
32+
value: "desc",
33+
},
2934
],
3035
optional: true,
3136
},
@@ -37,18 +42,19 @@ export default {
3742
sortOrder,
3843
} = this;
3944

40-
const params = {};
41-
42-
if (sortBy) params.sort_by = sortBy;
43-
if (sortOrder) params.sort_order = sortOrder;
44-
4545
const response = await frontApp.listMessageTemplates({
46-
params,
4746
$,
47+
params: {
48+
sort_by: sortBy,
49+
sort_order: sortOrder,
50+
},
4851
});
4952

5053
const templates = response._results || [];
51-
$.export("$summary", `Successfully retrieved ${templates.length} message template(s)`);
54+
const length = templates.length;
55+
$.export("$summary", `Successfully retrieved ${length} message template${length === 1
56+
? ""
57+
: "s"}`);
5258

5359
return response;
5460
},

components/frontapp/actions/update-teammate/update-teammate.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
frontApp,
1414
"teammateId",
1515
],
16-
description: "The teammate ID. Alternatively, you can supply an email as a resource alias",
16+
description: "ID of the teammate to update",
1717
},
1818
username: {
1919
type: "string",

0 commit comments

Comments
 (0)