(key: IntegrationTaskKey, params?: AirtableSDK.SelectOptions<TFields>)
| 32 | } |
| 33 | |
| 34 | getRecords(key: IntegrationTaskKey, params?: AirtableSDK.SelectOptions<TFields>) { |
| 35 | return this.runTask( |
| 36 | key, |
| 37 | async (client) => { |
| 38 | const result = await client |
| 39 | .base(this.baseId) |
| 40 | // official types are wrong - we need to use our extended AirtableFieldSet here |
| 41 | // @ts-ignore |
| 42 | .table<TFields>(this.tableName) |
| 43 | .select(params) |
| 44 | .all(); |
| 45 | return result.map((record) => toSerializableRecord<TFields>(record)); |
| 46 | }, |
| 47 | { |
| 48 | name: "Get Records", |
| 49 | params, |
| 50 | properties: [...tableParams({ baseId: this.baseId, tableName: this.tableName })], |
| 51 | } |
| 52 | ); |
| 53 | } |
| 54 | |
| 55 | getRecord(key: IntegrationTaskKey, recordId: string) { |
| 56 | return this.runTask( |
no test coverage detected