30 lines
960 B
JavaScript
30 lines
960 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Port = void 0;
|
|
const Feature_1 = require("../types/Feature");
|
|
class Port extends Feature_1.Feature {
|
|
cache;
|
|
constructor(cache) {
|
|
super();
|
|
this.cache = cache;
|
|
}
|
|
importEntity(entity, id, file, option, s2jOpts) {
|
|
const formData = new FormData();
|
|
formData.set('entity', entity);
|
|
formData.set('id', id);
|
|
formData.set('file', file);
|
|
formData.set('option', JSON.stringify(option));
|
|
if (s2jOpts) {
|
|
formData.set('s2jOpts', JSON.stringify(s2jOpts));
|
|
}
|
|
return this.cache.exec('importEntity', formData);
|
|
}
|
|
exportEntity(entity, id, filter, properties) {
|
|
return this.cache.exec('exportEntity', { entity, id, filter, properties });
|
|
}
|
|
getImportationTemplate(id) {
|
|
return this.cache.exec('getImportationTemplate', { id });
|
|
}
|
|
}
|
|
exports.Port = Port;
|