@esri/solution-common 6.1.3 → 6.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/arcgisRestJS.d.ts +63 -0
- package/dist/cjs/arcgisRestJS.js +158 -0
- package/dist/cjs/arcgisRestJS.js.map +1 -0
- package/dist/cjs/completeItem.d.ts +30 -0
- package/dist/cjs/completeItem.js +72 -0
- package/dist/cjs/completeItem.js.map +1 -0
- package/dist/cjs/create-hub-request-options.d.ts +29 -0
- package/dist/cjs/create-hub-request-options.js +64 -0
- package/dist/cjs/create-hub-request-options.js.map +1 -0
- package/dist/cjs/deleteHelpers/deleteEmptyGroups.d.ts +24 -0
- package/dist/cjs/deleteHelpers/deleteEmptyGroups.js +42 -0
- package/dist/cjs/deleteHelpers/deleteEmptyGroups.js.map +1 -0
- package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.d.ts +27 -0
- package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.js +99 -0
- package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.js.map +1 -0
- package/dist/cjs/deleteHelpers/deleteSolutionContents.d.ts +39 -0
- package/dist/cjs/deleteHelpers/deleteSolutionContents.js +127 -0
- package/dist/cjs/deleteHelpers/deleteSolutionContents.js.map +1 -0
- package/dist/cjs/deleteHelpers/deleteSolutionFolder.d.ts +29 -0
- package/dist/cjs/deleteHelpers/deleteSolutionFolder.js +81 -0
- package/dist/cjs/deleteHelpers/deleteSolutionFolder.js.map +1 -0
- package/dist/cjs/deleteHelpers/deleteSolutionItem.d.ts +31 -0
- package/dist/cjs/deleteHelpers/deleteSolutionItem.js +52 -0
- package/dist/cjs/deleteHelpers/deleteSolutionItem.js.map +1 -0
- package/dist/cjs/deleteHelpers/index.d.ts +22 -0
- package/dist/cjs/deleteHelpers/index.js +26 -0
- package/dist/cjs/deleteHelpers/index.js.map +1 -0
- package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.d.ts +27 -0
- package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.js +34 -0
- package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.js.map +1 -0
- package/dist/cjs/deleteHelpers/removeItems.d.ts +35 -0
- package/dist/cjs/deleteHelpers/removeItems.js +116 -0
- package/dist/cjs/deleteHelpers/removeItems.js.map +1 -0
- package/dist/cjs/deleteHelpers/reportProgress.d.ts +27 -0
- package/dist/cjs/deleteHelpers/reportProgress.js +46 -0
- package/dist/cjs/deleteHelpers/reportProgress.js.map +1 -0
- package/dist/cjs/deleteSolution.d.ts +56 -0
- package/dist/cjs/deleteSolution.js +107 -0
- package/dist/cjs/deleteSolution.js.map +1 -0
- package/dist/cjs/dependencies.d.ts +26 -0
- package/dist/cjs/dependencies.js +171 -0
- package/dist/cjs/dependencies.js.map +1 -0
- package/dist/cjs/featureServiceHelpers.d.ts +847 -0
- package/dist/cjs/featureServiceHelpers.js +2553 -0
- package/dist/cjs/featureServiceHelpers.js.map +1 -0
- package/dist/cjs/formHelpers.d.ts +26 -0
- package/dist/cjs/formHelpers.js +40 -0
- package/dist/cjs/formHelpers.js.map +1 -0
- package/dist/cjs/generalHelpers.d.ts +447 -0
- package/dist/cjs/generalHelpers.js +959 -0
- package/dist/cjs/generalHelpers.js.map +1 -0
- package/dist/cjs/get-subscription-info.d.ts +27 -0
- package/dist/cjs/get-subscription-info.js +38 -0
- package/dist/cjs/get-subscription-info.js.map +1 -0
- package/dist/cjs/getDeletableSolutionInfo.d.ts +30 -0
- package/dist/cjs/getDeletableSolutionInfo.js +53 -0
- package/dist/cjs/getDeletableSolutionInfo.js.map +1 -0
- package/dist/cjs/getItemTypeAbbrev.d.ts +19 -0
- package/dist/cjs/getItemTypeAbbrev.js +186 -0
- package/dist/cjs/getItemTypeAbbrev.js.map +1 -0
- package/dist/cjs/getSolutionSummary.d.ts +28 -0
- package/dist/cjs/getSolutionSummary.js +100 -0
- package/dist/cjs/getSolutionSummary.js.map +1 -0
- package/dist/cjs/index.d.ts +49 -0
- package/dist/cjs/index.js +53 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interfaces.d.ts +1446 -0
- package/dist/cjs/interfaces.js +72 -0
- package/dist/cjs/interfaces.js.map +1 -0
- package/dist/cjs/item-reuse.d.ts +140 -0
- package/dist/cjs/item-reuse.js +176 -0
- package/dist/cjs/item-reuse.js.map +1 -0
- package/dist/cjs/libConnectors.d.ts +73 -0
- package/dist/cjs/libConnectors.js +115 -0
- package/dist/cjs/libConnectors.js.map +1 -0
- package/dist/cjs/migrations/apply-schema.d.ts +24 -0
- package/dist/cjs/migrations/apply-schema.js +36 -0
- package/dist/cjs/migrations/apply-schema.js.map +1 -0
- package/dist/cjs/migrations/is-legacy-solution.d.ts +24 -0
- package/dist/cjs/migrations/is-legacy-solution.js +39 -0
- package/dist/cjs/migrations/is-legacy-solution.js.map +1 -0
- package/dist/cjs/migrations/upgrade-three-dot-one.d.ts +26 -0
- package/dist/cjs/migrations/upgrade-three-dot-one.js +48 -0
- package/dist/cjs/migrations/upgrade-three-dot-one.js.map +1 -0
- package/dist/cjs/migrations/upgrade-three-dot-zero.d.ts +27 -0
- package/dist/cjs/migrations/upgrade-three-dot-zero.js +43 -0
- package/dist/cjs/migrations/upgrade-three-dot-zero.js.map +1 -0
- package/dist/cjs/migrations/upgrade-two-dot-five.d.ts +24 -0
- package/dist/cjs/migrations/upgrade-two-dot-five.js +73 -0
- package/dist/cjs/migrations/upgrade-two-dot-five.js.map +1 -0
- package/dist/cjs/migrations/upgrade-two-dot-four.d.ts +24 -0
- package/dist/cjs/migrations/upgrade-two-dot-four.js +72 -0
- package/dist/cjs/migrations/upgrade-two-dot-four.js.map +1 -0
- package/dist/cjs/migrations/upgrade-two-dot-one.d.ts +7 -0
- package/dist/cjs/migrations/upgrade-two-dot-one.js +39 -0
- package/dist/cjs/migrations/upgrade-two-dot-one.js.map +1 -0
- package/dist/cjs/migrations/upgrade-two-dot-seven.d.ts +23 -0
- package/dist/cjs/migrations/upgrade-two-dot-seven.js +58 -0
- package/dist/cjs/migrations/upgrade-two-dot-seven.js.map +1 -0
- package/dist/cjs/migrations/upgrade-two-dot-six.d.ts +27 -0
- package/dist/cjs/migrations/upgrade-two-dot-six.js +61 -0
- package/dist/cjs/migrations/upgrade-two-dot-six.js.map +1 -0
- package/dist/cjs/migrations/upgrade-two-dot-three.d.ts +23 -0
- package/dist/cjs/migrations/upgrade-two-dot-three.js +55 -0
- package/dist/cjs/migrations/upgrade-two-dot-three.js.map +1 -0
- package/dist/cjs/migrations/upgrade-two-dot-two.d.ts +23 -0
- package/dist/cjs/migrations/upgrade-two-dot-two.js +58 -0
- package/dist/cjs/migrations/upgrade-two-dot-two.js.map +1 -0
- package/dist/cjs/migrations/upgrade-two-dot-zero.d.ts +44 -0
- package/dist/cjs/migrations/upgrade-two-dot-zero.js +95 -0
- package/dist/cjs/migrations/upgrade-two-dot-zero.js.map +1 -0
- package/dist/cjs/migrator.d.ts +25 -0
- package/dist/cjs/migrator.js +75 -0
- package/dist/cjs/migrator.js.map +1 -0
- package/dist/cjs/resourceHelpers.d.ts +192 -0
- package/dist/cjs/resourceHelpers.js +380 -0
- package/dist/cjs/resourceHelpers.js.map +1 -0
- package/dist/cjs/resources/add-resource.d.ts +38 -0
- package/dist/cjs/resources/add-resource.js +84 -0
- package/dist/cjs/resources/add-resource.js.map +1 -0
- package/dist/cjs/resources/addMetadataFromBlob.d.ts +25 -0
- package/dist/cjs/resources/addMetadataFromBlob.js +43 -0
- package/dist/cjs/resources/addMetadataFromBlob.js.map +1 -0
- package/dist/cjs/resources/convert-item-resource-to-storage-resource.d.ts +32 -0
- package/dist/cjs/resources/convert-item-resource-to-storage-resource.js +70 -0
- package/dist/cjs/resources/convert-item-resource-to-storage-resource.js.map +1 -0
- package/dist/cjs/resources/convert-storage-resource-to-item-resource.d.ts +29 -0
- package/dist/cjs/resources/convert-storage-resource-to-item-resource.js +70 -0
- package/dist/cjs/resources/convert-storage-resource-to-item-resource.js.map +1 -0
- package/dist/cjs/resources/copyAssociatedFiles.d.ts +79 -0
- package/dist/cjs/resources/copyAssociatedFiles.js +348 -0
- package/dist/cjs/resources/copyAssociatedFiles.js.map +1 -0
- package/dist/cjs/resources/copyDataIntoItem.d.ts +34 -0
- package/dist/cjs/resources/copyDataIntoItem.js +45 -0
- package/dist/cjs/resources/copyDataIntoItem.js.map +1 -0
- package/dist/cjs/resources/copyMetadataIntoItem.d.ts +27 -0
- package/dist/cjs/resources/copyMetadataIntoItem.js +44 -0
- package/dist/cjs/resources/copyMetadataIntoItem.js.map +1 -0
- package/dist/cjs/resources/copyResourceIntoZip.d.ts +34 -0
- package/dist/cjs/resources/copyResourceIntoZip.js +74 -0
- package/dist/cjs/resources/copyResourceIntoZip.js.map +1 -0
- package/dist/cjs/resources/copyZipIntoItem.d.ts +26 -0
- package/dist/cjs/resources/copyZipIntoItem.js +53 -0
- package/dist/cjs/resources/copyZipIntoItem.js.map +1 -0
- package/dist/cjs/resources/createCopyResults.d.ts +25 -0
- package/dist/cjs/resources/createCopyResults.js +36 -0
- package/dist/cjs/resources/createCopyResults.js.map +1 -0
- package/dist/cjs/resources/get-blob.d.ts +25 -0
- package/dist/cjs/resources/get-blob.js +42 -0
- package/dist/cjs/resources/get-blob.js.map +1 -0
- package/dist/cjs/resources/getItemResourcesFilesFromPaths.d.ts +25 -0
- package/dist/cjs/resources/getItemResourcesFilesFromPaths.js +49 -0
- package/dist/cjs/resources/getItemResourcesFilesFromPaths.js.map +1 -0
- package/dist/cjs/resources/getItemResourcesPaths.d.ts +27 -0
- package/dist/cjs/resources/getItemResourcesPaths.js +80 -0
- package/dist/cjs/resources/getItemResourcesPaths.js.map +1 -0
- package/dist/cjs/resources/index.d.ts +30 -0
- package/dist/cjs/resources/index.js +34 -0
- package/dist/cjs/resources/index.js.map +1 -0
- package/dist/cjs/resources/solution-resource.d.ts +35 -0
- package/dist/cjs/resources/solution-resource.js +31 -0
- package/dist/cjs/resources/solution-resource.js.map +1 -0
- package/dist/cjs/resources/transform-resource-paths-to-solution-resources.d.ts +56 -0
- package/dist/cjs/resources/transform-resource-paths-to-solution-resources.js +140 -0
- package/dist/cjs/resources/transform-resource-paths-to-solution-resources.js.map +1 -0
- package/dist/cjs/resources/update-resource.d.ts +27 -0
- package/dist/cjs/resources/update-resource.js +52 -0
- package/dist/cjs/resources/update-resource.js.map +1 -0
- package/dist/cjs/restHelpers.d.ts +634 -0
- package/dist/cjs/restHelpers.js +2008 -0
- package/dist/cjs/restHelpers.js.map +1 -0
- package/dist/cjs/restHelpersGet.d.ts +303 -0
- package/dist/cjs/restHelpersGet.js +835 -0
- package/dist/cjs/restHelpersGet.js.map +1 -0
- package/dist/cjs/sharing/index.d.ts +16 -0
- package/dist/cjs/sharing/index.js +20 -0
- package/dist/cjs/sharing/index.js.map +1 -0
- package/dist/cjs/sharing/share-item-to-groups.d.ts +26 -0
- package/dist/cjs/sharing/share-item-to-groups.js +44 -0
- package/dist/cjs/sharing/share-item-to-groups.js.map +1 -0
- package/dist/cjs/templatization.d.ts +139 -0
- package/dist/cjs/templatization.js +311 -0
- package/dist/cjs/templatization.js.map +1 -0
- package/dist/cjs/trackingHelpers.d.ts +115 -0
- package/dist/cjs/trackingHelpers.js +212 -0
- package/dist/cjs/trackingHelpers.js.map +1 -0
- package/dist/cjs/velocityHelpers.d.ts +68 -0
- package/dist/cjs/velocityHelpers.js +151 -0
- package/dist/cjs/velocityHelpers.js.map +1 -0
- package/dist/cjs/webtoolHelpers.d.ts +57 -0
- package/dist/cjs/webtoolHelpers.js +102 -0
- package/dist/cjs/webtoolHelpers.js.map +1 -0
- package/dist/cjs/workflowHelpers.d.ts +112 -0
- package/dist/cjs/workflowHelpers.js +284 -0
- package/dist/cjs/workflowHelpers.js.map +1 -0
- package/dist/cjs/workforceHelpers.d.ts +121 -0
- package/dist/cjs/workforceHelpers.js +720 -0
- package/dist/cjs/workforceHelpers.js.map +1 -0
- package/dist/cjs/zip-utils.d.ts +85 -0
- package/dist/cjs/zip-utils.js +154 -0
- package/dist/cjs/zip-utils.js.map +1 -0
- package/dist/esm/arcgisRestJS.d.ts +63 -0
- package/dist/esm/arcgisRestJS.js +110 -0
- package/dist/esm/arcgisRestJS.js.map +1 -0
- package/dist/esm/completeItem.d.ts +30 -0
- package/dist/esm/completeItem.js +67 -0
- package/dist/esm/completeItem.js.map +1 -0
- package/dist/esm/create-hub-request-options.d.ts +29 -0
- package/dist/esm/create-hub-request-options.js +60 -0
- package/dist/esm/create-hub-request-options.js.map +1 -0
- package/dist/esm/deleteHelpers/deleteEmptyGroups.d.ts +24 -0
- package/dist/esm/deleteHelpers/deleteEmptyGroups.js +38 -0
- package/dist/esm/deleteHelpers/deleteEmptyGroups.js.map +1 -0
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.d.ts +27 -0
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js +95 -0
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js.map +1 -0
- package/dist/esm/deleteHelpers/deleteSolutionContents.d.ts +39 -0
- package/dist/esm/deleteHelpers/deleteSolutionContents.js +122 -0
- package/dist/esm/deleteHelpers/deleteSolutionContents.js.map +1 -0
- package/dist/esm/deleteHelpers/deleteSolutionFolder.d.ts +29 -0
- package/dist/esm/deleteHelpers/deleteSolutionFolder.js +77 -0
- package/dist/esm/deleteHelpers/deleteSolutionFolder.js.map +1 -0
- package/dist/esm/deleteHelpers/deleteSolutionItem.d.ts +31 -0
- package/dist/esm/deleteHelpers/deleteSolutionItem.js +48 -0
- package/dist/esm/deleteHelpers/deleteSolutionItem.js.map +1 -0
- package/dist/esm/deleteHelpers/index.d.ts +22 -0
- package/dist/esm/deleteHelpers/index.js +23 -0
- package/dist/esm/deleteHelpers/index.js.map +1 -0
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.d.ts +27 -0
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js +29 -0
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js.map +1 -0
- package/dist/esm/deleteHelpers/removeItems.d.ts +35 -0
- package/dist/esm/deleteHelpers/removeItems.js +111 -0
- package/dist/esm/deleteHelpers/removeItems.js.map +1 -0
- package/dist/esm/deleteHelpers/reportProgress.d.ts +27 -0
- package/dist/esm/deleteHelpers/reportProgress.js +42 -0
- package/dist/esm/deleteHelpers/reportProgress.js.map +1 -0
- package/dist/esm/deleteSolution.d.ts +56 -0
- package/dist/esm/deleteSolution.js +101 -0
- package/dist/esm/deleteSolution.js.map +1 -0
- package/dist/esm/dependencies.d.ts +26 -0
- package/dist/esm/dependencies.js +167 -0
- package/dist/esm/dependencies.js.map +1 -0
- package/dist/esm/featureServiceHelpers.d.ts +847 -0
- package/dist/esm/featureServiceHelpers.js +2466 -0
- package/dist/esm/featureServiceHelpers.js.map +1 -0
- package/dist/esm/formHelpers.d.ts +26 -0
- package/dist/esm/formHelpers.js +35 -0
- package/dist/esm/formHelpers.js.map +1 -0
- package/dist/esm/generalHelpers.d.ts +447 -0
- package/dist/esm/generalHelpers.js +903 -0
- package/dist/esm/generalHelpers.js.map +1 -0
- package/dist/esm/get-subscription-info.d.ts +27 -0
- package/dist/esm/get-subscription-info.js +34 -0
- package/dist/esm/get-subscription-info.js.map +1 -0
- package/dist/esm/getDeletableSolutionInfo.d.ts +30 -0
- package/dist/esm/getDeletableSolutionInfo.js +48 -0
- package/dist/esm/getDeletableSolutionInfo.js.map +1 -0
- package/dist/esm/getItemTypeAbbrev.d.ts +19 -0
- package/dist/esm/getItemTypeAbbrev.js +182 -0
- package/dist/esm/getItemTypeAbbrev.js.map +1 -0
- package/dist/esm/getSolutionSummary.d.ts +28 -0
- package/dist/esm/getSolutionSummary.js +95 -0
- package/dist/esm/getSolutionSummary.js.map +1 -0
- package/dist/esm/index.d.ts +49 -0
- package/dist/esm/index.js +50 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/interfaces.d.ts +1446 -0
- package/dist/esm/interfaces.js +69 -0
- package/dist/esm/interfaces.js.map +1 -0
- package/dist/esm/item-reuse.d.ts +140 -0
- package/dist/esm/item-reuse.js +167 -0
- package/dist/esm/item-reuse.js.map +1 -0
- package/dist/esm/libConnectors.d.ts +73 -0
- package/dist/esm/libConnectors.js +105 -0
- package/dist/esm/libConnectors.js.map +1 -0
- package/dist/esm/migrations/apply-schema.d.ts +24 -0
- package/dist/esm/migrations/apply-schema.js +32 -0
- package/dist/esm/migrations/apply-schema.js.map +1 -0
- package/dist/esm/migrations/is-legacy-solution.d.ts +24 -0
- package/dist/esm/migrations/is-legacy-solution.js +35 -0
- package/dist/esm/migrations/is-legacy-solution.js.map +1 -0
- package/dist/esm/migrations/upgrade-three-dot-one.d.ts +26 -0
- package/dist/esm/migrations/upgrade-three-dot-one.js +44 -0
- package/dist/esm/migrations/upgrade-three-dot-one.js.map +1 -0
- package/dist/esm/migrations/upgrade-three-dot-zero.d.ts +27 -0
- package/dist/esm/migrations/upgrade-three-dot-zero.js +39 -0
- package/dist/esm/migrations/upgrade-three-dot-zero.js.map +1 -0
- package/dist/esm/migrations/upgrade-two-dot-five.d.ts +24 -0
- package/dist/esm/migrations/upgrade-two-dot-five.js +69 -0
- package/dist/esm/migrations/upgrade-two-dot-five.js.map +1 -0
- package/dist/esm/migrations/upgrade-two-dot-four.d.ts +24 -0
- package/dist/esm/migrations/upgrade-two-dot-four.js +68 -0
- package/dist/esm/migrations/upgrade-two-dot-four.js.map +1 -0
- package/dist/esm/migrations/upgrade-two-dot-one.d.ts +7 -0
- package/dist/esm/migrations/upgrade-two-dot-one.js +35 -0
- package/dist/esm/migrations/upgrade-two-dot-one.js.map +1 -0
- package/dist/esm/migrations/upgrade-two-dot-seven.d.ts +23 -0
- package/dist/esm/migrations/upgrade-two-dot-seven.js +54 -0
- package/dist/esm/migrations/upgrade-two-dot-seven.js.map +1 -0
- package/dist/esm/migrations/upgrade-two-dot-six.d.ts +27 -0
- package/dist/esm/migrations/upgrade-two-dot-six.js +57 -0
- package/dist/esm/migrations/upgrade-two-dot-six.js.map +1 -0
- package/dist/esm/migrations/upgrade-two-dot-three.d.ts +23 -0
- package/dist/esm/migrations/upgrade-two-dot-three.js +51 -0
- package/dist/esm/migrations/upgrade-two-dot-three.js.map +1 -0
- package/dist/esm/migrations/upgrade-two-dot-two.d.ts +23 -0
- package/dist/esm/migrations/upgrade-two-dot-two.js +54 -0
- package/dist/esm/migrations/upgrade-two-dot-two.js.map +1 -0
- package/dist/esm/migrations/upgrade-two-dot-zero.d.ts +44 -0
- package/dist/esm/migrations/upgrade-two-dot-zero.js +88 -0
- package/dist/esm/migrations/upgrade-two-dot-zero.js.map +1 -0
- package/dist/esm/migrator.d.ts +25 -0
- package/dist/esm/migrator.js +71 -0
- package/dist/esm/migrator.js.map +1 -0
- package/dist/esm/resourceHelpers.d.ts +192 -0
- package/dist/esm/resourceHelpers.js +361 -0
- package/dist/esm/resourceHelpers.js.map +1 -0
- package/dist/esm/resources/add-resource.d.ts +38 -0
- package/dist/esm/resources/add-resource.js +79 -0
- package/dist/esm/resources/add-resource.js.map +1 -0
- package/dist/esm/resources/addMetadataFromBlob.d.ts +25 -0
- package/dist/esm/resources/addMetadataFromBlob.js +39 -0
- package/dist/esm/resources/addMetadataFromBlob.js.map +1 -0
- package/dist/esm/resources/convert-item-resource-to-storage-resource.d.ts +32 -0
- package/dist/esm/resources/convert-item-resource-to-storage-resource.js +66 -0
- package/dist/esm/resources/convert-item-resource-to-storage-resource.js.map +1 -0
- package/dist/esm/resources/convert-storage-resource-to-item-resource.d.ts +29 -0
- package/dist/esm/resources/convert-storage-resource-to-item-resource.js +66 -0
- package/dist/esm/resources/convert-storage-resource-to-item-resource.js.map +1 -0
- package/dist/esm/resources/copyAssociatedFiles.d.ts +79 -0
- package/dist/esm/resources/copyAssociatedFiles.js +339 -0
- package/dist/esm/resources/copyAssociatedFiles.js.map +1 -0
- package/dist/esm/resources/copyDataIntoItem.d.ts +34 -0
- package/dist/esm/resources/copyDataIntoItem.js +40 -0
- package/dist/esm/resources/copyDataIntoItem.js.map +1 -0
- package/dist/esm/resources/copyMetadataIntoItem.d.ts +27 -0
- package/dist/esm/resources/copyMetadataIntoItem.js +40 -0
- package/dist/esm/resources/copyMetadataIntoItem.js.map +1 -0
- package/dist/esm/resources/copyResourceIntoZip.d.ts +34 -0
- package/dist/esm/resources/copyResourceIntoZip.js +69 -0
- package/dist/esm/resources/copyResourceIntoZip.js.map +1 -0
- package/dist/esm/resources/copyZipIntoItem.d.ts +26 -0
- package/dist/esm/resources/copyZipIntoItem.js +49 -0
- package/dist/esm/resources/copyZipIntoItem.js.map +1 -0
- package/dist/esm/resources/createCopyResults.d.ts +25 -0
- package/dist/esm/resources/createCopyResults.js +32 -0
- package/dist/esm/resources/createCopyResults.js.map +1 -0
- package/dist/esm/resources/get-blob.d.ts +25 -0
- package/dist/esm/resources/get-blob.js +38 -0
- package/dist/esm/resources/get-blob.js.map +1 -0
- package/dist/esm/resources/getItemResourcesFilesFromPaths.d.ts +25 -0
- package/dist/esm/resources/getItemResourcesFilesFromPaths.js +45 -0
- package/dist/esm/resources/getItemResourcesFilesFromPaths.js.map +1 -0
- package/dist/esm/resources/getItemResourcesPaths.d.ts +27 -0
- package/dist/esm/resources/getItemResourcesPaths.js +76 -0
- package/dist/esm/resources/getItemResourcesPaths.js.map +1 -0
- package/dist/esm/resources/index.d.ts +30 -0
- package/dist/esm/resources/index.js +31 -0
- package/dist/esm/resources/index.js.map +1 -0
- package/dist/esm/resources/solution-resource.d.ts +35 -0
- package/dist/esm/resources/solution-resource.js +28 -0
- package/dist/esm/resources/solution-resource.js.map +1 -0
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.d.ts +56 -0
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js +132 -0
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js.map +1 -0
- package/dist/esm/resources/update-resource.d.ts +27 -0
- package/dist/esm/resources/update-resource.js +48 -0
- package/dist/esm/resources/update-resource.js.map +1 -0
- package/dist/esm/restHelpers.d.ts +634 -0
- package/dist/esm/restHelpers.js +1943 -0
- package/dist/esm/restHelpers.js.map +1 -0
- package/dist/esm/restHelpersGet.d.ts +303 -0
- package/dist/esm/restHelpersGet.js +793 -0
- package/dist/esm/restHelpersGet.js.map +1 -0
- package/dist/esm/sharing/index.d.ts +16 -0
- package/dist/esm/sharing/index.js +17 -0
- package/dist/esm/sharing/index.js.map +1 -0
- package/dist/esm/sharing/share-item-to-groups.d.ts +26 -0
- package/dist/esm/sharing/share-item-to-groups.js +40 -0
- package/dist/esm/sharing/share-item-to-groups.js.map +1 -0
- package/dist/esm/templatization.d.ts +139 -0
- package/dist/esm/templatization.js +291 -0
- package/dist/esm/templatization.js.map +1 -0
- package/dist/esm/trackingHelpers.d.ts +115 -0
- package/dist/esm/trackingHelpers.js +200 -0
- package/dist/esm/trackingHelpers.js.map +1 -0
- package/dist/esm/velocityHelpers.d.ts +68 -0
- package/dist/esm/velocityHelpers.js +144 -0
- package/dist/esm/velocityHelpers.js.map +1 -0
- package/dist/esm/webtoolHelpers.d.ts +57 -0
- package/dist/esm/webtoolHelpers.js +95 -0
- package/dist/esm/webtoolHelpers.js.map +1 -0
- package/dist/esm/workflowHelpers.d.ts +112 -0
- package/dist/esm/workflowHelpers.js +270 -0
- package/dist/esm/workflowHelpers.js.map +1 -0
- package/dist/esm/workforceHelpers.d.ts +121 -0
- package/dist/esm/workforceHelpers.js +691 -0
- package/dist/esm/workforceHelpers.js.map +1 -0
- package/dist/esm/zip-utils.d.ts +85 -0
- package/dist/esm/zip-utils.js +142 -0
- package/dist/esm/zip-utils.js.map +1 -0
- package/dist/solution.js_commit.txt +7 -0
- package/package.json +2 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2018 Esri
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { getProp } from "../generalHelpers";
|
|
17
|
+
import { cloneObject } from "@esri/hub-common";
|
|
18
|
+
/**
|
|
19
|
+
* Migrate Hub assets structure to resource paths
|
|
20
|
+
*
|
|
21
|
+
* @param model
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export function _upgradeTwoDotThree(model) {
|
|
25
|
+
if (getProp(model, "item.properties.schemaVersion") >= 2.3) {
|
|
26
|
+
return model;
|
|
27
|
+
}
|
|
28
|
+
const clone = cloneObject(model);
|
|
29
|
+
// rename template.resources => template.assets
|
|
30
|
+
// this has landed in Hub, so we have actual items like this :(
|
|
31
|
+
// we will have another schema upgrade that will re-create the
|
|
32
|
+
// resources array
|
|
33
|
+
clone.data.templates = clone.data.templates.map((tmpl) => {
|
|
34
|
+
if (tmpl.resources) {
|
|
35
|
+
tmpl.assets = tmpl.resources.map((r) => {
|
|
36
|
+
return {
|
|
37
|
+
name: r,
|
|
38
|
+
type: "resource",
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
delete tmpl.resources;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
tmpl.assets = [];
|
|
45
|
+
}
|
|
46
|
+
return tmpl;
|
|
47
|
+
});
|
|
48
|
+
clone.item.properties.schemaVersion = 2.3;
|
|
49
|
+
return clone;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=upgrade-two-dot-three.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-two-dot-three.js","sourceRoot":"","sources":["../../../src/migrations/upgrade-two-dot-three.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAoB;IACtD,IAAI,OAAO,CAAC,KAAK,EAAE,+BAA+B,CAAC,IAAI,GAAG,EAAE;QAC1D,OAAO,KAAK,CAAC;KACd;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAEjC,+CAA+C;IAC/C,+DAA+D;IAC/D,8DAA8D;IAC9D,kBAAkB;IAClB,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACvD,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBACrC,OAAO;oBACL,IAAI,EAAE,CAAC;oBACP,IAAI,EAAE,UAAU;iBACjB,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,SAAS,CAAC;SACvB;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;SAClB;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,GAAG,GAAG,CAAC;IAC1C,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2018 Esri
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { ISolutionItem } from "../interfaces";
|
|
17
|
+
/**
|
|
18
|
+
* Swap tokens from Hub Solutions
|
|
19
|
+
*
|
|
20
|
+
* @param model
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
export declare function _upgradeTwoDotTwo(model: ISolutionItem): ISolutionItem;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2018 Esri
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { getProp } from "../generalHelpers";
|
|
17
|
+
import { deepStringReplace, cloneObject } from "@esri/hub-common";
|
|
18
|
+
/**
|
|
19
|
+
* Swap tokens from Hub Solutions
|
|
20
|
+
*
|
|
21
|
+
* @param model
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export function _upgradeTwoDotTwo(model) {
|
|
25
|
+
if (getProp(model, "item.properties.schemaVersion") >= 2.2) {
|
|
26
|
+
return model;
|
|
27
|
+
}
|
|
28
|
+
const clone = cloneObject(model);
|
|
29
|
+
// NOTE: Not all of these have closing `}}` and that is intentional
|
|
30
|
+
const swaps = [
|
|
31
|
+
{ src: "{{solution.name}}", val: "{{solution.title}}" },
|
|
32
|
+
{ src: "{{initiative.name}}", val: "{{solution.title}}" },
|
|
33
|
+
{ src: "{{initiative.title}}", val: "{{solution.title}}" },
|
|
34
|
+
{ src: "{{initiative.extent}}", val: "{{organization.defaultExtentBBox}}" },
|
|
35
|
+
{
|
|
36
|
+
src: "{{initiative.collaborationGroupId",
|
|
37
|
+
val: "{{teams.collaborationGroupId",
|
|
38
|
+
},
|
|
39
|
+
{ src: "{{initiative.openDataGroupId", val: "{{teams.contentGroupId" },
|
|
40
|
+
{ src: "{{initiative.contentGroupId", val: "{{teams.contentGroupId" },
|
|
41
|
+
{ src: "{{initiative.followersGroupId", val: "{{teams.followersGroupId" },
|
|
42
|
+
{ src: "{{collaborationGroupId", val: "{{teams.collaborationGroupId" },
|
|
43
|
+
{ src: "{{contentGroupId", val: "{{teams.contentGroupId" },
|
|
44
|
+
{ src: "{{followersGroupId", val: "{{teams.followersGroupId" },
|
|
45
|
+
{ src: "{{initiative.id", val: "{{initiative.item.id" },
|
|
46
|
+
{ src: "{{organization.portalBaseUrl", val: "{{portalBaseUrl" },
|
|
47
|
+
];
|
|
48
|
+
swaps.forEach((swap) => {
|
|
49
|
+
clone.data = deepStringReplace(clone.data, swap.src, swap.val);
|
|
50
|
+
});
|
|
51
|
+
clone.item.properties.schemaVersion = 2.2;
|
|
52
|
+
return clone;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=upgrade-two-dot-two.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-two-dot-two.js","sourceRoot":"","sources":["../../../src/migrations/upgrade-two-dot-two.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAoB;IACpD,IAAI,OAAO,CAAC,KAAK,EAAE,+BAA+B,CAAC,IAAI,GAAG,EAAE;QAC1D,OAAO,KAAK,CAAC;KACd;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,mEAAmE;IACnE,MAAM,KAAK,GAAG;QACZ,EAAE,GAAG,EAAE,mBAAmB,EAAE,GAAG,EAAE,oBAAoB,EAAE;QACvD,EAAE,GAAG,EAAE,qBAAqB,EAAE,GAAG,EAAE,oBAAoB,EAAE;QACzD,EAAE,GAAG,EAAE,sBAAsB,EAAE,GAAG,EAAE,oBAAoB,EAAE;QAC1D,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,EAAE,oCAAoC,EAAE;QAC3E;YACE,GAAG,EAAE,mCAAmC;YACxC,GAAG,EAAE,8BAA8B;SACpC;QACD,EAAE,GAAG,EAAE,8BAA8B,EAAE,GAAG,EAAE,wBAAwB,EAAE;QACtE,EAAE,GAAG,EAAE,6BAA6B,EAAE,GAAG,EAAE,wBAAwB,EAAE;QACrE,EAAE,GAAG,EAAE,+BAA+B,EAAE,GAAG,EAAE,0BAA0B,EAAE;QACzE,EAAE,GAAG,EAAE,wBAAwB,EAAE,GAAG,EAAE,8BAA8B,EAAE;QACtE,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,wBAAwB,EAAE;QAC1D,EAAE,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,0BAA0B,EAAE;QAC9D,EAAE,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,sBAAsB,EAAE;QACvD,EAAE,GAAG,EAAE,8BAA8B,EAAE,GAAG,EAAE,iBAAiB,EAAE;KAChE,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,KAAK,CAAC,IAAI,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAsB,CAAC;IACtF,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,GAAG,GAAG,CAAC;IAC1C,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert indicator "definitions" from the CAS style to the Indicator schema
|
|
3
|
+
* see https://github.com/ArcGIS/Hub/blob/master/indicators.md
|
|
4
|
+
*
|
|
5
|
+
* @param model
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
export declare function _upgradeTwoDotZero(model: any): any;
|
|
9
|
+
/**
|
|
10
|
+
* Given the Indicators entry from a CAS configurationSettings array,
|
|
11
|
+
* convert to an indicators object in the new schema
|
|
12
|
+
*
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
15
|
+
export declare function _convertIndicatorsToDefinitions(indicatorsHash?: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* Convert a CAS formatted indicator to the .definition in the new schama
|
|
18
|
+
*
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
export declare const _convertIndicatorToDefinition: (ind: any) => {
|
|
22
|
+
id: any;
|
|
23
|
+
type: string;
|
|
24
|
+
name: any;
|
|
25
|
+
optional: any;
|
|
26
|
+
definition: {
|
|
27
|
+
description: any;
|
|
28
|
+
supportedTypes: any[];
|
|
29
|
+
geometryTypes: any[];
|
|
30
|
+
fields: any;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Convert the CAS formatted "field" into the new schema
|
|
35
|
+
*
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
export declare const _convertIndicatorField: (field: any) => {
|
|
39
|
+
id: any;
|
|
40
|
+
name: any;
|
|
41
|
+
optional: any;
|
|
42
|
+
description: any;
|
|
43
|
+
supportedTypes: any[];
|
|
44
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2020 Esri
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { getProp, cloneObject } from "@esri/hub-common";
|
|
17
|
+
/**
|
|
18
|
+
* Convert indicator "definitions" from the CAS style to the Indicator schema
|
|
19
|
+
* see https://github.com/ArcGIS/Hub/blob/master/indicators.md
|
|
20
|
+
*
|
|
21
|
+
* @param model
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export function _upgradeTwoDotZero(model) {
|
|
25
|
+
if (getProp(model, "item.properties.schemaVersion") >= 2) {
|
|
26
|
+
return model;
|
|
27
|
+
}
|
|
28
|
+
// get the indicators from the .configurationSettings...
|
|
29
|
+
const clone = cloneObject(model);
|
|
30
|
+
const configSettings = getProp(clone, "data.configurationSettings") || [];
|
|
31
|
+
const indicatorsHash = configSettings.find((e) => e.category === "Indicators");
|
|
32
|
+
clone.data.indicators = _convertIndicatorsToDefinitions(indicatorsHash);
|
|
33
|
+
// remove CAS structure
|
|
34
|
+
delete clone.data.configurationSettings;
|
|
35
|
+
// set the schemaVersion...
|
|
36
|
+
clone.item.properties.schemaVersion = 2;
|
|
37
|
+
return clone;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Given the Indicators entry from a CAS configurationSettings array,
|
|
41
|
+
* convert to an indicators object in the new schema
|
|
42
|
+
*
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
export function _convertIndicatorsToDefinitions(indicatorsHash = {}) {
|
|
46
|
+
// the incoming structure should have a .fields property, and what we want will be in there...
|
|
47
|
+
if (!indicatorsHash.fields || !Array.isArray(indicatorsHash.fields)) {
|
|
48
|
+
indicatorsHash.fields = [];
|
|
49
|
+
}
|
|
50
|
+
const defs = indicatorsHash.fields.map(_convertIndicatorToDefinition);
|
|
51
|
+
// now we need to create an object which has props for each def
|
|
52
|
+
return defs;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Convert a CAS formatted indicator to the .definition in the new schama
|
|
56
|
+
*
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
export const _convertIndicatorToDefinition = function (ind) {
|
|
60
|
+
const def = {
|
|
61
|
+
id: ind.fieldName,
|
|
62
|
+
type: "Data",
|
|
63
|
+
name: ind.label || ind.fieldName,
|
|
64
|
+
optional: ind.optional || false,
|
|
65
|
+
definition: {
|
|
66
|
+
description: ind.label || ind.fieldName,
|
|
67
|
+
supportedTypes: [].concat(ind.layerOptions.supportedTypes),
|
|
68
|
+
geometryTypes: [].concat(ind.layerOptions.geometryTypes),
|
|
69
|
+
fields: ind.fields.map(_convertIndicatorField),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
return def;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Convert the CAS formatted "field" into the new schema
|
|
76
|
+
*
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
export const _convertIndicatorField = function (field) {
|
|
80
|
+
return {
|
|
81
|
+
id: field.fieldName,
|
|
82
|
+
name: field.label,
|
|
83
|
+
optional: field.optional || false,
|
|
84
|
+
description: field.tooltip,
|
|
85
|
+
supportedTypes: [].concat(field.supportedTypes),
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=upgrade-two-dot-zero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-two-dot-zero.js","sourceRoot":"","sources":["../../../src/migrations/upgrade-two-dot-zero.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAU;IAC3C,IAAI,OAAO,CAAC,KAAK,EAAE,+BAA+B,CAAC,IAAI,CAAC,EAAE;QACxD,OAAO,KAAK,CAAC;KACd;IACD,wDAAwD;IACxD,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,MAAM,cAAc,GAAG,OAAO,CAAC,KAAK,EAAE,4BAA4B,CAAC,IAAI,EAAE,CAAC;IAE1E,MAAM,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC;IACpF,KAAK,CAAC,IAAI,CAAC,UAAU,GAAG,+BAA+B,CAAC,cAAc,CAAC,CAAC;IACxE,uBAAuB;IACvB,OAAO,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC;IAExC,2BAA2B;IAC3B,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,GAAG,CAAC,CAAC;IACxC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,+BAA+B,CAAC,iBAAsB,EAAE;IACtE,8FAA8F;IAC9F,IAAI,CAAC,cAAc,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;QACnE,cAAc,CAAC,MAAM,GAAG,EAAE,CAAC;KAC5B;IACD,MAAM,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IACtE,+DAA+D;IAC/D,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,UAAU,GAAQ;IAC7D,MAAM,GAAG,GAAG;QACV,EAAE,EAAE,GAAG,CAAC,SAAS;QACjB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,SAAS;QAChC,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,KAAK;QAC/B,UAAU,EAAE;YACV,WAAW,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,SAAS;YACvC,cAAc,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,cAAc,CAAC;YAC1D,aAAa,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC;YACxD,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC;SAC/C;KACF,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,KAAU;IACxD,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,SAAS;QACnB,IAAI,EAAE,KAAK,CAAC,KAAK;QACjB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK;QACjC,WAAW,EAAE,KAAK,CAAC,OAAO;QAC1B,cAAc,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC;KAChD,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2018 Esri
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { ISolutionItem } from "./interfaces";
|
|
17
|
+
export declare const CURRENT_SCHEMA_VERSION = 3;
|
|
18
|
+
/**
|
|
19
|
+
* Apply schema migrations to a Solution item
|
|
20
|
+
* This system allows the schema of the Solution item to change over time
|
|
21
|
+
* while abstracting those changes into a single set of functional transforms
|
|
22
|
+
*
|
|
23
|
+
* @param model ISolutionItem
|
|
24
|
+
*/
|
|
25
|
+
export declare function migrateSchema(model: ISolutionItem): Promise<ISolutionItem>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2018 Esri
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { _isLegacySolution } from "./migrations/is-legacy-solution";
|
|
17
|
+
import { _applySchema } from "./migrations/apply-schema";
|
|
18
|
+
import { _upgradeTwoDotZero } from "./migrations/upgrade-two-dot-zero";
|
|
19
|
+
import { _upgradeTwoDotOne } from "./migrations/upgrade-two-dot-one";
|
|
20
|
+
import { _upgradeTwoDotTwo } from "./migrations/upgrade-two-dot-two";
|
|
21
|
+
import { _upgradeTwoDotThree } from "./migrations/upgrade-two-dot-three";
|
|
22
|
+
import { _upgradeTwoDotFour } from "./migrations/upgrade-two-dot-four";
|
|
23
|
+
import { _upgradeTwoDotFive } from "./migrations/upgrade-two-dot-five";
|
|
24
|
+
import { _upgradeTwoDotSix } from "./migrations/upgrade-two-dot-six";
|
|
25
|
+
import { _upgradeTwoDotSeven } from "./migrations/upgrade-two-dot-seven";
|
|
26
|
+
import { _upgradeThreeDotZero } from "./migrations/upgrade-three-dot-zero";
|
|
27
|
+
import { getProp } from "@esri/hub-common";
|
|
28
|
+
// Starting at 3.0 because Hub has been versioning Solution items up to 2.x
|
|
29
|
+
export const CURRENT_SCHEMA_VERSION = 3.0;
|
|
30
|
+
/**
|
|
31
|
+
* Apply schema migrations to a Solution item
|
|
32
|
+
* This system allows the schema of the Solution item to change over time
|
|
33
|
+
* while abstracting those changes into a single set of functional transforms
|
|
34
|
+
*
|
|
35
|
+
* @param model ISolutionItem
|
|
36
|
+
*/
|
|
37
|
+
export function migrateSchema(model) {
|
|
38
|
+
// ensure properties
|
|
39
|
+
if (!getProp(model, "item.properties")) {
|
|
40
|
+
model.item.properties = {};
|
|
41
|
+
}
|
|
42
|
+
const modelVersion = getProp(model, "item.properties.schemaVersion");
|
|
43
|
+
// if it's already on the current version, return it
|
|
44
|
+
if (modelVersion === CURRENT_SCHEMA_VERSION) {
|
|
45
|
+
return Promise.resolve(model);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
// check if this is a legacy solution created by Hub
|
|
49
|
+
const isLegacy = _isLegacySolution(model);
|
|
50
|
+
const schemaUpgrades = [];
|
|
51
|
+
// if this is a Solution.js "native" item, it is already at 3.0
|
|
52
|
+
if (!modelVersion && !isLegacy) {
|
|
53
|
+
// apply the 3.0+ transforms
|
|
54
|
+
// TEMP to allow merge to develop w/o breaking things
|
|
55
|
+
schemaUpgrades.push(_upgradeThreeDotZero);
|
|
56
|
+
// schemaUpgrades.push(_upgradeThreeDotZero, _upgradeThreeDotOne);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
// Hub created a set of Solution items that are not 100% compatible
|
|
60
|
+
// with the Solution.js deployer.
|
|
61
|
+
schemaUpgrades.push(_applySchema, _upgradeTwoDotZero, _upgradeTwoDotOne, _upgradeTwoDotTwo, _upgradeTwoDotThree, _upgradeTwoDotFour, _upgradeTwoDotFive, _upgradeTwoDotSix, _upgradeTwoDotSeven);
|
|
62
|
+
// Apply the 3.x upgrades
|
|
63
|
+
schemaUpgrades.push(_upgradeThreeDotZero);
|
|
64
|
+
}
|
|
65
|
+
// Run any migrations serially. Since we start with a promise,
|
|
66
|
+
// individual migrations are free to return either ISolutionItem
|
|
67
|
+
// or Promise<ISolutionItem>
|
|
68
|
+
return schemaUpgrades.reduce((promise, upgradeFn) => promise.then((updatedModel) => upgradeFn(updatedModel)), Promise.resolve(model));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=migrator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrator.js","sourceRoot":"","sources":["../../src/migrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAI3E,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,2EAA2E;AAC3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAoB;IAChD,oBAAoB;IACpB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAE;QACtC,KAAK,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;KAC5B;IAED,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,EAAE,+BAA+B,CAAC,CAAC;IACrE,oDAAoD;IACpD,IAAI,YAAY,KAAK,sBAAsB,EAAE;QAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAC/B;SAAM;QACL,oDAAoD;QACpD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,cAAc,GAAG,EAAE,CAAC;QAE1B,+DAA+D;QAC/D,IAAI,CAAC,YAAY,IAAI,CAAC,QAAQ,EAAE;YAC9B,4BAA4B;YAC5B,qDAAqD;YACrD,cAAc,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;YAC1C,kEAAkE;SACnE;aAAM;YACL,mEAAmE;YACnE,iCAAiC;YACjC,cAAc,CAAC,IAAI,CACjB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,CACpB,CAAC;YACF,yBAAyB;YACzB,cAAc,CAAC,IAAI,CACjB,oBAAoB,CAErB,CAAC;SACH;QACD,8DAA8D;QAC9D,gEAAgE;QAChE,4BAA4B;QAC5B,OAAO,cAAc,CAAC,MAAM,CAC1B,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,YAA2B,EAAE,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,EAC9F,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CACvB,CAAC;KACH;AACH,CAAC"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2018 Esri
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Provides common functions involving the management of item and group resources.
|
|
18
|
+
*
|
|
19
|
+
* @module resourceHelpers
|
|
20
|
+
*
|
|
21
|
+
* How it works
|
|
22
|
+
*
|
|
23
|
+
* An item may have resources that are listed as a set of filenames and/or folder/filename combinations. It may have
|
|
24
|
+
* a thumbnail, listed in its item info as a filename or folder/filename combination. It may have metadata, which is
|
|
25
|
+
* not listed, but has a distinct URL. A group may have a thumbnail, but not the others.
|
|
26
|
+
*
|
|
27
|
+
* For storing these files in a common storage item, a new folder and filename combination is created for each. The
|
|
28
|
+
* filename is kept as-is. The folder consists of the source item's id and an optional suffix. For thumbnails, the
|
|
29
|
+
* suffix is "_info_thumbnail"; for metadata, the suffix is "_info_metadata"; for resources, the suffix is "_" plus
|
|
30
|
+
* the resource's folder's name; if the resource doesn't have a folder, there is no suffix.
|
|
31
|
+
*
|
|
32
|
+
* Note that "thumbnail" is included in an item's thumbnail property like a folder (e.g., "thumbnail/thumbnail.png"),
|
|
33
|
+
* and the item's thumbnail is accessed using a path such as "%lt;itemId>/info/thumbnail/thumbnail.png". Groups,
|
|
34
|
+
* on the other hand, have a property with a simple name (e.g., "thumbnail.png") and it is accessed using a path
|
|
35
|
+
* such as "%lt;groupId>/info/thumbnail.png".
|
|
36
|
+
*
|
|
37
|
+
* For copying these files from the common storage item to another item, one converts the unique names back into the
|
|
38
|
+
* original names (or the special cases for thumbnails and metadata).
|
|
39
|
+
*
|
|
40
|
+
* Routines are provided to
|
|
41
|
+
* 1. create full URLs to resources, thumbnails, and metadata.
|
|
42
|
+
* 2. create a folder and filename combination that uniquely identifies these files for
|
|
43
|
+
* storing them in a single, shared storage item
|
|
44
|
+
* 3. copy a set of resources, thumbnails, and metadata for an item to a storage item
|
|
45
|
+
* 4. copy a file by URL to an item using specified folder and filename
|
|
46
|
+
* 5. undo the unique folder and filename into the original folder and filename
|
|
47
|
+
*/
|
|
48
|
+
import { IDeployFileCopyPath, IFileMimeTyped, ISourceFile, ISourceFileCopyPath } from "./interfaces";
|
|
49
|
+
import { IItemResourceResponse, UserSession } from "./arcgisRestJS";
|
|
50
|
+
export declare function addThumbnailFromBlob(blob: any, itemId: string, authentication: UserSession, isGroup?: boolean): Promise<any>;
|
|
51
|
+
export declare function convertBlobToSupportableResource(blob: Blob, filename?: string): IFileMimeTyped;
|
|
52
|
+
/**
|
|
53
|
+
* Copies the files described by a list of full URLs and folder/filename combinations for
|
|
54
|
+
* the resources and metadata of an item or group to an item.
|
|
55
|
+
*
|
|
56
|
+
* @param storageAuthentication Credentials for the request to the storage
|
|
57
|
+
* @param filePaths List of item files' URLs and folder/filenames for storing the files
|
|
58
|
+
* @param sourceItemId Id of item supplying resource/metadata
|
|
59
|
+
* @param destinationFolderId Id of folder
|
|
60
|
+
* @param destinationItemId Id of item to receive copy of resource/metadata
|
|
61
|
+
* @param destinationAuthentication Credentials for the request to the destination
|
|
62
|
+
* @param template Description of item that will receive files
|
|
63
|
+
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
64
|
+
* @returns A promise which resolves to a boolean indicating if the copies were successful
|
|
65
|
+
*/
|
|
66
|
+
export declare function copyFilesFromStorageItem(storageAuthentication: UserSession, filePaths: IDeployFileCopyPath[], sourceItemId: string, destinationFolderId: string, destinationItemId: string, destinationAuthentication: UserSession, template?: any, templateDictionary?: any): Promise<boolean>;
|
|
67
|
+
/**
|
|
68
|
+
* Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
|
|
69
|
+
* with a specified path.
|
|
70
|
+
*
|
|
71
|
+
* @param files List of item files and paths for storing the files
|
|
72
|
+
* @param storageItemId Id of item to receive copy of resource/metadata
|
|
73
|
+
* @param storageAuthentication Credentials for the request to the storage
|
|
74
|
+
* @returns A promise which resolves to a list of the filenames under which the resource/metadata are stored
|
|
75
|
+
*/
|
|
76
|
+
export declare function copyFilesToStorageItem(files: ISourceFile[], storageItemId: string, storageAuthentication: UserSession): Promise<string[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Generates a folder and filename for storing a copy of an item's metadata in a storage item.
|
|
79
|
+
*
|
|
80
|
+
* @param itemId Id of item
|
|
81
|
+
* @returns Folder and filename for storage; folder is the itemID suffixed with "_info_metadata"
|
|
82
|
+
* @see convertStorageResourceToItemResource
|
|
83
|
+
*/
|
|
84
|
+
export declare function generateMetadataStorageFilename(itemId: string): {
|
|
85
|
+
folder: string;
|
|
86
|
+
filename: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Generates a list of full URLs and storage folder/filename combinations for storing the resources, metadata,
|
|
90
|
+
* and thumbnail of an item.
|
|
91
|
+
*
|
|
92
|
+
* @param portalSharingUrl Server/sharing
|
|
93
|
+
* @param itemId Id of item
|
|
94
|
+
* @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
|
|
95
|
+
* @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
|
|
96
|
+
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
97
|
+
* @param storageVersion Version of the Solution template
|
|
98
|
+
* @returns List of item files' URLs and folder/filenames for storing the files
|
|
99
|
+
*/
|
|
100
|
+
export declare function generateSourceFilePaths(portalSharingUrl: string, itemId: string, thumbnailUrlPart: string, resourceFilenames: string[], isGroup?: boolean, storageVersion?: number): ISourceFileCopyPath[];
|
|
101
|
+
/**
|
|
102
|
+
* Generates the full URL and storage folder/filename for storing an item's thumbnail.
|
|
103
|
+
*
|
|
104
|
+
* @param portalSharingUrl Server/sharing
|
|
105
|
+
* @param itemId Id of item
|
|
106
|
+
* @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
|
|
107
|
+
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
108
|
+
* @returns URL and folder/filename for storing the thumbnail
|
|
109
|
+
*/
|
|
110
|
+
export declare function generateSourceThumbnailPath(portalSharingUrl: string, itemId: string, thumbnailUrlPart: string, isGroup?: boolean): ISourceFileCopyPath;
|
|
111
|
+
/**
|
|
112
|
+
* Generates the URL for reading an item's metadata.
|
|
113
|
+
*
|
|
114
|
+
* @param sourcePortalSharingUrl Server/sharing
|
|
115
|
+
* @param itemId Id of item
|
|
116
|
+
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
117
|
+
* @returns URL string
|
|
118
|
+
*/
|
|
119
|
+
export declare function generateSourceMetadataUrl(sourcePortalSharingUrl: string, itemId: string, isGroup?: boolean): string;
|
|
120
|
+
/**
|
|
121
|
+
* Generates the URL for reading an item's resource given the filename of the resource.
|
|
122
|
+
*
|
|
123
|
+
* @param sourcePortalSharingUrl Server/sharing
|
|
124
|
+
* @param itemId Id of item
|
|
125
|
+
* @param sourceResourceFilename Either filename or folder/filename to resource
|
|
126
|
+
* @returns URL string
|
|
127
|
+
*/
|
|
128
|
+
export declare function generateSourceResourceUrl(sourcePortalSharingUrl: string, itemId: string, sourceResourceFilename: string): string;
|
|
129
|
+
/**
|
|
130
|
+
* Generates the URL for reading an item's thumbnail.
|
|
131
|
+
*
|
|
132
|
+
* @param sourcePortalSharingUrl Server/sharing
|
|
133
|
+
* @param itemId Id of item
|
|
134
|
+
* @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
|
|
135
|
+
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
136
|
+
* @returns URL string
|
|
137
|
+
*/
|
|
138
|
+
export declare function generateSourceThumbnailUrl(sourcePortalSharingUrl: string, itemId: string, thumbnailUrlPart: string, isGroup?: boolean): string;
|
|
139
|
+
/**
|
|
140
|
+
* Generates a list of full URLs and folder/filename combinations used to store the resources, metadata,
|
|
141
|
+
* and thumbnail of an item.
|
|
142
|
+
*
|
|
143
|
+
* @param portalSharingUrl Server/sharing
|
|
144
|
+
* @param storageItemId Id of storage item
|
|
145
|
+
* @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
|
|
146
|
+
* @param storageVersion Version of the Solution template
|
|
147
|
+
* @returns List of item files' URLs and folder/filenames for storing the files
|
|
148
|
+
*/
|
|
149
|
+
export declare function generateStorageFilePaths(portalSharingUrl: string, storageItemId: string, resourceFilenames?: string[], storageVersion?: number): IDeployFileCopyPath[];
|
|
150
|
+
/**
|
|
151
|
+
* Generates a folder and filename for storing a copy of an item's thumbnail in a storage item.
|
|
152
|
+
*
|
|
153
|
+
* @param itemId Id of item
|
|
154
|
+
* @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON; can also be a filename
|
|
155
|
+
* @returns Folder and filename for storage; folder is the itemID suffixed with "_info_thumbnail";
|
|
156
|
+
* file is URI-encoded thumbnailUrlPart
|
|
157
|
+
* @see convertStorageResourceToItemResource
|
|
158
|
+
*/
|
|
159
|
+
export declare function generateThumbnailStorageFilename(itemId: string, thumbnailurl: string): {
|
|
160
|
+
folder: string;
|
|
161
|
+
filename: string;
|
|
162
|
+
};
|
|
163
|
+
export declare function isSupportedFileType(filename: string): boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Gets the thumbnail of an item or group.
|
|
166
|
+
*
|
|
167
|
+
* @param authentication Credentials for the request to the storage
|
|
168
|
+
* @param filePaths List of item files' URLs and folder/filenames for storing the files
|
|
169
|
+
* @returns A promise which resolves to a boolean indicating if the copies were successful
|
|
170
|
+
*/
|
|
171
|
+
export declare function getThumbnailFromStorageItem(authentication: UserSession, filePaths: IDeployFileCopyPath[]): Promise<File>;
|
|
172
|
+
/**
|
|
173
|
+
* Removes the item's resource that matches the filename with new content
|
|
174
|
+
*
|
|
175
|
+
* @param itemId Id of the item to remove
|
|
176
|
+
* @param filename Name of the resource file to remove
|
|
177
|
+
* @param authentication Credentials for the request to the storage
|
|
178
|
+
* @returns A promise which resolves with a success true/false response
|
|
179
|
+
*/
|
|
180
|
+
export declare function removeItemResourceFile(itemId: string, filename: string, authentication: UserSession): Promise<{
|
|
181
|
+
success: boolean;
|
|
182
|
+
}>;
|
|
183
|
+
/**
|
|
184
|
+
* Updates the item's resource that matches the filename with new content
|
|
185
|
+
*
|
|
186
|
+
* @param itemId Id of the item to update
|
|
187
|
+
* @param filename Name of the resource file to update; prefix optional (e.g., a/b/file.txt)
|
|
188
|
+
* @param resource The new content to update the resource with
|
|
189
|
+
* @param authentication Credentials for the request to the storage
|
|
190
|
+
* @returns A promise which resolves with a success true/false response
|
|
191
|
+
*/
|
|
192
|
+
export declare function updateItemResourceFile(itemId: string, filename: string, resource: File, authentication: UserSession): Promise<IItemResourceResponse>;
|