How to use the @esri/solution-common.getItemResourcesFiles function in @esri/solution-common

To help you get started, we’ve selected a few @esri/solution-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Esri / solution.js / packages / common / examples / getItemInfo / src / main.ts View on Github external
}
      );
    });
    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) => {
          common
            .getItemThumbnail(itemId, itemBase.thumbnail, false, authentication)
            .then(resolve3, (error: any) => reject3(JSON.stringify(error)));
        }
      );
    });
    const itemMetadataDef = common.getItemMetadataBlob(itemId, authentication);
    const itemResourcesDef = common.getItemResourcesFiles(
      itemId,
      authentication
    );

    Promise.all([
      itemBaseDef,
      itemDataDef,
      itemThumbnailDef,
      itemMetadataDef,
      itemResourcesDef
    ]).then(
      async responses => {
        const [
          itemBase,
          itemDataFile,
          itemThumbnail,
github Esri / solution.js / packages / common / examples / copySolutions / src / main.ts View on Github external
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(
      itemId,
      sourceAuthentication
    );

    Promise.all([
      itemBaseDef,
      itemDataDef,
      itemMetadataDef,
      itemResourcesDef
    ]).then(
      responses => {
        const [
          itemBase,
          itemDataFile,
          itemMetadataFile,
          itemResourceFiles
github Esri / solution.js / packages / common / examples / copyItemInfo / src / main.ts View on Github external
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(
      itemId,
      authentication
    );

    Promise.all([
      itemBaseDef,
      itemDataDef,
      itemMetadataDef,
      itemResourcesDef
    ]).then(
      responses => {
        const [
          itemBase,
          itemDataFile,
          itemMetadataFile,
          itemResourceFiles
github Esri / solution.js / packages / creator / examples / createSolutionFromItem / lib / getItemInfo.ts View on Github external
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) => {
          solutionCommon
            .getItemThumbnail(itemId, itemBase.thumbnail, false, authentication)
            .then(resolve3, (error: any) => reject3(error));
        }
      );
    });
    const itemMetadataDef = solutionCommon.getItemMetadataBlob(
      itemId,
      authentication
    );
    const itemResourcesDef = solutionCommon.getItemResourcesFiles(
      itemId,
      authentication
    );

    Promise.all([
      itemBaseDef,
      itemDataDef,
      itemThumbnailDef,
      itemMetadataDef,
      itemResourcesDef
    ]).then(
      async responses => {
        const [
          itemBase,
          itemDataFile,
          itemThumbnail,