@flatfile/listener 0.3.6 → 0.3.7

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.
package/dist/index.js CHANGED
@@ -275,14 +275,14 @@ var FlatfileEvent = class extends AuthenticatedClient {
275
275
  if (!this.src.dataUrl) {
276
276
  throw new Error("Cannot set data on an event without a dataUrl");
277
277
  }
278
- const prepRecords = records.map((record) => {
278
+ records.map((record) => {
279
279
  record.messages?.map((message) => {
280
280
  delete message.source;
281
281
  });
282
282
  });
283
283
  await this.fetch(this.src.dataUrl, {
284
- method: "POST",
285
- data: JSON.stringify(prepRecords)
284
+ method: "PUT",
285
+ data: records
286
286
  });
287
287
  }
288
288
  };
package/dist/index.mjs CHANGED
@@ -232,14 +232,14 @@ var FlatfileEvent = class extends AuthenticatedClient {
232
232
  if (!this.src.dataUrl) {
233
233
  throw new Error("Cannot set data on an event without a dataUrl");
234
234
  }
235
- const prepRecords = records.map((record) => {
235
+ records.map((record) => {
236
236
  record.messages?.map((message) => {
237
237
  delete message.source;
238
238
  });
239
239
  });
240
240
  await this.fetch(this.src.dataUrl, {
241
- method: "POST",
242
- data: JSON.stringify(prepRecords)
241
+ method: "PUT",
242
+ data: records
243
243
  });
244
244
  }
245
245
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatfile/listener",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "A PubSub Listener for configuring and using Flatfile",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",