@imposium-hub/components 1.38.10 → 1.38.11
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/components.js +1 -1
- package/dist/components.js.map +1 -1
- package/package.json +1 -1
- package/services/API.ts +14 -1
package/package.json
CHANGED
package/services/API.ts
CHANGED
|
@@ -516,10 +516,23 @@ export default class API {
|
|
|
516
516
|
});
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
public importBatchDataFromCsv = (
|
|
519
|
+
public importBatchDataFromCsv = (
|
|
520
|
+
batchId : string,
|
|
521
|
+
csvFileKey : string,
|
|
522
|
+
embed : boolean = false,
|
|
523
|
+
accessKey : string = null,
|
|
524
|
+
compId : string = null) : Promise<any | Error> => {
|
|
525
|
+
|
|
520
526
|
const formData : FormData = new FormData();
|
|
521
527
|
formData.append('file_key', csvFileKey);
|
|
522
528
|
|
|
529
|
+
// used to generate the embed codes for an email batch
|
|
530
|
+
if (embed && accessKey && compId) {
|
|
531
|
+
formData.append('include_email_embed', 'true');
|
|
532
|
+
formData.append('composition_id', compId);
|
|
533
|
+
formData.append('access_key', accessKey);
|
|
534
|
+
}
|
|
535
|
+
|
|
523
536
|
return this.doRequest({
|
|
524
537
|
method: 'POST',
|
|
525
538
|
url: `/batch/${batchId}/data/from-csv`,
|