boomi-client-ts
v1.0.1
Published
A ts implementation of Dell Boomi platform rest api
Readme
Usage:
Example file to download execution record of a certain process as well as the documents
import { BoomiClient } from 'boomi-client';
const client = new BoomiClient({
userName,
apiToken,
accountId,
});
const execRecords = await client.queryAll<
ExecutionRecord,
keyof ExecutionRecord
>({
resourceName: "ExecutionRecord",
body: {
QueryFilter: {
expression: {
operator: "and",
nestedExpression: [
{
operator: "BETWEEN",
property: "executionTime",
argument: ["2025-10-01T00:00:00Z", "2025-10-01T23:59:59Z"],
},
{
operator: "EQUALS",
property: "atomName",
argument: ["<your atom name>"],
},
{
operator: "EQUALS",
property: "processName",
argument: ["<your process name>"],
},
{
operator: "GREATER_THAN",
property: "outboundDocumentCount",
argument: [0],
},
],
},
},
},
});
const connectorRecord = await Promise.all(
execRecords.map(async (record) => {
const connectorRecords = await client.queryAll<
GenericConnectorRecord,
GenericConnectorRecordQueryProperties
>({
resourceName: "GenericConnectorRecord",
body: {
QueryFilter: {
expression: {
operator: "and",
nestedExpression: [
{
operator: "EQUALS",
property: "executionId",
argument: [record.executionId],
}
],
},
},
},
});
await Promise.allSettled(
connectorRecords.map(
async (connectorRecord) => {
const fileContent = await client.getDocument({
record: connectorRecord[0],
});
const fileName = `${record.executionId}_${record.executionTime}_${connectorRecord.operationName}_${connectorRecord.documentIndex}.txt`
await fs.promises.writeFile(fileName, fileContent);
}
)
)
}),
);