TypeScript wrappers running in Node.js and modern browsers for transferring ArcGIS Online items from one organization to another. Video introduction from the 2020 Developer Summit.
An ArcGIS Online (AGO) item is transformed into a template that contains all of its defining information. If the item depends on other items, those items are also transformed into templates.
A Solution ArcGIS Online Item can take two forms:
- A
Solution Templateresides in a host ArcGIS Online organization. It contains a list of templates of ArcGIS Online items that work together. It is used to deploy a Solution and its items into destination ArcGIS Online organizations. - A
Deployed Solutionresides in a destination ArcGIS Online organization. It is created when a Solution is deployed and contains a list of references to items deployed for a Solution; it serves as a table of contents for the deployment. This grouping of references also simplifies deleting the deployed Solution.
The API is divided into packages to make it easier to use just the parts that you want:
commoncontains common helper functions for the other packagescreatorcontains functions for transforming items into templatesdeployercontains functions for deploying item templates into items in a destination organizationfeature-layercontains functions for Feature Service itemsfilecontains functions for items that contain filesformcontains functions for form itemsgroupcontains functions for Groupshub-typescontains functions supporting ArcGIS Hub Sites and Initiativessimple-typescontains functions for the simpler item types Dashboard, Form, Web Map, Web Mapping Application, and Workforce Projectstorymapcontains functions for Storymap itemsvelocitycontains functions to support ArcGIS Velocity itemsviewercontains functions to support displaying Solution itemsweb-experiencecontains functions for Experience Builder itemsweb-toolcontains functions for Web Tool Geoprocessing Service itemsworkflowcontains functions for Workflow items
The API documentation is published at https://esri.github.io/solution.js/
Currently, the ArcGIS Online item types that can be converted into a template are:
-
App types: Dashboard, Data Pipeline, Form, Hub Page, Hub Site Application, Insights Model, Notebook, Oriented Imagery Catalog, QuickCapture Project, Site Application, Site Page, StoryMap, Web Experience, Web Mapping Application, Workforce Project
-
Map types: Web Map, Web Scene
-
Layer types: Big Data Analytic, Feature Collection, Feature Service, Feed, Geoprocessing Service, Map Service, Real Time Analytic, Vector Tile Service
-
File types: 360 VR Experience, AppBuilder Extension, AppBuilder Widget Package, Application Configuration, ArcGIS Pro Add In, ArcGIS Pro Configuration, ArcPad Package, Basemap Package, CAD Drawing, CityEngine Web Scene, Code Sample, Color Set, Compact Tile Package, CSV Collection, CSV, Deep Learning Package, Desktop Add In, Desktop Application Template, Desktop Style, Document Link, Explorer Add In, Explorer Layer, Explorer Map, Feature Collection Template, File Geodatabase, GeoJson, GeoPackage, Geoprocessing Package, Geoprocessing Sample, Globe Document, Image Collection, Image, iWork Keynote, iWork Numbers, iWork Pages, KML Collection, Layer Package, Layer Template, Layer, Layout, Locator Package, Map Document, Map Package, Map Template, Microsoft Excel, Microsoft Powerpoint, Microsoft Word, Mobile Basemap Package, Mobile Map Package, Mobile Scene Package, Native Application, Native Application Installer, Native Application Template, netCDF, Operation View, Operations Dashboard Add In, Operations Dashboard Extension, PDF, Pro Layer Package, Pro Layer, Pro Map Package, Pro Map, Pro Report, Project Package, Project Template, Published Map, Raster function template, Report Template, Rule Package, Scene Document, Scene Package, Service Definition, Shapefile, Statistical Data Collection, Style, Survey123 Add In, Symbol Set, Task File, Tile Package, Toolbox Package, Vector Tile Package, Viewer Configuration, Visio Document, Window Mobile Package, Windows Mobile Package, Windows Viewer Add In, Windows Viewer Configuration, Workflow, Workflow Manager Package
You can use the implementedTypes demo to get the latest version of these lists; the demo generates its lists from the source code.
The repository can be built using the Windows batch file build.bat or the bash command shell build.sh. These files run npm install, build the library and its demos, and run the unit tests.
For a list of all available commands run npm run.
These commands are
-
building
npm run buildCreates esm and cjs outputs for each packagenpm run build:esmCreates esm outputs for each packagenpm run build:cjsCreates cjs outputs for each packagenpm run clean:distdeletesdistfolders in the demos and packages subfoldersnpm run clean:nodedeletesnode_modulesin the top level and in the demos and packages subfoldersnpm run lintlints the TypeScript filesnpm run lint:fixlints the TypeScript files and fixes what it cannpm run prettifybeautifies TypeScript filesnpm run getupdatesmodifies package.json with npm updates to packages
-
testing; learn more about Karma testing at https://karma-runner.github.io/6.4/config/browsers.html
npm run testlints, then runstest:chrometests to confirm that the API is functioning as expectednpm run test:chromeruns karma in the Chrome browsernpm run test:chrome:ciruns karma in the ChromeHeadlessCI browsernpm run test:chrome:debugruns karma in the Chrome browser and leaves the browser open for debugging testsnpm run test:edgeruns karma in the Edge (Chromium) browsernpm run test:firefoxruns karma in the Firefox browsernpm run test:firefox:ciruns karma in the FirefoxHeadless browsernpm run test:safariruns karma in the Safari browsernpm run test:all:macrunstest:chrome,test:firefox, andtest:safarinpm run test:all:winrunstest:chrome,test:edge, andtest:firefox
-
publishing doc
npm run docs:buildbuilds the documentation (note that this script creates adocsfolder, deleting any existing one)npm run docs:deploypushes the documentation to the repository's gh-pages
-
publishing code
npm run publishto publish the repo to GitHub & npm as the latest versionnpm run publish:nextto publish the repo to GitHub & npm as the next version
Both publishing commands support an optional command-line argument to specify the version number to use; if omitted, one is prompted for the version number. The argument can either be a version value such as "5.8.8" or one of these strings for an automatic version bump: major | minor | patch | premajor | preminor | prepatch | prerelease.
- lifecycle
- precommit lints staged files
Found a bug or want to request a new feature? Please take a look at previously logged issues; if you don't see your concern, please let us know by submitting an issue.
Major: Significant changes in solution.js (e.g., when the repo moved from ArcGIS REST JS v3 (solution.js v5.x) to v4 (solution.js v6.x)) Minor: 3 times a year coinciding with our ArcGIS Online releases. For example, starting at 6.2 for 2025.R2, we continue with 6.3 for 2025.R3, 6.4 2026.R1, etc. Patch: Incremental fixes and enhancements
In npmjs.com, the current ArcGIS Online release will be labeled as "latest", and the versions for the next ArcGIS Online release will be labeled as "next".
Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.
Copyright © 2018 Esri
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A copy of the license is available in the repository's LICENSE file.