(key: IntegrationTaskKey, recordId: string)
| 53 | } |
| 54 | |
| 55 | getRecord(key: IntegrationTaskKey, recordId: string) { |
| 56 | return this.runTask( |
| 57 | key, |
| 58 | async (client) => { |
| 59 | // official types are wrong - we need to use our extended AirtableFieldSet here |
| 60 | // @ts-ignore |
| 61 | const result = await client.base(this.baseId).table<TFields>(this.tableName).find(recordId); |
| 62 | return toSerializableRecord<TFields>(result); |
| 63 | }, |
| 64 | { |
| 65 | name: "Get Record", |
| 66 | params: { recordId }, |
| 67 | properties: [ |
| 68 | ...tableParams({ baseId: this.baseId, tableName: this.tableName }), |
| 69 | { label: "Record", text: recordId }, |
| 70 | ], |
| 71 | } |
| 72 | ); |
| 73 | } |
| 74 | |
| 75 | createRecords(key: IntegrationTaskKey, records: { fields: Partial<TFields> }[]) { |
| 76 | return this.runTask( |
no test coverage detected