Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
if (!itemId) {
reject("Item's ID is not defined");
return;
}
// Get the item information
const itemBaseDef = common.getItemBase(itemId, sourceAuthentication);
const itemDataDef = new Promise((resolve2, reject2) => {
// tslint:disable-next-line: no-floating-promises
itemBaseDef.then(
// any error fetching item base will be handled via Promise.all later
(itemBase: any) => {
common
.getItemDataAsFile(itemId, itemBase.name, sourceAuthentication)
.then(resolve2, (error: any) => reject2(JSON.stringify(error)));
}
);
});
const itemMetadataDef = common.getItemMetadataAsFile(
itemId,
sourceAuthentication
);
const itemResourcesDef = common.getItemResourcesFiles(
return new Promise((resolve, reject) => {
if (!itemId) {
reject("Item's ID is not defined");
return;
}
// Get the item information
const itemBaseDef = common.getItemBase(itemId, authentication);
const itemDataDef = new Promise((resolve2, reject2) => {
// tslint:disable-next-line: no-floating-promises
itemBaseDef.then(
// any error fetching item base will be handled via Promise.all later
(itemBase: any) => {
common
.getItemDataAsFile(itemId, itemBase.name, authentication)
.then(resolve2, (error: any) => reject2(JSON.stringify(error)));
}
);
});
const itemThumbnailDef = new Promise((resolve3, reject3) => {
// tslint:disable-next-line: no-floating-promises
itemBaseDef.then(
// any error fetching item base will be handled via Promise.all later
(itemBase: any) => {
return new Promise((resolve, reject) => {
if (!itemId) {
reject("Item's ID is not defined");
return;
}
// Get the item information
const itemBaseDef = solutionCommon.getItemBase(itemId, authentication);
const itemDataDef = new Promise((resolve2, reject2) => {
// tslint:disable-next-line: no-floating-promises
itemBaseDef.then(
// any error fetching item base will be handled via Promise.all later
(itemBase: any) => {
solutionCommon
.getItemDataAsFile(itemId, itemBase.name, authentication)
.then(resolve2, (error: any) => reject2(error));
}
);
});
const itemThumbnailDef = new Promise((resolve3, reject3) => {
// tslint:disable-next-line: no-floating-promises
itemBaseDef.then(
// any error fetching item base will be handled via Promise.all later
(itemBase: any) => {
return new Promise((resolve, reject) => {
if (!itemId) {
reject("Item's ID is not defined");
return;
}
// Get the item information
const itemBaseDef = common.getItemBase(itemId, authentication);
const itemDataDef = new Promise((resolve2, reject2) => {
// tslint:disable-next-line: no-floating-promises
itemBaseDef.then(
// any error fetching item base will be handled via Promise.all later
(itemBase: any) => {
common
.getItemDataAsFile(itemId, itemBase.name, authentication)
.then(resolve2, (error: any) => reject2(JSON.stringify(error)));
}
);
});
const itemMetadataDef = common.getItemMetadataAsFile(
itemId,
authentication
);
const itemResourcesDef = common.getItemResourcesFiles(