@esri/solution-common 3.0.0 → 3.1.0
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/esm/featureServiceHelpers.js +20 -2
- package/dist/esm/featureServiceHelpers.js.map +1 -1
- package/dist/esm/resourceHelpers.d.ts +3 -2
- package/dist/esm/resourceHelpers.js +4 -3
- package/dist/esm/resourceHelpers.js.map +1 -1
- package/dist/esm/resources/copyAssociatedFiles.d.ts +17 -2
- package/dist/esm/resources/copyAssociatedFiles.js +106 -42
- package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/esm/resources/copyResourceIntoZip.js +8 -1
- package/dist/esm/resources/copyResourceIntoZip.js.map +1 -1
- package/dist/esm/resources/getItemResourcesPaths.js +9 -2
- package/dist/esm/resources/getItemResourcesPaths.js.map +1 -1
- package/package.json +3 -3
- package/dist/node/completeItem.d.ts +0 -29
- package/dist/node/completeItem.js +0 -82
- package/dist/node/completeItem.js.map +0 -1
- package/dist/node/create-hub-request-options.d.ts +0 -29
- package/dist/node/create-hub-request-options.js +0 -64
- package/dist/node/create-hub-request-options.js.map +0 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.d.ts +0 -24
- package/dist/node/deleteHelpers/deleteEmptyGroups.js +0 -42
- package/dist/node/deleteHelpers/deleteEmptyGroups.js.map +0 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.d.ts +0 -27
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js +0 -97
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js.map +0 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.d.ts +0 -38
- package/dist/node/deleteHelpers/deleteSolutionContents.js +0 -130
- package/dist/node/deleteHelpers/deleteSolutionContents.js.map +0 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.d.ts +0 -29
- package/dist/node/deleteHelpers/deleteSolutionFolder.js +0 -79
- package/dist/node/deleteHelpers/deleteSolutionFolder.js.map +0 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.d.ts +0 -30
- package/dist/node/deleteHelpers/deleteSolutionItem.js +0 -54
- package/dist/node/deleteHelpers/deleteSolutionItem.js.map +0 -1
- package/dist/node/deleteHelpers/index.d.ts +0 -22
- package/dist/node/deleteHelpers/index.js +0 -26
- package/dist/node/deleteHelpers/index.js.map +0 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.d.ts +0 -27
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js +0 -34
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js.map +0 -1
- package/dist/node/deleteHelpers/removeItems.d.ts +0 -34
- package/dist/node/deleteHelpers/removeItems.js +0 -112
- package/dist/node/deleteHelpers/removeItems.js.map +0 -1
- package/dist/node/deleteHelpers/reportProgress.d.ts +0 -27
- package/dist/node/deleteHelpers/reportProgress.js +0 -46
- package/dist/node/deleteHelpers/reportProgress.js.map +0 -1
- package/dist/node/deleteSolution.d.ts +0 -55
- package/dist/node/deleteSolution.js +0 -107
- package/dist/node/deleteSolution.js.map +0 -1
- package/dist/node/dependencies.d.ts +0 -26
- package/dist/node/dependencies.js +0 -171
- package/dist/node/dependencies.js.map +0 -1
- package/dist/node/featureServiceHelpers.d.ts +0 -791
- package/dist/node/featureServiceHelpers.js +0 -2403
- package/dist/node/featureServiceHelpers.js.map +0 -1
- package/dist/node/generalHelpers.d.ts +0 -372
- package/dist/node/generalHelpers.js +0 -842
- package/dist/node/generalHelpers.js.map +0 -1
- package/dist/node/get-subscription-info.d.ts +0 -27
- package/dist/node/get-subscription-info.js +0 -39
- package/dist/node/get-subscription-info.js.map +0 -1
- package/dist/node/getDeletableSolutionInfo.d.ts +0 -29
- package/dist/node/getDeletableSolutionInfo.js +0 -53
- package/dist/node/getDeletableSolutionInfo.js.map +0 -1
- package/dist/node/getItemTypeAbbrev.d.ts +0 -19
- package/dist/node/getItemTypeAbbrev.js +0 -184
- package/dist/node/getItemTypeAbbrev.js.map +0 -1
- package/dist/node/getSolutionSummary.d.ts +0 -27
- package/dist/node/getSolutionSummary.js +0 -101
- package/dist/node/getSolutionSummary.js.map +0 -1
- package/dist/node/index.d.ts +0 -44
- package/dist/node/index.js +0 -48
- package/dist/node/index.js.map +0 -1
- package/dist/node/interfaces.d.ts +0 -1321
- package/dist/node/interfaces.js +0 -75
- package/dist/node/interfaces.js.map +0 -1
- package/dist/node/libConnectors.d.ts +0 -73
- package/dist/node/libConnectors.js +0 -115
- package/dist/node/libConnectors.js.map +0 -1
- package/dist/node/migrations/apply-schema.d.ts +0 -24
- package/dist/node/migrations/apply-schema.js +0 -36
- package/dist/node/migrations/apply-schema.js.map +0 -1
- package/dist/node/migrations/is-legacy-solution.d.ts +0 -24
- package/dist/node/migrations/is-legacy-solution.js +0 -40
- package/dist/node/migrations/is-legacy-solution.js.map +0 -1
- package/dist/node/migrations/upgrade-three-dot-one.d.ts +0 -27
- package/dist/node/migrations/upgrade-three-dot-one.js +0 -49
- package/dist/node/migrations/upgrade-three-dot-one.js.map +0 -1
- package/dist/node/migrations/upgrade-three-dot-zero.d.ts +0 -27
- package/dist/node/migrations/upgrade-three-dot-zero.js +0 -43
- package/dist/node/migrations/upgrade-three-dot-zero.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-five.d.ts +0 -24
- package/dist/node/migrations/upgrade-two-dot-five.js +0 -73
- package/dist/node/migrations/upgrade-two-dot-five.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-four.d.ts +0 -24
- package/dist/node/migrations/upgrade-two-dot-four.js +0 -72
- package/dist/node/migrations/upgrade-two-dot-four.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-one.d.ts +0 -7
- package/dist/node/migrations/upgrade-two-dot-one.js +0 -39
- package/dist/node/migrations/upgrade-two-dot-one.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-seven.d.ts +0 -23
- package/dist/node/migrations/upgrade-two-dot-seven.js +0 -58
- package/dist/node/migrations/upgrade-two-dot-seven.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-six.d.ts +0 -27
- package/dist/node/migrations/upgrade-two-dot-six.js +0 -61
- package/dist/node/migrations/upgrade-two-dot-six.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-three.d.ts +0 -23
- package/dist/node/migrations/upgrade-two-dot-three.js +0 -55
- package/dist/node/migrations/upgrade-two-dot-three.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-two.d.ts +0 -23
- package/dist/node/migrations/upgrade-two-dot-two.js +0 -58
- package/dist/node/migrations/upgrade-two-dot-two.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-zero.d.ts +0 -44
- package/dist/node/migrations/upgrade-two-dot-zero.js +0 -95
- package/dist/node/migrations/upgrade-two-dot-zero.js.map +0 -1
- package/dist/node/migrator.d.ts +0 -25
- package/dist/node/migrator.js +0 -77
- package/dist/node/migrator.js.map +0 -1
- package/dist/node/polyfills.d.ts +0 -40
- package/dist/node/polyfills.js +0 -98
- package/dist/node/polyfills.js.map +0 -1
- package/dist/node/resourceHelpers.d.ts +0 -190
- package/dist/node/resourceHelpers.js +0 -390
- package/dist/node/resourceHelpers.js.map +0 -1
- package/dist/node/resources/add-resource-from-blob.d.ts +0 -26
- package/dist/node/resources/add-resource-from-blob.js +0 -52
- package/dist/node/resources/add-resource-from-blob.js.map +0 -1
- package/dist/node/resources/addMetadataFromBlob.d.ts +0 -25
- package/dist/node/resources/addMetadataFromBlob.js +0 -43
- package/dist/node/resources/addMetadataFromBlob.js.map +0 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.d.ts +0 -32
- package/dist/node/resources/convert-item-resource-to-storage-resource.js +0 -70
- package/dist/node/resources/convert-item-resource-to-storage-resource.js.map +0 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.d.ts +0 -29
- package/dist/node/resources/convert-storage-resource-to-item-resource.js +0 -70
- package/dist/node/resources/convert-storage-resource-to-item-resource.js.map +0 -1
- package/dist/node/resources/copyAssociatedFiles.d.ts +0 -52
- package/dist/node/resources/copyAssociatedFiles.js +0 -237
- package/dist/node/resources/copyAssociatedFiles.js.map +0 -1
- package/dist/node/resources/copyDataIntoItem.d.ts +0 -33
- package/dist/node/resources/copyDataIntoItem.js +0 -63
- package/dist/node/resources/copyDataIntoItem.js.map +0 -1
- package/dist/node/resources/copyMetadataIntoItem.d.ts +0 -26
- package/dist/node/resources/copyMetadataIntoItem.js +0 -46
- package/dist/node/resources/copyMetadataIntoItem.js.map +0 -1
- package/dist/node/resources/copyResourceIntoZip.d.ts +0 -33
- package/dist/node/resources/copyResourceIntoZip.js +0 -71
- package/dist/node/resources/copyResourceIntoZip.js.map +0 -1
- package/dist/node/resources/copyZipIntoItem.d.ts +0 -25
- package/dist/node/resources/copyZipIntoItem.js +0 -54
- package/dist/node/resources/copyZipIntoItem.js.map +0 -1
- package/dist/node/resources/createCopyResults.d.ts +0 -25
- package/dist/node/resources/createCopyResults.js +0 -36
- package/dist/node/resources/createCopyResults.js.map +0 -1
- package/dist/node/resources/get-blob.d.ts +0 -26
- package/dist/node/resources/get-blob.js +0 -27
- package/dist/node/resources/get-blob.js.map +0 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.d.ts +0 -24
- package/dist/node/resources/getItemResourcesFilesFromPaths.js +0 -49
- package/dist/node/resources/getItemResourcesFilesFromPaths.js.map +0 -1
- package/dist/node/resources/getItemResourcesPaths.d.ts +0 -26
- package/dist/node/resources/getItemResourcesPaths.js +0 -66
- package/dist/node/resources/getItemResourcesPaths.js.map +0 -1
- package/dist/node/resources/index.d.ts +0 -29
- package/dist/node/resources/index.js +0 -33
- package/dist/node/resources/index.js.map +0 -1
- package/dist/node/resources/solution-resource.d.ts +0 -35
- package/dist/node/resources/solution-resource.js +0 -31
- package/dist/node/resources/solution-resource.js.map +0 -1
- package/dist/node/resources/transform-resource-paths-to-solution-resources.d.ts +0 -56
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js +0 -146
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js.map +0 -1
- package/dist/node/restHelpers.d.ts +0 -585
- package/dist/node/restHelpers.js +0 -1887
- package/dist/node/restHelpers.js.map +0 -1
- package/dist/node/restHelpersGet.d.ts +0 -288
- package/dist/node/restHelpersGet.js +0 -804
- package/dist/node/restHelpersGet.js.map +0 -1
- package/dist/node/sharing/index.d.ts +0 -16
- package/dist/node/sharing/index.js +0 -20
- package/dist/node/sharing/index.js.map +0 -1
- package/dist/node/sharing/share-item-to-groups.d.ts +0 -26
- package/dist/node/sharing/share-item-to-groups.js +0 -44
- package/dist/node/sharing/share-item-to-groups.js.map +0 -1
- package/dist/node/templatization.d.ts +0 -139
- package/dist/node/templatization.js +0 -314
- package/dist/node/templatization.js.map +0 -1
- package/dist/node/trackingHelpers.d.ts +0 -116
- package/dist/node/trackingHelpers.js +0 -217
- package/dist/node/trackingHelpers.js.map +0 -1
- package/dist/node/velocityHelpers.d.ts +0 -57
- package/dist/node/velocityHelpers.js +0 -135
- package/dist/node/velocityHelpers.js.map +0 -1
- package/dist/node/workforceHelpers.d.ts +0 -115
- package/dist/node/workforceHelpers.js +0 -747
- package/dist/node/workforceHelpers.js.map +0 -1
- package/dist/umd/common.umd.js +0 -15471
- package/dist/umd/common.umd.js.map +0 -1
- package/dist/umd/common.umd.min.js +0 -19
- package/dist/umd/common.umd.min.js.map +0 -1
- package/dist/umd/src/completeItem.d.ts +0 -29
- package/dist/umd/src/create-hub-request-options.d.ts +0 -29
- package/dist/umd/src/deleteHelpers/deleteEmptyGroups.d.ts +0 -24
- package/dist/umd/src/deleteHelpers/deleteGroupIfEmpty.d.ts +0 -27
- package/dist/umd/src/deleteHelpers/deleteSolutionContents.d.ts +0 -38
- package/dist/umd/src/deleteHelpers/deleteSolutionFolder.d.ts +0 -29
- package/dist/umd/src/deleteHelpers/deleteSolutionItem.d.ts +0 -30
- package/dist/umd/src/deleteHelpers/index.d.ts +0 -22
- package/dist/umd/src/deleteHelpers/reconstructBuildOrderIds.d.ts +0 -27
- package/dist/umd/src/deleteHelpers/removeItems.d.ts +0 -34
- package/dist/umd/src/deleteHelpers/reportProgress.d.ts +0 -27
- package/dist/umd/src/deleteSolution.d.ts +0 -55
- package/dist/umd/src/dependencies.d.ts +0 -26
- package/dist/umd/src/featureServiceHelpers.d.ts +0 -791
- package/dist/umd/src/generalHelpers.d.ts +0 -372
- package/dist/umd/src/get-subscription-info.d.ts +0 -27
- package/dist/umd/src/getDeletableSolutionInfo.d.ts +0 -29
- package/dist/umd/src/getItemTypeAbbrev.d.ts +0 -19
- package/dist/umd/src/getSolutionSummary.d.ts +0 -27
- package/dist/umd/src/index.d.ts +0 -44
- package/dist/umd/src/interfaces.d.ts +0 -1321
- package/dist/umd/src/libConnectors.d.ts +0 -73
- package/dist/umd/src/migrations/apply-schema.d.ts +0 -24
- package/dist/umd/src/migrations/is-legacy-solution.d.ts +0 -24
- package/dist/umd/src/migrations/upgrade-three-dot-one.d.ts +0 -27
- package/dist/umd/src/migrations/upgrade-three-dot-zero.d.ts +0 -27
- package/dist/umd/src/migrations/upgrade-two-dot-five.d.ts +0 -24
- package/dist/umd/src/migrations/upgrade-two-dot-four.d.ts +0 -24
- package/dist/umd/src/migrations/upgrade-two-dot-one.d.ts +0 -7
- package/dist/umd/src/migrations/upgrade-two-dot-seven.d.ts +0 -23
- package/dist/umd/src/migrations/upgrade-two-dot-six.d.ts +0 -27
- package/dist/umd/src/migrations/upgrade-two-dot-three.d.ts +0 -23
- package/dist/umd/src/migrations/upgrade-two-dot-two.d.ts +0 -23
- package/dist/umd/src/migrations/upgrade-two-dot-zero.d.ts +0 -44
- package/dist/umd/src/migrator.d.ts +0 -25
- package/dist/umd/src/polyfills.d.ts +0 -40
- package/dist/umd/src/resourceHelpers.d.ts +0 -190
- package/dist/umd/src/resources/add-resource-from-blob.d.ts +0 -26
- package/dist/umd/src/resources/addMetadataFromBlob.d.ts +0 -25
- package/dist/umd/src/resources/convert-item-resource-to-storage-resource.d.ts +0 -32
- package/dist/umd/src/resources/convert-storage-resource-to-item-resource.d.ts +0 -29
- package/dist/umd/src/resources/copyAssociatedFiles.d.ts +0 -52
- package/dist/umd/src/resources/copyDataIntoItem.d.ts +0 -33
- package/dist/umd/src/resources/copyMetadataIntoItem.d.ts +0 -26
- package/dist/umd/src/resources/copyResourceIntoZip.d.ts +0 -33
- package/dist/umd/src/resources/copyZipIntoItem.d.ts +0 -25
- package/dist/umd/src/resources/createCopyResults.d.ts +0 -25
- package/dist/umd/src/resources/get-blob.d.ts +0 -26
- package/dist/umd/src/resources/getItemResourcesFilesFromPaths.d.ts +0 -24
- package/dist/umd/src/resources/getItemResourcesPaths.d.ts +0 -26
- package/dist/umd/src/resources/index.d.ts +0 -29
- package/dist/umd/src/resources/solution-resource.d.ts +0 -35
- package/dist/umd/src/resources/transform-resource-paths-to-solution-resources.d.ts +0 -56
- package/dist/umd/src/restHelpers.d.ts +0 -585
- package/dist/umd/src/restHelpersGet.d.ts +0 -288
- package/dist/umd/src/sharing/index.d.ts +0 -16
- package/dist/umd/src/sharing/share-item-to-groups.d.ts +0 -26
- package/dist/umd/src/templatization.d.ts +0 -139
- package/dist/umd/src/trackingHelpers.d.ts +0 -116
- package/dist/umd/src/velocityHelpers.d.ts +0 -57
- package/dist/umd/src/workforceHelpers.d.ts +0 -115
|
@@ -1,73 +0,0 @@
|
|
|
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
|
-
/**
|
|
17
|
-
* Provides connectors to third-party helper functions.
|
|
18
|
-
*/
|
|
19
|
-
import { Sanitizer } from "@esri/arcgis-html-sanitizer";
|
|
20
|
-
export { Sanitizer } from "@esri/arcgis-html-sanitizer";
|
|
21
|
-
/**
|
|
22
|
-
* Creates a zip File from a collection of Files.
|
|
23
|
-
*
|
|
24
|
-
* @param zipFilename Name to use for zip File
|
|
25
|
-
* @param files List of files to add to zip File
|
|
26
|
-
* @param folder Folder to contain the files
|
|
27
|
-
* @returns Promise resolving to a zip File
|
|
28
|
-
*/
|
|
29
|
-
export declare function createZip(zipFilename: string, files: File[], folder?: string): Promise<File>;
|
|
30
|
-
/**
|
|
31
|
-
* Result of checking if a string contains invalid HTML.
|
|
32
|
-
*/
|
|
33
|
-
export interface IValidationResult {
|
|
34
|
-
isValid: boolean;
|
|
35
|
-
sanitized: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Sanitizes html.
|
|
39
|
-
*
|
|
40
|
-
* @param HTML Text to sanitize
|
|
41
|
-
* @param sanitizer Instance of Sanitizer class
|
|
42
|
-
* @returns Sanitized version of `html`
|
|
43
|
-
* @see https://github.com/esri/arcgis-html-sanitizer#basic-usage
|
|
44
|
-
*/
|
|
45
|
-
export declare function sanitizeHTML(html: string, sanitizer?: Sanitizer): string;
|
|
46
|
-
/**
|
|
47
|
-
* Sanitizes JSON.
|
|
48
|
-
*
|
|
49
|
-
* @param json JSON to sanitize
|
|
50
|
-
* @param sanitizer Instance of Sanitizer class
|
|
51
|
-
* @returns Sanitized version of `json`
|
|
52
|
-
* @see https://github.com/esri/arcgis-html-sanitizer#sanitize-json
|
|
53
|
-
*/
|
|
54
|
-
export declare function sanitizeJSON(json: any, sanitizer?: Sanitizer): any;
|
|
55
|
-
/**
|
|
56
|
-
* Sanitizes the protocol in a URL.
|
|
57
|
-
*
|
|
58
|
-
* @param url URL to sanitize
|
|
59
|
-
* @param sanitizer Instance of Sanitizer class
|
|
60
|
-
* @returns Sanitized version of `url`
|
|
61
|
-
* @see https://github.com/esri/arcgis-html-sanitizer#sanitize-urls
|
|
62
|
-
*/
|
|
63
|
-
export declare function sanitizeURLProtocol(url: string, sanitizer?: Sanitizer): string;
|
|
64
|
-
/**
|
|
65
|
-
* Checks if a string contains invalid HTML.
|
|
66
|
-
*
|
|
67
|
-
* @param html HTML to check
|
|
68
|
-
* @param sanitizer Instance of Sanitizer class
|
|
69
|
-
* @returns An object containing a flag indicating if `html` is valid (i.e., contains no invalid HTML)
|
|
70
|
-
* as well as the sanitized version of `html`
|
|
71
|
-
* @see https://github.com/esri/arcgis-html-sanitizer#basic-usage
|
|
72
|
-
*/
|
|
73
|
-
export declare function validateHTML(html: string, sanitizer?: Sanitizer): IValidationResult;
|
|
@@ -1,24 +0,0 @@
|
|
|
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 { ISolutionItem } from "../interfaces";
|
|
17
|
-
/**
|
|
18
|
-
* Apply the initial schema for old Hub Solutions
|
|
19
|
-
*
|
|
20
|
-
* @param model
|
|
21
|
-
* @param authentication
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
|
-
export declare function _applySchema(model: ISolutionItem): ISolutionItem;
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
* Determine if the Solution is a legacy item created by Hub
|
|
19
|
-
* vs one that is 100% compatible with Solution.js
|
|
20
|
-
*
|
|
21
|
-
* @param model ISolutionModel
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
|
-
export declare function _isLegacySolution(model: ISolutionItem): boolean;
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
* Apply the initial schema
|
|
19
|
-
* If the item was created by Solution.js, this will stamp it
|
|
20
|
-
* with the initial Solution.js schama version number (3)
|
|
21
|
-
* If it is a legacy hub solution, it will apply the transforms
|
|
22
|
-
*
|
|
23
|
-
* @param model ISolutionItem
|
|
24
|
-
* @param authentication UserSession
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
export declare function _upgradeThreeDotOne(model: ISolutionItem): ISolutionItem;
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
* Apply the initial schema
|
|
19
|
-
* If the item was created by Solution.js, this will stamp it
|
|
20
|
-
* with the initial Solution.js schama version number (3)
|
|
21
|
-
* If it is a legacy hub solution, it will apply the transforms
|
|
22
|
-
*
|
|
23
|
-
* @param model ISolutionItem
|
|
24
|
-
* @param authentication UserSession
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
export declare function _upgradeThreeDotZero(model: ISolutionItem): ISolutionItem;
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
* Applies Survey123 Form Config Schema migrations.
|
|
19
|
-
*
|
|
20
|
-
* @param {ISolutionItem} model A Solution model
|
|
21
|
-
* @returns {ISolutionItem}
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
|
-
export declare function _upgradeTwoDotFive(model: ISolutionItem): ISolutionItem;
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
* Hub Solutions use the `key` property for follow on replacements
|
|
19
|
-
* but the Solution.js ones use the
|
|
20
|
-
*
|
|
21
|
-
* @param model ISolutionItem
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
|
-
export declare function _upgradeTwoDotFour(model: ISolutionItem): ISolutionItem;
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
/**
|
|
17
|
-
* Updates schema to 2.7.
|
|
18
|
-
*
|
|
19
|
-
* @param model Model to be updated
|
|
20
|
-
* @returns Updated model
|
|
21
|
-
* @private
|
|
22
|
-
*/
|
|
23
|
-
export declare function _upgradeTwoDotSeven(model: any): any;
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
* Hub creates a Web Map dependency for Form templates
|
|
19
|
-
* that contain map questions. This migration updates
|
|
20
|
-
* any form's map questions to use the default basemap
|
|
21
|
-
* and filters out related Web Map templates.
|
|
22
|
-
*
|
|
23
|
-
* @param {ISolutionItem} model A Solution model
|
|
24
|
-
* @returns {ISolutionItem}
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
export declare function _upgradeTwoDotSix(model: ISolutionItem): ISolutionItem;
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
* Migrate Hub assets structure to resource paths
|
|
19
|
-
*
|
|
20
|
-
* @param model
|
|
21
|
-
* @private
|
|
22
|
-
*/
|
|
23
|
-
export declare function _upgradeTwoDotThree(model: ISolutionItem): ISolutionItem;
|
|
@@ -1,23 +0,0 @@
|
|
|
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;
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
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>;
|
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
/**
|
|
17
|
-
* Provides polyfill helper functions.
|
|
18
|
-
*
|
|
19
|
-
* @module polyfills
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* Supplies Blob.text for Microsoft Legacy Edge
|
|
23
|
-
*
|
|
24
|
-
* @param blob Blob to read
|
|
25
|
-
* @returns Promise resolving to blob's text
|
|
26
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
|
|
27
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/FileReader
|
|
28
|
-
*/
|
|
29
|
-
export declare function getBlobText(blob: Blob): Promise<string>;
|
|
30
|
-
/**
|
|
31
|
-
* Supplies the File constructor for Microsoft Legacy Edge.
|
|
32
|
-
*
|
|
33
|
-
* @param fileBits Contents for file
|
|
34
|
-
* @param fileName Name for file
|
|
35
|
-
* @param options Bucket of options, euch as `type` for the MIME type; defaults to empty string for `type`
|
|
36
|
-
* @returns File or, for Microsoft Legacy Edge, Blob
|
|
37
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/File/File
|
|
38
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
|
|
39
|
-
*/
|
|
40
|
-
export declare function new_File(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
|
|
@@ -1,190 +0,0 @@
|
|
|
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, UserSession } from "./interfaces";
|
|
49
|
-
import { IItemResourceResponse } from "@esri/arcgis-rest-portal";
|
|
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 destinationFolderId Id of folder
|
|
59
|
-
* @param destinationItemId Id of item to receive copy of resource/metadata
|
|
60
|
-
* @param destinationAuthentication Credentials for the request to the destination
|
|
61
|
-
* @param template Template for using its itemId and properties for fine-tuning the filename for Hub
|
|
62
|
-
* @returns A promise which resolves to a boolean indicating if the copies were successful
|
|
63
|
-
*/
|
|
64
|
-
export declare function copyFilesFromStorageItem(storageAuthentication: UserSession, filePaths: IDeployFileCopyPath[], destinationFolderId: string, destinationItemId: string, destinationAuthentication: UserSession, template?: any): Promise<boolean>;
|
|
65
|
-
/**
|
|
66
|
-
* Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
|
|
67
|
-
* with a specified path.
|
|
68
|
-
*
|
|
69
|
-
* @param files List of item files and paths for storing the files
|
|
70
|
-
* @param storageItemId Id of item to receive copy of resource/metadata
|
|
71
|
-
* @param storageAuthentication Credentials for the request to the storage
|
|
72
|
-
* @returns A promise which resolves to a list of the filenames under which the resource/metadata are stored
|
|
73
|
-
*/
|
|
74
|
-
export declare function copyFilesToStorageItem(files: ISourceFile[], storageItemId: string, storageAuthentication: UserSession): Promise<string[]>;
|
|
75
|
-
/**
|
|
76
|
-
* Generates a folder and filename for storing a copy of an item's metadata in a storage item.
|
|
77
|
-
*
|
|
78
|
-
* @param itemId Id of item
|
|
79
|
-
* @returns Folder and filename for storage; folder is the itemID suffixed with "_info_metadata"
|
|
80
|
-
* @see convertStorageResourceToItemResource
|
|
81
|
-
*/
|
|
82
|
-
export declare function generateMetadataStorageFilename(itemId: string): {
|
|
83
|
-
folder: string;
|
|
84
|
-
filename: string;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Generates a list of full URLs and storage folder/filename combinations for storing the resources, metadata,
|
|
88
|
-
* and thumbnail of an item.
|
|
89
|
-
*
|
|
90
|
-
* @param portalSharingUrl Server/sharing
|
|
91
|
-
* @param itemId Id of item
|
|
92
|
-
* @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
|
|
93
|
-
* @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
|
|
94
|
-
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
95
|
-
* @param storageVersion Version of the Solution template
|
|
96
|
-
* @returns List of item files' URLs and folder/filenames for storing the files
|
|
97
|
-
*/
|
|
98
|
-
export declare function generateSourceFilePaths(portalSharingUrl: string, itemId: string, thumbnailUrlPart: string, resourceFilenames: string[], isGroup?: boolean, storageVersion?: number): ISourceFileCopyPath[];
|
|
99
|
-
/**
|
|
100
|
-
* Generates the URL for reading an item's metadata.
|
|
101
|
-
*
|
|
102
|
-
* @param sourcePortalSharingUrl Server/sharing
|
|
103
|
-
* @param itemId Id of item
|
|
104
|
-
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
105
|
-
* @returns URL string
|
|
106
|
-
*/
|
|
107
|
-
export declare function generateSourceMetadataUrl(sourcePortalSharingUrl: string, itemId: string, isGroup?: boolean): string;
|
|
108
|
-
/**
|
|
109
|
-
* Generates the URL for reading an item's resource given the filename of the resource.
|
|
110
|
-
*
|
|
111
|
-
* @param sourcePortalSharingUrl Server/sharing
|
|
112
|
-
* @param itemId Id of item
|
|
113
|
-
* @param sourceResourceFilename Either filename or folder/filename to resource
|
|
114
|
-
* @returns URL string
|
|
115
|
-
*/
|
|
116
|
-
export declare function generateSourceResourceUrl(sourcePortalSharingUrl: string, itemId: string, sourceResourceFilename: string): string;
|
|
117
|
-
/**
|
|
118
|
-
* Generates the URL for reading an item's thumbnail.
|
|
119
|
-
*
|
|
120
|
-
* @param sourcePortalSharingUrl Server/sharing
|
|
121
|
-
* @param itemId Id of item
|
|
122
|
-
* @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
|
|
123
|
-
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
124
|
-
* @returns URL string
|
|
125
|
-
*/
|
|
126
|
-
export declare function generateSourceThumbnailUrl(sourcePortalSharingUrl: string, itemId: string, thumbnailUrlPart: string, isGroup?: boolean): string;
|
|
127
|
-
/**
|
|
128
|
-
* Generates a list of full URLs and folder/filename combinations used to store the resources, metadata,
|
|
129
|
-
* and thumbnail of an item.
|
|
130
|
-
*
|
|
131
|
-
* @param portalSharingUrl Server/sharing
|
|
132
|
-
* @param storageItemId Id of storage item
|
|
133
|
-
* @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
|
|
134
|
-
* @param storageVersion Version of the Solution template
|
|
135
|
-
* @returns List of item files' URLs and folder/filenames for storing the files
|
|
136
|
-
*/
|
|
137
|
-
export declare function generateStorageFilePaths(portalSharingUrl: string, storageItemId: string, resourceFilenames?: string[], storageVersion?: number): IDeployFileCopyPath[];
|
|
138
|
-
/**
|
|
139
|
-
* Generates a folder and filename for storing a copy of an item's thumbnail in a storage item.
|
|
140
|
-
*
|
|
141
|
-
* @param itemId Id of item
|
|
142
|
-
* @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON; can also be a filename
|
|
143
|
-
* @returns Folder and filename for storage; folder is the itemID suffixed with "_info_thumbnail";
|
|
144
|
-
* file is URI-encoded thumbnailUrlPart
|
|
145
|
-
* @see convertStorageResourceToItemResource
|
|
146
|
-
*/
|
|
147
|
-
export declare function generateThumbnailStorageFilename(itemId: string, thumbnailurl: string): {
|
|
148
|
-
folder: string;
|
|
149
|
-
filename: string;
|
|
150
|
-
};
|
|
151
|
-
export declare function isSupportedFileType(filename: string): boolean;
|
|
152
|
-
/**
|
|
153
|
-
* Gets the thumbnail of an item or group.
|
|
154
|
-
*
|
|
155
|
-
* @param authentication Credentials for the request to the storage
|
|
156
|
-
* @param filePaths List of item files' URLs and folder/filenames for storing the files
|
|
157
|
-
* @returns A promise which resolves to a boolean indicating if the copies were successful
|
|
158
|
-
*/
|
|
159
|
-
export declare function getThumbnailFromStorageItem(authentication: UserSession, filePaths: IDeployFileCopyPath[]): Promise<File>;
|
|
160
|
-
/**
|
|
161
|
-
* Removes the item's resource that matches the filename with new content
|
|
162
|
-
*
|
|
163
|
-
* @param itemId Id of the item to remove
|
|
164
|
-
* @param filename Name of the resource file to remove
|
|
165
|
-
* @param authentication Credentials for the request to the storage
|
|
166
|
-
* @returns A promise which resolves with a success true/false response
|
|
167
|
-
*/
|
|
168
|
-
export declare function removeItemResourceFile(itemId: string, filename: string, authentication: UserSession): Promise<{
|
|
169
|
-
success: boolean;
|
|
170
|
-
}>;
|
|
171
|
-
/**
|
|
172
|
-
* Updates the item's resource that matches the filename with new content
|
|
173
|
-
*
|
|
174
|
-
* @param itemId Id of the item to update
|
|
175
|
-
* @param filename Name of the resource file to update; prefix optional (e.g., a/b/file.txt)
|
|
176
|
-
* @param resource The new content to update the resource with
|
|
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 updateItemResourceFile(itemId: string, filename: string, resource: File, authentication: UserSession): Promise<IItemResourceResponse>;
|
|
181
|
-
/**
|
|
182
|
-
* Updates the item's resource that matches the filename with new content
|
|
183
|
-
*
|
|
184
|
-
* @param itemId Id of the item to update
|
|
185
|
-
* @param filename Name of the resource file to update
|
|
186
|
-
* @param content The new content to update the resource with
|
|
187
|
-
* @param authentication Credentials for the request to the storage
|
|
188
|
-
* @returns A promise which resolves with a success true/false response
|
|
189
|
-
*/
|
|
190
|
-
export declare function updateItemResourceText(itemId: string, filename: string, content: string, authentication: UserSession): Promise<IItemResourceResponse>;
|
|
@@ -1,26 +0,0 @@
|
|
|
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 { UserSession } from "../interfaces";
|
|
17
|
-
/**
|
|
18
|
-
* Add a resource from a blob
|
|
19
|
-
*
|
|
20
|
-
* @param blob
|
|
21
|
-
* @param itemId
|
|
22
|
-
* @param folder
|
|
23
|
-
* @param filename
|
|
24
|
-
* @param authentication
|
|
25
|
-
*/
|
|
26
|
-
export declare function addResourceFromBlob(blob: any, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;
|