diff --git a/components/airtable_oauth/actions/create-comment/create-comment.mjs b/components/airtable_oauth/actions/create-comment/create-comment.mjs index 63e8bc27c0c7e..80f14c7f892fe 100644 --- a/components/airtable_oauth/actions/create-comment/create-comment.mjs +++ b/components/airtable_oauth/actions/create-comment/create-comment.mjs @@ -4,7 +4,7 @@ export default { key: "airtable_oauth-create-comment", name: "Create Comment", description: "Create a comment on a selected record. [See the documentation](https://airtable.com/developers/web/api/create-comment)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-field/create-field.mjs b/components/airtable_oauth/actions/create-field/create-field.mjs index 870e87ff4f5ee..fb07fda769029 100644 --- a/components/airtable_oauth/actions/create-field/create-field.mjs +++ b/components/airtable_oauth/actions/create-field/create-field.mjs @@ -5,7 +5,7 @@ export default { key: "airtable_oauth-create-field", name: "Create Field", description: "Create a new field in a table. [See the documentation](https://airtable.com/developers/web/api/create-field)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs b/components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs index ae42ef3634a6e..9a149aac777d9 100644 --- a/components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs +++ b/components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs @@ -9,7 +9,7 @@ export default { key: "airtable_oauth-create-multiple-records", name: "Create Multiple Records", description: "Create one or more records in a table in a single operation with an array. [See the documentation](https://airtable.com/developers/web/api/create-records)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs b/components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs index fd6862653af4c..40dc9e7990aa6 100644 --- a/components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs +++ b/components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-create-or-update-record", name: "Create or Update Record", description: "Create a new record or update an existing one. [See the documentation](https://airtable.com/developers/web/api/create-records)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-single-record/create-single-record.mjs b/components/airtable_oauth/actions/create-single-record/create-single-record.mjs index 49466af77a122..de7a22c58394a 100644 --- a/components/airtable_oauth/actions/create-single-record/create-single-record.mjs +++ b/components/airtable_oauth/actions/create-single-record/create-single-record.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-create-single-record", name: "Create Single Record", description: "Adds a record to a table.", - version: "0.0.9", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-table/create-table.mjs b/components/airtable_oauth/actions/create-table/create-table.mjs index c34f9ad644128..4167d3a2063f2 100644 --- a/components/airtable_oauth/actions/create-table/create-table.mjs +++ b/components/airtable_oauth/actions/create-table/create-table.mjs @@ -4,7 +4,7 @@ export default { key: "airtable_oauth-create-table", name: "Create Table", description: "Create a new table. [See the documentation](https://airtable.com/developers/web/api/create-table)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { airtable, diff --git a/components/airtable_oauth/actions/delete-record/delete-record.mjs b/components/airtable_oauth/actions/delete-record/delete-record.mjs index 9748b28a0ab9a..04afadbbfb34b 100644 --- a/components/airtable_oauth/actions/delete-record/delete-record.mjs +++ b/components/airtable_oauth/actions/delete-record/delete-record.mjs @@ -5,7 +5,7 @@ export default { key: "airtable_oauth-delete-record", name: "Delete Record", description: "Delete a selected record from a table. [See the documentation](https://airtable.com/developers/web/api/delete-record)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs b/components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs index 295986aefbe54..258c0ffa67f27 100644 --- a/components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs +++ b/components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-get-record-or-create", name: "Get Record Or Create", description: "Get a specific record, or create one if it doesn't exist. [See the documentation](https://airtable.com/developers/web/api/create-records)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/get-record/get-record.mjs b/components/airtable_oauth/actions/get-record/get-record.mjs index a579faec3b028..c978969c193a1 100644 --- a/components/airtable_oauth/actions/get-record/get-record.mjs +++ b/components/airtable_oauth/actions/get-record/get-record.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-get-record", name: "Get Record", description: "Get data of a selected record from a table. [See the documentation](https://airtable.com/developers/web/api/get-record)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs b/components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs index ae2eeea18e221..74b851b220584 100644 --- a/components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs +++ b/components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs @@ -6,7 +6,7 @@ export default { name: "List Records in View", description: "Retrieve records from a view, optionally sorting and filtering results. [See the documentation](https://airtable.com/developers/web/api/list-views)", type: "action", - version: "0.0.8", + version: "0.0.9", ...commonList, props: { accountTierAlert: { diff --git a/components/airtable_oauth/actions/list-records/list-records.mjs b/components/airtable_oauth/actions/list-records/list-records.mjs index c8dcf06f0a013..35ab2f73783de 100644 --- a/components/airtable_oauth/actions/list-records/list-records.mjs +++ b/components/airtable_oauth/actions/list-records/list-records.mjs @@ -6,7 +6,7 @@ export default { name: "List Records", description: "Retrieve records from a table, optionally sorting and filtering results. [See the documentation](https://airtable.com/developers/web/api/list-records)", type: "action", - version: "0.0.8", + version: "0.0.9", ...commonList, props: { ...common.props, diff --git a/components/airtable_oauth/actions/search-records/search-records.mjs b/components/airtable_oauth/actions/search-records/search-records.mjs index 3465137d21e1f..e9e8fdab444fb 100644 --- a/components/airtable_oauth/actions/search-records/search-records.mjs +++ b/components/airtable_oauth/actions/search-records/search-records.mjs @@ -5,7 +5,7 @@ export default { key: "airtable_oauth-search-records", name: "Search Records", description: "Search for a record by formula or by field value. [See the documentation](https://airtable.com/developers/web/api/list-records)", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/update-comment/update-comment.mjs b/components/airtable_oauth/actions/update-comment/update-comment.mjs index 9ff68dc33def5..97bb125608041 100644 --- a/components/airtable_oauth/actions/update-comment/update-comment.mjs +++ b/components/airtable_oauth/actions/update-comment/update-comment.mjs @@ -4,7 +4,7 @@ export default { key: "airtable_oauth-update-comment", name: "Update Comment", description: "Update an existing comment on a selected record. [See the documentation](https://airtable.com/developers/web/api/update-comment)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/update-field/update-field.mjs b/components/airtable_oauth/actions/update-field/update-field.mjs index 6662c21391496..743cf99be10d7 100644 --- a/components/airtable_oauth/actions/update-field/update-field.mjs +++ b/components/airtable_oauth/actions/update-field/update-field.mjs @@ -5,7 +5,7 @@ export default { key: "airtable_oauth-update-field", name: "Update Field", description: "Update an existing field in a table. [See the documentation](https://airtable.com/developers/web/api/update-field)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/update-record/update-record.mjs b/components/airtable_oauth/actions/update-record/update-record.mjs index 9a8694e726185..5c1f90de36068 100644 --- a/components/airtable_oauth/actions/update-record/update-record.mjs +++ b/components/airtable_oauth/actions/update-record/update-record.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-update-record", name: "Update Record", description: "Update a single record in a table by Record ID. [See the documentation](https://airtable.com/developers/web/api/update-record)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/update-table/update-table.mjs b/components/airtable_oauth/actions/update-table/update-table.mjs index 44b8c9be1ce71..bde5d0f56422c 100644 --- a/components/airtable_oauth/actions/update-table/update-table.mjs +++ b/components/airtable_oauth/actions/update-table/update-table.mjs @@ -4,7 +4,7 @@ export default { key: "airtable_oauth-update-table", name: "Update Table", description: "Update an existing table. [See the documentation](https://airtable.com/developers/web/api/update-table)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/airtable_oauth.app.mjs b/components/airtable_oauth/airtable_oauth.app.mjs index 5d588c6572b59..0974cbbf816d7 100644 --- a/components/airtable_oauth/airtable_oauth.app.mjs +++ b/components/airtable_oauth/airtable_oauth.app.mjs @@ -282,16 +282,22 @@ You can also reference an object exported by a previous step, e.g. \`{{steps.foo }) { const base = this.base(baseId); const data = []; - await base(tableId).select({ - ...params, - }) - .eachPage(function page(records, fetchNextPage) { - records.forEach(function(record) { - data.push(record._rawJson); + + try { + await base(tableId).select({ + ...params, + }) + .eachPage(function page(records, fetchNextPage) { + records.forEach(function(record) { + data.push(record._rawJson); + }); + fetchNextPage(); }); - fetchNextPage(); - }); - return data; + return data; + + } catch (err) { + this.throwFormattedError(err); + } }, listComments({ baseId, tableId, recordId, ...args diff --git a/components/airtable_oauth/package.json b/components/airtable_oauth/package.json index 6421e180cd3b7..9d019410ff6f3 100644 --- a/components/airtable_oauth/package.json +++ b/components/airtable_oauth/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/airtable_oauth", - "version": "0.4.2", + "version": "0.4.3", "description": "Pipedream Airtable (OAuth) Components", "main": "airtable_oauth.app.mjs", "keywords": [ diff --git a/components/airtable_oauth/sources/common/common.mjs b/components/airtable_oauth/sources/common/common.mjs index c97a94ac516e3..7e2eddeac7c36 100644 --- a/components/airtable_oauth/sources/common/common.mjs +++ b/components/airtable_oauth/sources/common/common.mjs @@ -17,6 +17,12 @@ export default { "baseId", ], }, + filterByFormula: { + propDefinition: [ + airtable, + "filterByFormula", + ], + }, }, hooks: { activate() { @@ -42,9 +48,17 @@ export default { const formattedTimestamp = new Date(timestampMillis).toISOString(); this._setLastTimestamp(formattedTimestamp); }, - getListRecordsParams(params) { + getListRecordsParams({ + formula, ...params + } = {}) { + let filterByFormula = formula; + + if (this.filterByFormula) { + filterByFormula = `AND(${formula}, ${this.filterByFormula})`; + } + return { - filterByFormula: `LAST_MODIFIED_TIME() > "${this._getLastTimestamp()}"`, + filterByFormula, returnFieldsByFieldId: this.returnFieldsByFieldId || false, ...params, }; diff --git a/components/airtable_oauth/sources/new-field/new-field.mjs b/components/airtable_oauth/sources/new-field/new-field.mjs index e23469e6b0088..413a119f84403 100644 --- a/components/airtable_oauth/sources/new-field/new-field.mjs +++ b/components/airtable_oauth/sources/new-field/new-field.mjs @@ -5,7 +5,7 @@ export default { name: "New Field Created (Instant)", description: "Emit new event when a field is created in the selected table. [See the documentation](https://airtable.com/developers/web/api/get-base-schema)", key: "airtable_oauth-new-field", - version: "1.0.0", + version: "1.0.1", type: "source", dedupe: "unique", methods: { diff --git a/components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs b/components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs index ed93e57ea63e9..e4613d20dcbca 100644 --- a/components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs +++ b/components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs @@ -8,7 +8,7 @@ export default { name: "New Record Created, Updated or Deleted (Instant)", description: "Emit new event when a record is added, updated, or deleted in a table or selected view.", key: "airtable_oauth-new-modified-or-deleted-records-instant", - version: "0.1.0", + version: "0.1.1", type: "source", dedupe: "unique", props: { diff --git a/components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs b/components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs index 364a4769c9260..77bd01cd40dd6 100644 --- a/components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs +++ b/components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs @@ -6,7 +6,7 @@ export default { name: "New, Modified or Deleted Records", description: "Emit new event each time a record is added, updated, or deleted in an Airtable table. Supports tables up to 10,000 records", key: "airtable_oauth-new-modified-or-deleted-records", - version: "0.0.9", + version: "0.0.10", type: "source", dedupe: "unique", props: { @@ -53,7 +53,9 @@ export default { const prevAllRecordIds = this._getPrevAllRecordIds(); const lastTimestamp = this._getLastTimestamp(); - const params = this.getListRecordsParams(); + const params = this.getListRecordsParams({ + formula: `LAST_MODIFIED_TIME() > "${lastTimestamp}"`, + }); const records = await this.airtable.listRecords({ baseId, diff --git a/components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs b/components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs index 4d7c6ea787d45..3e01fc25b0da9 100644 --- a/components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs +++ b/components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs @@ -6,7 +6,7 @@ export default { name: "New or Modified Field (Instant)", description: "Emit new event when a field is created or updated in the selected table", key: "airtable_oauth-new-or-modified-field", - version: "1.0.0", + version: "1.0.1", type: "source", dedupe: "unique", methods: { diff --git a/components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs b/components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs index 7bbd80cacd4df..6aa83bbac4ca3 100644 --- a/components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs +++ b/components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs @@ -6,7 +6,7 @@ export default { name: "New or Modified Records in View", description: "Emit new event for each new or modified record in a view", key: "airtable_oauth-new-or-modified-records-in-view", - version: "0.0.10", + version: "0.0.11", type: "source", props: { ...base.props, @@ -50,6 +50,7 @@ export default { const lastTimestamp = this._getLastTimestamp(); const params = this.getListRecordsParams({ view: viewId, + formula: `LAST_MODIFIED_TIME() > "${lastTimestamp}"`, }); const records = await this.airtable.listRecords({ diff --git a/components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs b/components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs index 3a4aade0d4a5f..349354da147ea 100644 --- a/components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs +++ b/components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs @@ -6,7 +6,7 @@ export default { name: "New or Modified Records (Instant)", key: "airtable_oauth-new-or-modified-records", description: "Emit new event for each new or modified record in a table or view", - version: "1.0.0", + version: "1.0.1", type: "source", dedupe: "unique", methods: { diff --git a/components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs b/components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs index b3e64fc4a7e91..592be21dc7cf2 100644 --- a/components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs +++ b/components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs @@ -6,7 +6,7 @@ export default { name: "New Records in View", description: "Emit new event for each new record in a view", key: "airtable_oauth-new-records-in-view", - version: "0.0.9", + version: "0.0.10", type: "source", dedupe: "unique", props: { @@ -51,7 +51,7 @@ export default { const lastTimestamp = this._getLastTimestamp(); const params = this.getListRecordsParams({ view: viewId, - filterByFormula: `CREATED_TIME() > "${lastTimestamp}"`, + formula: `CREATED_TIME() > "${lastTimestamp}"`, }); const records = await this.airtable.listRecords({ diff --git a/components/airtable_oauth/sources/new-records/new-records.mjs b/components/airtable_oauth/sources/new-records/new-records.mjs index 3cf18cc89e3c9..7d4b486b1ebf6 100644 --- a/components/airtable_oauth/sources/new-records/new-records.mjs +++ b/components/airtable_oauth/sources/new-records/new-records.mjs @@ -5,7 +5,7 @@ export default { name: "New Record(s) Created (Instant)", description: "Emit new event for each new record in a table", key: "airtable_oauth-new-records", - version: "1.0.0", + version: "1.0.1", type: "source", dedupe: "unique", methods: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ee6b43c7bf312..762f5daac5a08 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8949,8 +8949,7 @@ importers: components/optimoroute: {} - components/oracle_cloud_infrastructure: - specifiers: {} + components/oracle_cloud_infrastructure: {} components/orbisx: {} @@ -34399,8 +34398,6 @@ snapshots: '@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3)) '@putout/operator-json': 2.2.0 putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3) - transitivePeerDependencies: - - supports-color '@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))': dependencies: