Skip to content

Commit 796dae1

Browse files
committed
Minor adjustments
1 parent cce4029 commit 796dae1

File tree

2 files changed

+51
-10
lines changed

2 files changed

+51
-10
lines changed

components/airtable_oauth/sources/common/constants.mjs

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@ const FROM_SOURCES = [
3434
},
3535
{
3636
value: "formPageSubmission",
37-
label: "Changes generated when an interface form builder page, form layout page, or record creation button page is submitted",
37+
label:
38+
"Changes generated when an interface form builder page, form layout page, or record creation button page is submitted",
3839
},
3940
{
4041
value: "automation",
4142
label: "Changes generated through an automation action",
4243
},
4344
{
4445
value: "system",
45-
label: "Changes generated by system events, such as processing time function formulas",
46+
label:
47+
"Changes generated by system events, such as processing time function formulas",
4648
},
4749
{
4850
value: "sync",
@@ -58,8 +60,46 @@ const FROM_SOURCES = [
5860
},
5961
];
6062

63+
const FIELD_TYPES = [
64+
"singleLineText",
65+
"email",
66+
"url",
67+
"multilineText",
68+
"number",
69+
"percent",
70+
"currency",
71+
"singleSelect",
72+
"multipleSelects",
73+
"singleCollaborator",
74+
"multipleCollaborators",
75+
"multipleRecordLinks",
76+
"date",
77+
"dateTime",
78+
"phoneNumber",
79+
"multipleAttachments",
80+
"checkbox",
81+
"formula",
82+
"createdTime",
83+
"rollup",
84+
"count",
85+
"lookup",
86+
"multipleLookupValues",
87+
"autoNumber",
88+
"barcode",
89+
"rating",
90+
"richText",
91+
"duration",
92+
"lastModifiedTime",
93+
"button",
94+
"createdBy",
95+
"lastModifiedBy",
96+
"externalSyncSource",
97+
"aiText",
98+
];
99+
61100
export default {
62101
DATA_TYPES,
63102
CHANGE_TYPES,
64103
FROM_SOURCES,
104+
FIELD_TYPES,
65105
};

components/airtable_oauth/sources/new-field/new-field.mjs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import common from "../common/common.mjs";
22

33
export default {
4-
name: "New Field",
5-
description: "Emit new event for each new field created in a table",
4+
name: "New Field Created",
5+
description: "Emit new event for each new field created in a table. [See the documentation](https://airtable.com/developers/web/api/get-base-schema)",
66
key: "airtable_oauth-new-field",
7-
version: "0.0.6",
7+
version: "0.0.7",
88
type: "source",
99
props: {
1010
...common.props,
@@ -16,7 +16,7 @@ export default {
1616
baseId,
1717
}),
1818
],
19-
description: "The table ID to watch for changes.",
19+
description: "Select a table to watch for new fields, or provide a table ID.",
2020
},
2121
},
2222
methods: {
@@ -36,13 +36,14 @@ export default {
3636
const { fields } = tables.find(({ id }) => id === this.tableId);
3737

3838
for (const field of fields) {
39-
if (fieldIds.includes(field.id)) {
39+
const { id } = field;
40+
if (fieldIds.includes(id)) {
4041
continue;
4142
}
42-
fieldIds.push(field.id);
43+
fieldIds.push(id);
4344
this.$emit(field, {
44-
id: field.id,
45-
summary: field.name,
45+
id,
46+
summary: `New field: '${field.name}'`,
4647
ts: Date.now(),
4748
});
4849
}

0 commit comments

Comments
 (0)