Skip to content

Commit b41f4e2

Browse files
committed
Expanding objectType prop
1 parent de4c691 commit b41f4e2

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

components/hubspot/actions/get-associated-emails/get-associated-emails.mjs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import {
2-
DEFAULT_EMAIL_PROPERTIES, OBJECT_TYPE, OBJECT_TYPES,
3-
} from "../../common/constants.mjs";
1+
import { DEFAULT_EMAIL_PROPERTIES } from "../../common/constants.mjs";
42
import hubspot from "../../hubspot.app.mjs";
53

64
export default {
@@ -12,14 +10,15 @@ export default {
1210
props: {
1311
hubspot,
1412
objectType: {
15-
type: "string",
13+
propDefinition: [
14+
hubspot,
15+
"objectType",
16+
() => ({
17+
includeCustom: true,
18+
}),
19+
],
1620
label: "Associated Object Type",
1721
description: "The type of the object the emails are associated with",
18-
options: OBJECT_TYPES.filter(({ value }) => [
19-
OBJECT_TYPE.CONTACT,
20-
OBJECT_TYPE.COMPANY,
21-
OBJECT_TYPE.DEAL,
22-
].includes(value)),
2322
},
2423
objectId: {
2524
type: "string",
@@ -70,7 +69,7 @@ export default {
7069
});
7170

7271
if (!results?.length > 0) {
73-
$.export("$summary", "No emails found");
72+
$.export("$summary", "No emails found with this association");
7473
return [];
7574
}
7675

0 commit comments

Comments
 (0)