@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,288 +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 { IGroup, IItem, IPagingParams, IPortal, IRelatedItems, ItemRelationshipType, IUser, UserSession } from "./interfaces";
|
|
17
|
-
import { IGetRelatedItemsResponse, IGroupCategorySchema } from "@esri/arcgis-rest-portal";
|
|
18
|
-
export declare function checkJsonForError(json: any): boolean;
|
|
19
|
-
export declare function getPortal(id: string, authentication: UserSession): Promise<IPortal>;
|
|
20
|
-
export declare function getUser(authentication: UserSession): Promise<IUser>;
|
|
21
|
-
export declare function getUsername(authentication: UserSession): Promise<string>;
|
|
22
|
-
export declare function getFoldersAndGroups(authentication: UserSession): Promise<any>;
|
|
23
|
-
/**
|
|
24
|
-
* Gets a Blob from a web site and casts it as a file using the supplied name.
|
|
25
|
-
*
|
|
26
|
-
* @param url Address of Blob
|
|
27
|
-
* @param filename Name to use for file
|
|
28
|
-
* @param authentication Credentials for the request
|
|
29
|
-
* @returns Promise that will resolve with a File, undefined if the Blob is null, or an AGO-style JSON failure response
|
|
30
|
-
*/
|
|
31
|
-
export declare function getBlobAsFile(url: string, filename: string, authentication: UserSession, ignoreErrors?: number[], mimeType?: string): Promise<File>;
|
|
32
|
-
/**
|
|
33
|
-
* Gets a Blob from a web site and checks for a JSON error packet in the Blob.
|
|
34
|
-
*
|
|
35
|
-
* @param url Address of Blob
|
|
36
|
-
* @param authentication Credentials for the request
|
|
37
|
-
* @param ignoreErrors List of HTTP error codes that should be ignored
|
|
38
|
-
* @returns Promise that will resolve with Blob or an AGO-REST JSON failure response
|
|
39
|
-
*/
|
|
40
|
-
export declare function getBlobCheckForError(url: string, authentication: UserSession, ignoreErrors?: number[]): Promise<Blob>;
|
|
41
|
-
/**
|
|
42
|
-
* Extracts the text in a url between the last forward slash and the beginning of the url's parameters.
|
|
43
|
-
*
|
|
44
|
-
* @param url URL to work with
|
|
45
|
-
* @returns Text extracted; empty if url ends with a forward slash or has a "?" immediately after the last
|
|
46
|
-
* forward slash
|
|
47
|
-
*/
|
|
48
|
-
export declare function getFilenameFromUrl(url: string): string;
|
|
49
|
-
/**
|
|
50
|
-
* Gets the primary information of an AGO group.
|
|
51
|
-
*
|
|
52
|
-
* @param groupId Id of an group whose primary information is sought
|
|
53
|
-
* @param authentication Credentials for the request to AGO
|
|
54
|
-
* @returns A promise that will resolve with group's JSON or error JSON or throws ArcGISRequestError in case of HTTP error
|
|
55
|
-
* or response error code
|
|
56
|
-
*/
|
|
57
|
-
export declare function getGroupBase(groupId: string, authentication: UserSession): Promise<IGroup>;
|
|
58
|
-
/**
|
|
59
|
-
* Gets the category schema set on a group.
|
|
60
|
-
*
|
|
61
|
-
* @param groupId Id of an group whose category schema information is sought
|
|
62
|
-
* @param authentication Credentials for the request to AGO
|
|
63
|
-
* @returns A promise that will resolve with JSON of group's category schema
|
|
64
|
-
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-category-schema.htm
|
|
65
|
-
*/
|
|
66
|
-
export declare function getGroupCategorySchema(groupId: string, authentication: UserSession): Promise<IGroupCategorySchema>;
|
|
67
|
-
/**
|
|
68
|
-
* Gets the ids of the dependencies (contents) of an AGO group.
|
|
69
|
-
*
|
|
70
|
-
* @param groupId Id of a group whose contents are sought
|
|
71
|
-
* @param authentication Credentials for the request to AGO
|
|
72
|
-
* @returns A promise that will resolve with list of dependent ids or an empty list
|
|
73
|
-
*/
|
|
74
|
-
export declare function getGroupContents(groupId: string, authentication: UserSession): Promise<string[]>;
|
|
75
|
-
/**
|
|
76
|
-
* Gets the primary information of an AGO item.
|
|
77
|
-
*
|
|
78
|
-
* @param itemId Id of an item whose primary information is sought
|
|
79
|
-
* @param authentication Credentials for the request to AGO
|
|
80
|
-
* @returns A promise that will resolve with item's JSON or error JSON or throws ArcGISRequestError in case of HTTP error
|
|
81
|
-
* or response error code
|
|
82
|
-
*/
|
|
83
|
-
export declare function getItemBase(itemId: string, authentication: UserSession): Promise<IItem>;
|
|
84
|
-
/**
|
|
85
|
-
* Gets the data information of an AGO item in its raw (Blob) form and casts it as a file using the supplied name.
|
|
86
|
-
*
|
|
87
|
-
* @param itemId Id of an item whose data information is sought
|
|
88
|
-
* @param filename Name to use for file
|
|
89
|
-
* @param authentication Credentials for the request to AGO
|
|
90
|
-
* @returns Promise that will resolve with a File, undefined if the Blob is null, or an AGO-style JSON failure response
|
|
91
|
-
*/
|
|
92
|
-
export declare function getItemDataAsFile(itemId: string, filename: string, authentication: UserSession): Promise<File>;
|
|
93
|
-
/**
|
|
94
|
-
* Gets the data information of an AGO item in its JSON form.
|
|
95
|
-
*
|
|
96
|
-
* @param itemId Id of an item whose data information is sought
|
|
97
|
-
* @param filename Name to use for file
|
|
98
|
-
* @param authentication Credentials for the request to AGO
|
|
99
|
-
* @returns Promise that will resolve with JSON, or an AGO-style JSON failure response
|
|
100
|
-
*/
|
|
101
|
-
export declare function getItemDataAsJson(itemId: string, authentication: UserSession): Promise<any>;
|
|
102
|
-
/**
|
|
103
|
-
* Gets the data information of an AGO item in its raw (Blob) form.
|
|
104
|
-
*
|
|
105
|
-
* @param itemId Id of an item whose data information is sought
|
|
106
|
-
* @param authentication Credentials for the request to AGO
|
|
107
|
-
* @returns A promise that will resolve with the data Blob or null if the item doesn't have a data section
|
|
108
|
-
*/
|
|
109
|
-
export declare function getItemDataBlob(itemId: string, authentication: UserSession): Promise<Blob>;
|
|
110
|
-
/**
|
|
111
|
-
* Gets the URL to the data information of an AGO item in its raw (Blob) form.
|
|
112
|
-
*
|
|
113
|
-
* @param itemId Id of an item whose data information is sought
|
|
114
|
-
* @param authentication Credentials for the request to AGO
|
|
115
|
-
* @returns URL string
|
|
116
|
-
*/
|
|
117
|
-
export declare function getItemDataBlobUrl(itemId: string, authentication: UserSession): string;
|
|
118
|
-
/**
|
|
119
|
-
* Gets the URL to an information item in an AGO item.
|
|
120
|
-
*
|
|
121
|
-
* @param itemId Id of an item whose data information is sought
|
|
122
|
-
* @param authentication Credentials for the request to AGO
|
|
123
|
-
* @returns URL string
|
|
124
|
-
*/
|
|
125
|
-
export declare function getItemInfoFileUrlPrefix(itemId: string, authentication: UserSession): string;
|
|
126
|
-
/**
|
|
127
|
-
* Gets the metadata information of an AGO item.
|
|
128
|
-
*
|
|
129
|
-
* @param itemId Id of an item whose data information is sought
|
|
130
|
-
* @param authentication Credentials for the request to AGO
|
|
131
|
-
* @returns Promise that will resolve with `undefined` or a File containing the metadata
|
|
132
|
-
*/
|
|
133
|
-
export declare function getItemMetadataAsFile(itemId: string, authentication: UserSession): Promise<File>;
|
|
134
|
-
/**
|
|
135
|
-
* Gets the metadata information of an AGO item.
|
|
136
|
-
*
|
|
137
|
-
* @param itemId Id of an item whose data information is sought
|
|
138
|
-
* @param authentication Credentials for the request to AGO
|
|
139
|
-
* @returns A promise that will resolve with the metadata Blob or null if the item doesn't have a metadata file
|
|
140
|
-
*/
|
|
141
|
-
export declare function getItemMetadataBlob(itemId: string, authentication: UserSession): Promise<Blob>;
|
|
142
|
-
/**
|
|
143
|
-
* Gets the URL to the metadata information of an AGO item.
|
|
144
|
-
*
|
|
145
|
-
* @param itemId Id of an item whose data information is sought
|
|
146
|
-
* @param authentication Credentials for the request to AGO
|
|
147
|
-
* @returns URL string
|
|
148
|
-
*/
|
|
149
|
-
export declare function getItemMetadataBlobUrl(itemId: string, authentication: UserSession): string;
|
|
150
|
-
/**
|
|
151
|
-
* Gets the related items of an AGO item.
|
|
152
|
-
*
|
|
153
|
-
* @param itemId Id of an item whose related items are sought
|
|
154
|
-
* @param relationshipType Tag for relationship type, e.g., "Solution2Item"
|
|
155
|
-
* @param direction Relationship direction
|
|
156
|
-
* @param authentication Credentials for the request to AGO
|
|
157
|
-
* @param num Number of related items to request per batch; maximum is 100
|
|
158
|
-
* @returns A promise that will resolve with the list of related items
|
|
159
|
-
*/
|
|
160
|
-
export declare function getItemRelatedItems(itemId: string, relationshipType: ItemRelationshipType | ItemRelationshipType[], direction: "forward" | "reverse", authentication: UserSession, num?: number): Promise<IGetRelatedItemsResponse>;
|
|
161
|
-
/**
|
|
162
|
-
* Gets all of the related items of an AGO item in the specified direction.
|
|
163
|
-
*
|
|
164
|
-
* @param itemId Id of an item whose related items are sought
|
|
165
|
-
* @param direction
|
|
166
|
-
* @param authentication Credentials for the request to AGO
|
|
167
|
-
* @returns A promise that will resolve with a list of IRelatedItems
|
|
168
|
-
*/
|
|
169
|
-
export declare function getItemRelatedItemsInSameDirection(itemId: string, direction: "forward" | "reverse", authentication: UserSession): Promise<IRelatedItems[]>;
|
|
170
|
-
export declare function getItemResources(id: string, authentication: UserSession): Promise<any>;
|
|
171
|
-
/**
|
|
172
|
-
* Gets the resources of an AGO item.
|
|
173
|
-
*
|
|
174
|
-
* @param itemId Id of an item whose resources are sought
|
|
175
|
-
* @param authentication Credentials for the request to AGO
|
|
176
|
-
* @returns Promise that will resolve with a list of Files or an AGO-style JSON failure response
|
|
177
|
-
*/
|
|
178
|
-
export declare function getItemResourcesFiles(itemId: string, authentication: UserSession): Promise<File[]>;
|
|
179
|
-
/**
|
|
180
|
-
* Gets all of the items associated with a Solution via a Solution2Item relationship.
|
|
181
|
-
*
|
|
182
|
-
* @param solutionItemId Id of a deployed Solution
|
|
183
|
-
* @param authentication Credentials for the request
|
|
184
|
-
* @returns Promise resolving to a list of detailed item information
|
|
185
|
-
*/
|
|
186
|
-
export declare function getItemsRelatedToASolution(solutionItemId: string, authentication: UserSession): Promise<IItem[]>;
|
|
187
|
-
/**
|
|
188
|
-
* Gets the thumbnail of an AGO item.
|
|
189
|
-
*
|
|
190
|
-
* @param itemId Id of an item whose resources are sought
|
|
191
|
-
* @param thumbnailUrlPart The partial name of the item's thumbnail as reported by the `thumbnail` property
|
|
192
|
-
* in the item's base section
|
|
193
|
-
* @param isGroup Switch indicating if the item is a group
|
|
194
|
-
* @param authentication Credentials for the request to AGO
|
|
195
|
-
* @returns Promise that will resolve with an image Blob or an AGO-style JSON failure response
|
|
196
|
-
*/
|
|
197
|
-
export declare function getItemThumbnail(itemId: string, thumbnailUrlPart: string | null, isGroup: boolean, authentication: UserSession): Promise<Blob>;
|
|
198
|
-
/**
|
|
199
|
-
* Gets the thumbnail of an AGO item.
|
|
200
|
-
*
|
|
201
|
-
* @param itemId Id of an item whose resources are sought
|
|
202
|
-
* @param thumbnailUrlPart The partial name of the item's thumbnail as reported by the `thumbnail` property
|
|
203
|
-
* in the item's base section
|
|
204
|
-
* @param isGroup Switch indicating if the item is a group
|
|
205
|
-
* @param authentication Credentials for the request to AGO
|
|
206
|
-
* @returns Promise that will resolve with an image Blob or an AGO-style JSON failure response
|
|
207
|
-
*/
|
|
208
|
-
export declare function getItemThumbnailAsFile(itemId: string, thumbnailUrlPart: string | null, isGroup: boolean, authentication: UserSession): Promise<File>;
|
|
209
|
-
/**
|
|
210
|
-
* Gets the URL to the thumbnail of an AGO item.
|
|
211
|
-
*
|
|
212
|
-
* @param itemId Id of an item whose resources are sought
|
|
213
|
-
* @param thumbnailUrlPart The partial name of the item's thumbnail as reported by the `thumbnail` property
|
|
214
|
-
* in the item's base section
|
|
215
|
-
* @param isGroup Switch indicating if the item is a group
|
|
216
|
-
* @param authentication Credentials for the request to AGO
|
|
217
|
-
* @returns URL string
|
|
218
|
-
*/
|
|
219
|
-
export declare function getItemThumbnailUrl(itemId: string, thumbnailUrlPart: string, isGroup: boolean, authentication: UserSession): string;
|
|
220
|
-
/**
|
|
221
|
-
* Gets a JSON from a web site.
|
|
222
|
-
*
|
|
223
|
-
* @param url Address of JSON
|
|
224
|
-
* @param authentication Credentials for the request
|
|
225
|
-
* @returns Promise that will resolve with JSON
|
|
226
|
-
*/
|
|
227
|
-
export declare function getJson(url: string, authentication?: UserSession): Promise<any>;
|
|
228
|
-
/**
|
|
229
|
-
* Extracts the portal sharing url from a supplied authentication.
|
|
230
|
-
*
|
|
231
|
-
* @param authentication Credentials for the request to AGO
|
|
232
|
-
* @returns Portal sharing url to be used in API requests, defaulting to `https://www.arcgis.com/sharing/rest`
|
|
233
|
-
*/
|
|
234
|
-
export declare function getPortalSharingUrlFromAuth(authentication: UserSession | undefined): string;
|
|
235
|
-
/**
|
|
236
|
-
* Extracts the portal url from a supplied authentication.
|
|
237
|
-
*
|
|
238
|
-
* @param authentication Credentials for the request to AGO
|
|
239
|
-
* @returns Portal url to be used in API requests, defaulting to `https://www.arcgis.com`
|
|
240
|
-
*/
|
|
241
|
-
export declare function getPortalUrlFromAuth(authentication: UserSession): string;
|
|
242
|
-
/**
|
|
243
|
-
* Gets the ids of all Solution items associated with an AGO item via a Solution2Item relationship.
|
|
244
|
-
*
|
|
245
|
-
* @param itemId Id of an AGO item to query
|
|
246
|
-
* @param authentication Credentials for the request
|
|
247
|
-
* @returns Promise resolving to a list of Solution item ids
|
|
248
|
-
*/
|
|
249
|
-
export declare function getSolutionsRelatedToAnItem(itemId: string, authentication: UserSession): Promise<string[]>;
|
|
250
|
-
export declare function getThumbnailFile(url: string, filename: string, authentication: UserSession): Promise<File>;
|
|
251
|
-
/**
|
|
252
|
-
* Fixes the types of Blobs incorrectly typed as text/plain.
|
|
253
|
-
*
|
|
254
|
-
* @param blob Blob to check
|
|
255
|
-
* @returns Promise resolving to original Blob, unless it's originally typed as text/plain but is
|
|
256
|
-
* really JSON, ZIP, or XML
|
|
257
|
-
* @private
|
|
258
|
-
*/
|
|
259
|
-
export declare function _fixTextBlobType(blob: Blob): Promise<Blob>;
|
|
260
|
-
/**
|
|
261
|
-
* Gets some of the ids of the dependencies (contents) of an AGO group.
|
|
262
|
-
*
|
|
263
|
-
* @param groupId Id of a group whose contents are sought
|
|
264
|
-
* @param pagingParams Structure with start and num properties for the tranche to fetch
|
|
265
|
-
* @param authentication Credentials for the request to AGO
|
|
266
|
-
* @returns A promise that will resolve with list of dependent ids or an empty list
|
|
267
|
-
* @private
|
|
268
|
-
*/
|
|
269
|
-
export declare function _getGroupContentsTranche(groupId: string, pagingParams: IPagingParams, authentication: UserSession): Promise<string[]>;
|
|
270
|
-
/**
|
|
271
|
-
* Gets some of the resources of an AGO item.
|
|
272
|
-
*
|
|
273
|
-
* @param itemId Id of an item whose resources are sought
|
|
274
|
-
* @param pagingParams Structure with start and num properties for the tranche to fetch
|
|
275
|
-
* @param authentication Credentials for the request to AGO
|
|
276
|
-
* @returns Promise that will resolve with a list of File promises or an AGO-style JSON failure response
|
|
277
|
-
* @private
|
|
278
|
-
*/
|
|
279
|
-
export declare function _getItemResourcesTranche(itemId: string, pagingParams: IPagingParams, authentication: UserSession): Promise<Array<Promise<File>>>;
|
|
280
|
-
/**
|
|
281
|
-
* Retrieves the default basemap for the given & basemapGalleryGroupQuery, basemapTitle
|
|
282
|
-
*
|
|
283
|
-
* @param {string} basemapGalleryGroupQuery The default basemap group query
|
|
284
|
-
* @param {string} basemapTitle The default basemap title
|
|
285
|
-
* @param {UserSession} authentication The session info
|
|
286
|
-
* @returns {IItem}
|
|
287
|
-
*/
|
|
288
|
-
export declare function getPortalDefaultBasemap(basemapGalleryGroupQuery: string, basemapTitle: string, authentication: UserSession): Promise<IItem>;
|
|
@@ -1,16 +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
|
-
export * from "./share-item-to-groups";
|
|
@@ -1,26 +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 { UserSession } from "../";
|
|
17
|
-
/**
|
|
18
|
-
* Share an item to one or more groups
|
|
19
|
-
* Returns a promise for all the sharing calls
|
|
20
|
-
*
|
|
21
|
-
* @param groups Array of Group Ids
|
|
22
|
-
* @param itemId Item Id
|
|
23
|
-
* @param authentication UserSession
|
|
24
|
-
* @param owner owner of the group when sharing tracking items (can be different from the deploying user)
|
|
25
|
-
*/
|
|
26
|
-
export declare function shareItemToGroups(groupIds: string[], itemId: string, authentication: UserSession, owner?: string): Promise<any>;
|
|
@@ -1,139 +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 { IItemTemplate, ISolutionItemData } from "./interfaces";
|
|
17
|
-
/**
|
|
18
|
-
* A parameterized server name to replace the organization URL in a Web Mapping Application's URL to
|
|
19
|
-
* itself; name has to be acceptable to AGOL, otherwise it discards the URL, so substitution must be
|
|
20
|
-
* made before attempting to create the item.
|
|
21
|
-
*
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
|
-
export declare const SERVER_NAME: string;
|
|
25
|
-
/**
|
|
26
|
-
* A parameterized geometry server name
|
|
27
|
-
*
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
export declare const GEOMETRY_SERVER_NAME: string;
|
|
31
|
-
/**
|
|
32
|
-
* A parameterized geocode server name
|
|
33
|
-
*
|
|
34
|
-
* @private
|
|
35
|
-
*/
|
|
36
|
-
export declare const GEOCODE_SERVER_NAME: string;
|
|
37
|
-
/**
|
|
38
|
-
* A parameterized network analyst server name
|
|
39
|
-
*
|
|
40
|
-
* @private
|
|
41
|
-
*/
|
|
42
|
-
export declare const NA_SERVER_NAME: string;
|
|
43
|
-
/**
|
|
44
|
-
* A parameterized network analyst server name
|
|
45
|
-
*
|
|
46
|
-
* @private
|
|
47
|
-
*/
|
|
48
|
-
export declare const PRINT_SERVER_NAME: string;
|
|
49
|
-
export declare const TRANSFORMS: any;
|
|
50
|
-
/**
|
|
51
|
-
* Wraps double brackets around the supplied term.
|
|
52
|
-
*
|
|
53
|
-
* @param term Term to be wrapped, e.g., SERVER_NAME's "portalBaseUrl"
|
|
54
|
-
* @returns Wrapped term, e.g., "\{\{portalBaseUrl\}\}"
|
|
55
|
-
*/
|
|
56
|
-
export declare function placeholder(term: string): string;
|
|
57
|
-
export declare function createInitializedGroupTemplate(itemInfo: any): IItemTemplate;
|
|
58
|
-
export declare function createInitializedItemTemplate(itemInfo: any): IItemTemplate;
|
|
59
|
-
/**
|
|
60
|
-
* Creates an empty template.
|
|
61
|
-
*
|
|
62
|
-
* @param id AGO id of item
|
|
63
|
-
* @param type AGO item type; defaults to ""
|
|
64
|
-
* @returns Empty template containing supplied id, optional type, and a key created using the function createShortId()
|
|
65
|
-
*/
|
|
66
|
-
export declare function createPlaceholderTemplate(id: string, type?: string): IItemTemplate;
|
|
67
|
-
/**
|
|
68
|
-
* Extracts the version of a solution from its data section.
|
|
69
|
-
*
|
|
70
|
-
* @param itemData Data section of the solution as JSON
|
|
71
|
-
* @returns Zero-based version number
|
|
72
|
-
*/
|
|
73
|
-
export declare function extractSolutionVersion(itemData: ISolutionItemData): number;
|
|
74
|
-
/**
|
|
75
|
-
* Finds index of template by id in a list of templates.
|
|
76
|
-
*
|
|
77
|
-
* @param templates A collection of AGO item templates to search
|
|
78
|
-
* @param id AGO id of template to find
|
|
79
|
-
* @returns Offset of of matching template or -1 if not found
|
|
80
|
-
* @private
|
|
81
|
-
*/
|
|
82
|
-
export declare function findTemplateIndexInList(templates: IItemTemplate[], id: string): number;
|
|
83
|
-
/**
|
|
84
|
-
* Finds template by id in a list of templates.
|
|
85
|
-
*
|
|
86
|
-
* @param templates A collection of AGO item templates to search
|
|
87
|
-
* @param id AGO id of template to find
|
|
88
|
-
* @returns Matching template or null
|
|
89
|
-
*/
|
|
90
|
-
export declare function findTemplateInList(templates: IItemTemplate[], id: string): IItemTemplate | null;
|
|
91
|
-
export declare function hasUnresolvedVariables(data: any): boolean;
|
|
92
|
-
export declare function getIdsInTemplatesList(templates: IItemTemplate[]): string[];
|
|
93
|
-
export declare function getDefaultExtent(itemInfo: any): any;
|
|
94
|
-
/**
|
|
95
|
-
* Removes a template entry in a list of templates.
|
|
96
|
-
*
|
|
97
|
-
* @param templates A collection of AGO item templates
|
|
98
|
-
* @param id Id of item in templates list to find; if not found, no replacement is done
|
|
99
|
-
* @private
|
|
100
|
-
*/
|
|
101
|
-
export declare function removeTemplate(templates: IItemTemplate[], id: string): void;
|
|
102
|
-
/**
|
|
103
|
-
* Replaces symbols in a template.
|
|
104
|
-
*
|
|
105
|
-
* @param template Template to check for replacements; template is modified by this function
|
|
106
|
-
* @param replacements Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
107
|
-
* @returns template is returned after updating it
|
|
108
|
-
*/
|
|
109
|
-
export declare function replaceInTemplate(template: any, replacements: any): any;
|
|
110
|
-
/**
|
|
111
|
-
* Replaces a template entry in a list of templates.
|
|
112
|
-
*
|
|
113
|
-
* @param templates A collection of AGO item templates
|
|
114
|
-
* @param id Id of item in templates list to find; if not found, no replacement is done
|
|
115
|
-
* @param template Replacement template
|
|
116
|
-
* @returns True if replacement was made
|
|
117
|
-
* @private
|
|
118
|
-
*/
|
|
119
|
-
export declare function replaceTemplate(templates: IItemTemplate[], id: string, template: IItemTemplate): boolean;
|
|
120
|
-
export declare function templatizeTerm(context: string, term: string, suffix?: string): string;
|
|
121
|
-
/**
|
|
122
|
-
* Helper function to templatize value and make sure its converted to lowercase
|
|
123
|
-
*
|
|
124
|
-
* @param basePath path used to de-templatize while deploying
|
|
125
|
-
* @param value to be converted to lower case for lookup while deploying
|
|
126
|
-
*/
|
|
127
|
-
export declare function templatizeToLowerCase(basePath: string, value: string): string;
|
|
128
|
-
/**
|
|
129
|
-
* using each field from the datasource replace any occurances
|
|
130
|
-
* of the field name with the templatized value
|
|
131
|
-
* Needs to account for:
|
|
132
|
-
* "NAME"
|
|
133
|
-
* "NAME NAME2"
|
|
134
|
-
* "NAME ASC"
|
|
135
|
-
* "\{NAME\}"
|
|
136
|
-
* "(NAME = value AND NAME2 = someOtherValue)"
|
|
137
|
-
*/
|
|
138
|
-
export declare function templatizeFieldReferences(obj: any, fields: any[], basePath: string, templatizeKeys?: boolean): any;
|
|
139
|
-
export declare function templatizeIds(obj: any): any;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2021 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 { IItemTemplate, UserSession } from "./interfaces";
|
|
17
|
-
import { IItemUpdate } from "@esri/arcgis-rest-types";
|
|
18
|
-
import { ICreateServiceParams } from "@esri/arcgis-rest-service-admin";
|
|
19
|
-
/**
|
|
20
|
-
* Used by deploy to evaluate if we have everything we need to deploy tracking views.
|
|
21
|
-
*
|
|
22
|
-
* This function will update the input templateDictionary with a boolean
|
|
23
|
-
* indicating if tracking is enabled on the org and the user is an admin.
|
|
24
|
-
*
|
|
25
|
-
* @param portalResponse portal self response
|
|
26
|
-
* @param userResponse portal user response
|
|
27
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
28
|
-
* @param templates the list of IItemTemplates from the solution
|
|
29
|
-
*
|
|
30
|
-
* @private
|
|
31
|
-
*/
|
|
32
|
-
export declare function setLocationTrackingEnabled(portalResponse: any, userResponse: any, templateDictionary: any, templates?: IItemTemplate[]): void;
|
|
33
|
-
/**
|
|
34
|
-
* Used by deploy to evaluate if we have everything we need to deploy tracking views.
|
|
35
|
-
*
|
|
36
|
-
* An error is thrown to prevent additional deployment work if we have Tracking items and tracking is
|
|
37
|
-
* not enabled or the deployment user is not an admin in the organization.
|
|
38
|
-
*
|
|
39
|
-
* @param templates the list of IItemTemplates from the solution
|
|
40
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
41
|
-
*
|
|
42
|
-
* @private
|
|
43
|
-
*/
|
|
44
|
-
export declare function _validateTrackingTemplates(templates: IItemTemplate[], templateDictionary: any): void;
|
|
45
|
-
/**
|
|
46
|
-
* Used by deploy to determine the owner of the tracking service.
|
|
47
|
-
* Only one tracking service per org and all tracking views and tracking groups must be owned by the tracking service owner.
|
|
48
|
-
*
|
|
49
|
-
* This function will update the input templateDictionary with the owner as well as
|
|
50
|
-
* the item id for the source tracking service.
|
|
51
|
-
*
|
|
52
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
53
|
-
* @param authentication Credentials for the requests
|
|
54
|
-
*
|
|
55
|
-
* @private
|
|
56
|
-
*/
|
|
57
|
-
export declare function getTackingServiceOwner(templateDictionary: any, authentication: UserSession): Promise<boolean>;
|
|
58
|
-
/**
|
|
59
|
-
* Check key properties to understand if we are dealing with a tracking template
|
|
60
|
-
*
|
|
61
|
-
* @param itemTemplate the template to evaluate
|
|
62
|
-
* @param itemUpdate the item update to evaluate
|
|
63
|
-
*
|
|
64
|
-
* @private
|
|
65
|
-
*/
|
|
66
|
-
export declare function isTrackingViewTemplate(itemTemplate?: IItemTemplate, itemUpdate?: IItemUpdate): boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Check key properties to understand if we are dealing with a tracking group template
|
|
69
|
-
*
|
|
70
|
-
* @param itemTemplate the template to evaluate
|
|
71
|
-
*
|
|
72
|
-
* @private
|
|
73
|
-
*/
|
|
74
|
-
export declare function isTrackingViewGroup(itemTemplate: IItemTemplate): boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Templatize the tracker view group id and view name for location tracking views.
|
|
77
|
-
* This function will update the itemTemplate that is passed in when it's a tracking view.
|
|
78
|
-
*
|
|
79
|
-
* @param itemTemplate Template for feature service item
|
|
80
|
-
*
|
|
81
|
-
* @private
|
|
82
|
-
*/
|
|
83
|
-
export declare function templatizeTracker(itemTemplate: IItemTemplate): void;
|
|
84
|
-
/**
|
|
85
|
-
* Templatize the tracker view group id and view name for location tracking views.
|
|
86
|
-
* This function will update the itemTemplate that is passed in when it's a tracking view.
|
|
87
|
-
*
|
|
88
|
-
* @param itemTemplate Template for the tracker view
|
|
89
|
-
* @param path the path to the property that stores the current name
|
|
90
|
-
* @param groupId the id of the associated tracker group
|
|
91
|
-
* @param groupIdVar the variable to replace the existing name with
|
|
92
|
-
*
|
|
93
|
-
* @private
|
|
94
|
-
*/
|
|
95
|
-
export declare function _setName(itemTemplate: IItemTemplate, path: string, groupId: string, groupIdVar: string): void;
|
|
96
|
-
/**
|
|
97
|
-
* Templatize the tracker view serviceItemId
|
|
98
|
-
*
|
|
99
|
-
* This function will update the input obj with the templatized variable
|
|
100
|
-
*
|
|
101
|
-
* @param obj the object that stores the serviceItemId
|
|
102
|
-
* @param path the path to the property that stores the serviceItemId
|
|
103
|
-
*
|
|
104
|
-
* @private
|
|
105
|
-
*/
|
|
106
|
-
export declare function templatizeServiceItemId(obj: any, path: string): void;
|
|
107
|
-
/**
|
|
108
|
-
* Used by deploy to update the request options with key details for deploying tracker views
|
|
109
|
-
*
|
|
110
|
-
* @param itemTemplate Template for feature service item
|
|
111
|
-
* @param options the current request options to update
|
|
112
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
113
|
-
*
|
|
114
|
-
* @private
|
|
115
|
-
*/
|
|
116
|
-
export declare function setTrackingOptions(itemTemplate: IItemTemplate, options: any, templateDictionary: any): ICreateServiceParams;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2021 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
|
-
export declare const BASE_NAMES: string[];
|
|
18
|
-
export declare const PROP_NAMES: string[];
|
|
19
|
-
/**
|
|
20
|
-
* Get the base velocity url from the current orgs subscription info
|
|
21
|
-
*
|
|
22
|
-
* This function will update the input templateDictionary arg with the velocity url
|
|
23
|
-
* so we can reuse it without pinging the org again for subsequent requests to the
|
|
24
|
-
* velocity api.
|
|
25
|
-
*
|
|
26
|
-
* @param authentication Credentials for the requests
|
|
27
|
-
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
28
|
-
*
|
|
29
|
-
* @returns a promise that will resolve with the velocity url or an empty string when the org does not support velocity
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
export declare function getVelocityUrlBase(authentication: UserSession, templateDictionary: any): Promise<string>;
|
|
33
|
-
/**
|
|
34
|
-
* Update any velocity urls found in the data
|
|
35
|
-
*
|
|
36
|
-
* This function can be extended to support any item type specific functions such as
|
|
37
|
-
* removing the itemId from operational layers in a webmap
|
|
38
|
-
*
|
|
39
|
-
* @param data The data object of the item
|
|
40
|
-
* @param type The item type
|
|
41
|
-
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
42
|
-
*
|
|
43
|
-
* @returns an updated instance of the data object that was supplied.
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
export declare function updateVelocityReferences(data: any, type: string, templateDictionary: any): any;
|
|
47
|
-
/**
|
|
48
|
-
* Helper function to update velocity urls found in the data
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @param data The data object of the item
|
|
52
|
-
* @param velocityUrl The velocity url from the current organization
|
|
53
|
-
*
|
|
54
|
-
* @returns an updated instance of the data object that was supplied.
|
|
55
|
-
* @private
|
|
56
|
-
*/
|
|
57
|
-
export declare function _replaceVelocityUrls(data: any, velocityUrl: string): any;
|