@shushed/helpers 0.0.247-airtable-helper-views-20260130115845 → 0.0.247-airtable-helper-views-20260130120550

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.
@@ -423,12 +423,12 @@ class AirtableHelper extends runtime_1.default {
423
423
  if (!unprocessedResult) {
424
424
  const res = (await resp.json());
425
425
  nextCursor = res.cursor;
426
- this.logging.log(`Received ${res.payloads.length} records from the table: ${this.tableId}.`);
426
+ const scope = this.viewId ? `view: ${this.viewId}` : `table: ${this.tableId}`;
427
+ this.logging.log(`Received ${res.payloads.length} records from the ${scope}.`);
427
428
  for (const payload of res.payloads) {
428
429
  const changes = this.viewId
429
430
  ? payload.changedViewsById?.[this.viewId]
430
- : payload.changedTablesById?.[this.tableId]
431
- || Object.values(payload.changedTablesById || {})[0];
431
+ : payload.changedTablesById?.[this.tableId];
432
432
  const airtableCreated = Object.entries(changes?.createdRecordsById || {}).map(([k, v]) => ({
433
433
  id: k,
434
434
  fields: AirtableHelper.translateFields(this.dictionary, { fields: v.cellValuesByFieldId || {} }).fields,
@@ -548,7 +548,8 @@ class AirtableHelper extends runtime_1.default {
548
548
  return null;
549
549
  }
550
550
  createNotificationUrl() {
551
- return `${this.runtimeUrl}/executeWorkflow/${this.workflowId}/${this.triggerId}?request-from-airtable=1&baseId=${this.baseId}&tableId=${this.tableId}`;
551
+ const baseUrl = `${this.runtimeUrl}/executeWorkflow/${this.workflowId}/${this.triggerId}?request-from-airtable=1&baseId=${this.baseId}&tableId=${this.tableId}`;
552
+ return this.viewId ? `${baseUrl}&viewId=${this.viewId}` : baseUrl;
552
553
  }
553
554
  async isValidSignature(secret, payload, signature) {
554
555
  const macSecretDecoded = Buffer.from(secret, 'base64');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shushed/helpers",
3
- "version": "0.0.247-airtable-helper-views-20260130115845",
3
+ "version": "0.0.247-airtable-helper-views-20260130120550",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",