plenna_utilities 1.13.8 → 1.13.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,14 +61,14 @@ class AirtableAPI {
|
|
|
61
61
|
});
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
async updateRecords(records) {
|
|
64
|
+
async updateRecords(records, options) {
|
|
65
65
|
const base = new airtable_1.default({ apiKey: this.apiKey }).base(this.baseId);
|
|
66
66
|
const chunkSize = 10;
|
|
67
67
|
for (let i = 0; i < records.length; i += chunkSize) {
|
|
68
68
|
const batch = records.slice(i, i + chunkSize).map((record) => (record));
|
|
69
69
|
console.log(`Actualizando batch ${i / chunkSize + 1}...`);
|
|
70
70
|
try {
|
|
71
|
-
await base(this.tableName).update(batch);
|
|
71
|
+
await base(this.tableName).update(batch, options);
|
|
72
72
|
console.log(`✅ Update completado del batch ${i / chunkSize + 1}`);
|
|
73
73
|
}
|
|
74
74
|
catch (error) {
|