@esri/solution-common 1.1.2 → 1.2.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/completeItem.js +6 -7
- package/dist/esm/completeItem.js.map +1 -1
- package/dist/esm/create-hub-request-options.d.ts +4 -4
- package/dist/esm/create-hub-request-options.js +9 -12
- package/dist/esm/create-hub-request-options.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteEmptyGroups.js +2 -2
- package/dist/esm/deleteHelpers/deleteEmptyGroups.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js +15 -15
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionContents.js +20 -22
- package/dist/esm/deleteHelpers/deleteSolutionContents.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionFolder.js +10 -10
- package/dist/esm/deleteHelpers/deleteSolutionFolder.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionItem.js +4 -4
- package/dist/esm/deleteHelpers/deleteSolutionItem.js.map +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js.map +1 -1
- package/dist/esm/deleteHelpers/removeItems.js +20 -29
- package/dist/esm/deleteHelpers/removeItems.js.map +1 -1
- package/dist/esm/deleteHelpers/reportProgress.js +3 -6
- package/dist/esm/deleteHelpers/reportProgress.js.map +1 -1
- package/dist/esm/deleteSolution.js +10 -12
- package/dist/esm/deleteSolution.js.map +1 -1
- package/dist/esm/dependencies.js +27 -19
- package/dist/esm/dependencies.js.map +1 -1
- package/dist/esm/featureServiceHelpers.d.ts +6 -0
- package/dist/esm/featureServiceHelpers.js +530 -500
- package/dist/esm/featureServiceHelpers.js.map +1 -1
- package/dist/esm/generalHelpers.js +72 -76
- package/dist/esm/generalHelpers.js.map +1 -1
- package/dist/esm/get-subscription-info.js +5 -3
- package/dist/esm/get-subscription-info.js.map +1 -1
- package/dist/esm/getDeletableSolutionInfo.js +6 -10
- package/dist/esm/getDeletableSolutionInfo.js.map +1 -1
- package/dist/esm/getSolutionSummary.js +15 -19
- package/dist/esm/getSolutionSummary.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces.d.ts +39 -1
- package/dist/esm/interfaces.js +3 -3
- package/dist/esm/interfaces.js.map +1 -1
- package/dist/esm/libConnectors.js +5 -7
- package/dist/esm/libConnectors.js.map +1 -1
- package/dist/esm/migrations/apply-schema.js +3 -3
- package/dist/esm/migrations/apply-schema.js.map +1 -1
- package/dist/esm/migrations/is-legacy-solution.js +2 -2
- package/dist/esm/migrations/is-legacy-solution.js.map +1 -1
- package/dist/esm/migrations/upgrade-three-dot-one.js +3 -3
- package/dist/esm/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/esm/migrations/upgrade-three-dot-zero.js +1 -1
- package/dist/esm/migrations/upgrade-three-dot-zero.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-five.js +17 -8
- package/dist/esm/migrations/upgrade-two-dot-five.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-four.js +12 -12
- package/dist/esm/migrations/upgrade-two-dot-four.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-one.js +1 -1
- package/dist/esm/migrations/upgrade-two-dot-one.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-seven.js +1 -1
- package/dist/esm/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-six.js +9 -12
- package/dist/esm/migrations/upgrade-two-dot-six.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-three.js +3 -3
- package/dist/esm/migrations/upgrade-two-dot-three.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-two.js +3 -3
- package/dist/esm/migrations/upgrade-two-dot-two.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-zero.js +8 -9
- package/dist/esm/migrations/upgrade-two-dot-zero.js.map +1 -1
- package/dist/esm/migrator.js +5 -7
- package/dist/esm/migrator.js.map +1 -1
- package/dist/esm/polyfills.js +5 -5
- package/dist/esm/polyfills.js.map +1 -1
- package/dist/esm/resourceHelpers.js +54 -57
- package/dist/esm/resourceHelpers.js.map +1 -1
- package/dist/esm/resources/add-resource-from-blob.js +2 -2
- package/dist/esm/resources/add-resource-from-blob.js.map +1 -1
- package/dist/esm/resources/addMetadataFromBlob.js +1 -1
- package/dist/esm/resources/addMetadataFromBlob.js.map +1 -1
- package/dist/esm/resources/convert-item-resource-to-storage-resource.js +6 -7
- package/dist/esm/resources/convert-item-resource-to-storage-resource.js.map +1 -1
- package/dist/esm/resources/convert-storage-resource-to-item-resource.js +8 -9
- package/dist/esm/resources/convert-storage-resource-to-item-resource.js.map +1 -1
- package/dist/esm/resources/copyAssociatedFiles.js +44 -53
- package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/esm/resources/copyDataIntoItem.js +5 -11
- package/dist/esm/resources/copyDataIntoItem.js.map +1 -1
- package/dist/esm/resources/copyMetadataIntoItem.js +4 -10
- package/dist/esm/resources/copyMetadataIntoItem.js.map +1 -1
- package/dist/esm/resources/copyResourceIntoZip.js +5 -7
- package/dist/esm/resources/copyResourceIntoZip.js.map +1 -1
- package/dist/esm/resources/copyZipIntoItem.js +5 -9
- package/dist/esm/resources/copyZipIntoItem.js.map +1 -1
- package/dist/esm/resources/createCopyResults.js +5 -2
- package/dist/esm/resources/createCopyResults.js.map +1 -1
- package/dist/esm/resources/get-blob.js +7 -5
- package/dist/esm/resources/get-blob.js.map +1 -1
- package/dist/esm/resources/getItemResourcesFilesFromPaths.js +7 -7
- package/dist/esm/resources/getItemResourcesFilesFromPaths.js.map +1 -1
- package/dist/esm/resources/getItemResourcesPaths.js +7 -8
- package/dist/esm/resources/getItemResourcesPaths.js.map +1 -1
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js +8 -9
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/esm/restHelpers.d.ts +65 -5
- package/dist/esm/restHelpers.js +422 -276
- package/dist/esm/restHelpers.js.map +1 -1
- package/dist/esm/restHelpersGet.js +102 -111
- package/dist/esm/restHelpersGet.js.map +1 -1
- package/dist/esm/sharing/share-item-to-groups.d.ts +2 -1
- package/dist/esm/sharing/share-item-to-groups.js +12 -6
- package/dist/esm/sharing/share-item-to-groups.js.map +1 -1
- package/dist/esm/templatization.js +64 -40
- package/dist/esm/templatization.js.map +1 -1
- package/dist/esm/trackingHelpers.d.ts +116 -0
- package/dist/esm/trackingHelpers.js +205 -0
- package/dist/esm/trackingHelpers.js.map +1 -0
- package/dist/esm/velocityHelpers.d.ts +2 -0
- package/dist/esm/velocityHelpers.js +30 -12
- package/dist/esm/velocityHelpers.js.map +1 -1
- package/dist/esm/workforceHelpers.d.ts +11 -0
- package/dist/esm/workforceHelpers.js +208 -180
- package/dist/esm/workforceHelpers.js.map +1 -1
- package/dist/node/completeItem.js +8 -9
- package/dist/node/completeItem.js.map +1 -1
- package/dist/node/create-hub-request-options.d.ts +4 -4
- package/dist/node/create-hub-request-options.js +11 -14
- package/dist/node/create-hub-request-options.js.map +1 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.js +3 -3
- package/dist/node/deleteHelpers/deleteEmptyGroups.js.map +1 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js +16 -16
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js.map +1 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.js +26 -28
- package/dist/node/deleteHelpers/deleteSolutionContents.js.map +1 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.js +11 -11
- package/dist/node/deleteHelpers/deleteSolutionFolder.js.map +1 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.js +6 -6
- package/dist/node/deleteHelpers/deleteSolutionItem.js.map +1 -1
- package/dist/node/deleteHelpers/index.js +1 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js +2 -2
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js.map +1 -1
- package/dist/node/deleteHelpers/removeItems.js +26 -35
- package/dist/node/deleteHelpers/removeItems.js.map +1 -1
- package/dist/node/deleteHelpers/reportProgress.js +4 -7
- package/dist/node/deleteHelpers/reportProgress.js.map +1 -1
- package/dist/node/deleteSolution.js +12 -14
- package/dist/node/deleteSolution.js.map +1 -1
- package/dist/node/dependencies.js +29 -21
- package/dist/node/dependencies.js.map +1 -1
- package/dist/node/featureServiceHelpers.d.ts +6 -0
- package/dist/node/featureServiceHelpers.js +535 -504
- package/dist/node/featureServiceHelpers.js.map +1 -1
- package/dist/node/generalHelpers.js +75 -79
- package/dist/node/generalHelpers.js.map +1 -1
- package/dist/node/get-subscription-info.js +7 -5
- package/dist/node/get-subscription-info.js.map +1 -1
- package/dist/node/getDeletableSolutionInfo.js +8 -12
- package/dist/node/getDeletableSolutionInfo.js.map +1 -1
- package/dist/node/getSolutionSummary.js +19 -23
- package/dist/node/getSolutionSummary.js.map +1 -1
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +2 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/interfaces.d.ts +39 -1
- package/dist/node/interfaces.js.map +1 -1
- package/dist/node/libConnectors.js +8 -10
- package/dist/node/libConnectors.js.map +1 -1
- package/dist/node/migrations/apply-schema.js +4 -4
- package/dist/node/migrations/apply-schema.js.map +1 -1
- package/dist/node/migrations/is-legacy-solution.js +3 -3
- package/dist/node/migrations/is-legacy-solution.js.map +1 -1
- package/dist/node/migrations/upgrade-three-dot-one.js +5 -5
- package/dist/node/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/node/migrations/upgrade-three-dot-zero.js +2 -2
- package/dist/node/migrations/upgrade-three-dot-zero.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-five.js +18 -9
- package/dist/node/migrations/upgrade-two-dot-five.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-four.js +13 -13
- package/dist/node/migrations/upgrade-two-dot-four.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-one.js +2 -2
- package/dist/node/migrations/upgrade-two-dot-one.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-seven.js +2 -2
- package/dist/node/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-six.js +10 -13
- package/dist/node/migrations/upgrade-two-dot-six.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-three.js +5 -5
- package/dist/node/migrations/upgrade-two-dot-three.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-two.js +5 -5
- package/dist/node/migrations/upgrade-two-dot-two.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-zero.js +9 -10
- package/dist/node/migrations/upgrade-two-dot-zero.js.map +1 -1
- package/dist/node/migrator.js +16 -18
- package/dist/node/migrator.js.map +1 -1
- package/dist/node/polyfills.js +5 -5
- package/dist/node/polyfills.js.map +1 -1
- package/dist/node/resourceHelpers.js +62 -65
- package/dist/node/resourceHelpers.js.map +1 -1
- package/dist/node/resources/add-resource-from-blob.js +4 -4
- package/dist/node/resources/add-resource-from-blob.js.map +1 -1
- package/dist/node/resources/addMetadataFromBlob.js +2 -2
- package/dist/node/resources/addMetadataFromBlob.js.map +1 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.js +6 -7
- package/dist/node/resources/convert-item-resource-to-storage-resource.js.map +1 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.js +9 -10
- package/dist/node/resources/convert-storage-resource-to-item-resource.js.map +1 -1
- package/dist/node/resources/copyAssociatedFiles.js +52 -61
- package/dist/node/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/node/resources/copyDataIntoItem.js +9 -15
- package/dist/node/resources/copyDataIntoItem.js.map +1 -1
- package/dist/node/resources/copyMetadataIntoItem.js +7 -13
- package/dist/node/resources/copyMetadataIntoItem.js.map +1 -1
- package/dist/node/resources/copyResourceIntoZip.js +7 -9
- package/dist/node/resources/copyResourceIntoZip.js.map +1 -1
- package/dist/node/resources/copyZipIntoItem.js +8 -12
- package/dist/node/resources/copyZipIntoItem.js.map +1 -1
- package/dist/node/resources/createCopyResults.js +5 -2
- package/dist/node/resources/createCopyResults.js.map +1 -1
- package/dist/node/resources/get-blob.js +8 -6
- package/dist/node/resources/get-blob.js.map +1 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.js +8 -8
- package/dist/node/resources/getItemResourcesFilesFromPaths.js.map +1 -1
- package/dist/node/resources/getItemResourcesPaths.js +9 -10
- package/dist/node/resources/getItemResourcesPaths.js.map +1 -1
- package/dist/node/resources/index.js +1 -1
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js +10 -11
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/node/restHelpers.d.ts +65 -5
- package/dist/node/restHelpers.js +437 -285
- package/dist/node/restHelpers.js.map +1 -1
- package/dist/node/restHelpersGet.js +107 -116
- package/dist/node/restHelpersGet.js.map +1 -1
- package/dist/node/sharing/index.js +1 -1
- package/dist/node/sharing/share-item-to-groups.d.ts +2 -1
- package/dist/node/sharing/share-item-to-groups.js +13 -7
- package/dist/node/sharing/share-item-to-groups.js.map +1 -1
- package/dist/node/templatization.js +61 -37
- package/dist/node/templatization.js.map +1 -1
- package/dist/node/trackingHelpers.d.ts +116 -0
- package/dist/node/trackingHelpers.js +217 -0
- package/dist/node/trackingHelpers.js.map +1 -0
- package/dist/node/velocityHelpers.d.ts +2 -0
- package/dist/node/velocityHelpers.js +33 -15
- package/dist/node/velocityHelpers.js.map +1 -1
- package/dist/node/workforceHelpers.d.ts +11 -0
- package/dist/node/workforceHelpers.js +214 -185
- package/dist/node/workforceHelpers.js.map +1 -1
- package/dist/umd/common.umd.js +14830 -14466
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +3 -3
- package/dist/umd/common.umd.min.js.map +1 -1
- package/dist/umd/create-hub-request-options.d.ts +4 -4
- package/dist/umd/featureServiceHelpers.d.ts +6 -0
- package/dist/umd/index.d.ts +1 -0
- package/dist/umd/interfaces.d.ts +39 -1
- package/dist/umd/restHelpers.d.ts +65 -5
- package/dist/umd/sharing/share-item-to-groups.d.ts +2 -1
- package/dist/umd/trackingHelpers.d.ts +116 -0
- package/dist/umd/velocityHelpers.d.ts +2 -0
- package/dist/umd/workforceHelpers.d.ts +11 -0
- package/package.json +24 -24
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { UserSession } from "./interfaces";
|
|
17
|
-
import {
|
|
17
|
+
import { IHubUserRequestOptions } from "@esri/hub-common";
|
|
18
18
|
/**
|
|
19
|
-
* Create a
|
|
19
|
+
* Create a IHubUserRequestOptions object from
|
|
20
20
|
* the UserSession
|
|
21
21
|
* If passed, it will use `templateDictionary`
|
|
22
22
|
* values instead of making additional requests
|
|
@@ -24,6 +24,6 @@ import { IHubRequestOptions } from "@esri/hub-common";
|
|
|
24
24
|
* @export
|
|
25
25
|
* @param {UserSession} authentication
|
|
26
26
|
* @param {*} templateDictionary
|
|
27
|
-
* @returns {
|
|
27
|
+
* @returns {IHubUserRequestOptions}
|
|
28
28
|
*/
|
|
29
|
-
export declare function createHubRequestOptions(authentication: UserSession, templateDictionary?: any): Promise<
|
|
29
|
+
export declare function createHubRequestOptions(authentication: UserSession, templateDictionary?: any): Promise<IHubUserRequestOptions>;
|
|
@@ -749,3 +749,9 @@ export interface IPopupInfos {
|
|
|
749
749
|
layers: INumberValuePair;
|
|
750
750
|
tables: INumberValuePair;
|
|
751
751
|
}
|
|
752
|
+
/**
|
|
753
|
+
* Helper function to ensure same chunk size value is used in multiple locations
|
|
754
|
+
*
|
|
755
|
+
* @return a number that represents how many layers should be included per addToDef call
|
|
756
|
+
*/
|
|
757
|
+
export declare function _getLayerChunkSize(): number;
|
package/dist/umd/index.d.ts
CHANGED
package/dist/umd/interfaces.d.ts
CHANGED
|
@@ -346,6 +346,13 @@ export interface IGroupCategory {
|
|
|
346
346
|
description?: string;
|
|
347
347
|
categories?: IGroupCategory[];
|
|
348
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Hierarchical arrangement of items and their dependencies.
|
|
351
|
+
*/
|
|
352
|
+
export interface IHierarchyElement {
|
|
353
|
+
id: string;
|
|
354
|
+
dependencies: IHierarchyElement[];
|
|
355
|
+
}
|
|
349
356
|
/**
|
|
350
357
|
* Subset of portal.IItem containing just the properties that are stored in a template--the item's "base" section.
|
|
351
358
|
*/
|
|
@@ -424,7 +431,7 @@ export interface IItemTemplate {
|
|
|
424
431
|
* Function signatures for use in a function lookup array.
|
|
425
432
|
*/
|
|
426
433
|
export interface IItemTemplateConversions {
|
|
427
|
-
convertItemToTemplate(solutionItemId: string, itemInfo: any,
|
|
434
|
+
convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary?: any): Promise<IItemTemplate>;
|
|
428
435
|
createItemFromTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
|
|
429
436
|
postProcessDependencies?(templates: IItemTemplate[], clonedSolutionsResponse: ICreateItemFromTemplateResponse[], authentication: UserSession, templateDictionary: any): Promise<any>;
|
|
430
437
|
}
|
|
@@ -432,6 +439,9 @@ export interface IItemTemplateConversions {
|
|
|
432
439
|
* Structure for mapping from item type to module with type-specific template-handling code
|
|
433
440
|
*/
|
|
434
441
|
export declare type moduleHandler = IItemTemplateConversions | undefined | null;
|
|
442
|
+
/**
|
|
443
|
+
* Mapping from an AGO item type to the code handling that type.
|
|
444
|
+
*/
|
|
435
445
|
export interface IItemTypeModuleMap {
|
|
436
446
|
[itemType: string]: moduleHandler;
|
|
437
447
|
}
|
|
@@ -443,9 +453,15 @@ export interface IItemUpdate {
|
|
|
443
453
|
*/
|
|
444
454
|
[key: string]: any;
|
|
445
455
|
}
|
|
456
|
+
/**
|
|
457
|
+
* Type with key access to lists of strings
|
|
458
|
+
*/
|
|
446
459
|
export interface IKeyedListsOfStrings {
|
|
447
460
|
[key: string]: string[];
|
|
448
461
|
}
|
|
462
|
+
/**
|
|
463
|
+
* Type with key access to strings
|
|
464
|
+
*/
|
|
449
465
|
export interface IMimeTypes {
|
|
450
466
|
[key: string]: string;
|
|
451
467
|
}
|
|
@@ -503,10 +519,16 @@ export interface IQuickCaptureDatasource {
|
|
|
503
519
|
*/
|
|
504
520
|
url: number;
|
|
505
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* A mapping between a relationship type and the list of item ids using that relationship.
|
|
524
|
+
*/
|
|
506
525
|
export interface IRelatedItems {
|
|
507
526
|
relationshipType: string;
|
|
508
527
|
relatedItemIds: string[];
|
|
509
528
|
}
|
|
529
|
+
/**
|
|
530
|
+
* Summary of a resource.
|
|
531
|
+
*/
|
|
510
532
|
export interface IResource {
|
|
511
533
|
resource: string;
|
|
512
534
|
created: number;
|
|
@@ -576,6 +598,9 @@ export interface ISolutionProgressEvent {
|
|
|
576
598
|
*/
|
|
577
599
|
data?: any;
|
|
578
600
|
}
|
|
601
|
+
/**
|
|
602
|
+
* Information about a resource to be copied into an item.
|
|
603
|
+
*/
|
|
579
604
|
export interface ISourceFile {
|
|
580
605
|
/**
|
|
581
606
|
* The portal item id, e.g., "4efe5f693de34620934787ead6693f19", that supplies the resource
|
|
@@ -789,6 +814,9 @@ export interface ISurvey123CreateResult {
|
|
|
789
814
|
*/
|
|
790
815
|
export interface IZipCopyResults extends IZipInfo, ICopyResults {
|
|
791
816
|
}
|
|
817
|
+
/**
|
|
818
|
+
* Information about a zipped file.
|
|
819
|
+
*/
|
|
792
820
|
export interface IZipInfo {
|
|
793
821
|
/**
|
|
794
822
|
* Zip's filename
|
|
@@ -803,3 +831,13 @@ export interface IZipInfo {
|
|
|
803
831
|
*/
|
|
804
832
|
filelist: any[];
|
|
805
833
|
}
|
|
834
|
+
export interface IVelocityTitle {
|
|
835
|
+
/**
|
|
836
|
+
* The current label for the object
|
|
837
|
+
*/
|
|
838
|
+
label: string;
|
|
839
|
+
/**
|
|
840
|
+
* Existing titles that have been used in the org
|
|
841
|
+
*/
|
|
842
|
+
titles: string[];
|
|
843
|
+
}
|
|
@@ -14,9 +14,17 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { IAddFolderResponse, IAddGroupResponse, IAdditionalSearchOptions, ICreateItemResponse, ICreateServiceResult, IDependency, IExtent, IFeatureServiceProperties, IFolderStatusResponse, IGroup, IGroupAdd, IItem, IItemTemplate, IItemUpdate, IPostProcessArgs, IRelatedItems, ISpatialReference, IStatusResponse, ItemRelationshipType, IUpdate, IUpdateItemResponse, UserSession } from "./interfaces";
|
|
17
|
-
import {
|
|
17
|
+
import { IUserSessionOptions } from "@esri/arcgis-rest-auth";
|
|
18
|
+
import { IPagingParams, ISearchOptions, ISearchResult, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
|
|
18
19
|
import { IParams } from "@esri/arcgis-rest-request";
|
|
19
20
|
export { request as rest_request } from "@esri/arcgis-rest-request";
|
|
21
|
+
/**
|
|
22
|
+
* Creates a UserSession via a function so that the global arcgisSolution variable can access authentication.
|
|
23
|
+
*
|
|
24
|
+
* @param options See https://esri.github.io/arcgis-rest-js/api/auth/IUserSessionOptions/
|
|
25
|
+
* @return UserSession
|
|
26
|
+
*/
|
|
27
|
+
export declare function getUserSession(options?: IUserSessionOptions): UserSession;
|
|
20
28
|
/**
|
|
21
29
|
* Searches for items matching a query and that the caller has access to.
|
|
22
30
|
*
|
|
@@ -164,9 +172,13 @@ export declare function createUniqueFolder(title: string, templateDictionary: an
|
|
|
164
172
|
* @param title Group title, used as-is if possible and with suffix otherwise
|
|
165
173
|
* @param templateDictionary Hash of facts: org URL, adlib replacements, user
|
|
166
174
|
* @param authentication Credentials for creating group
|
|
175
|
+
* @param owner Optional arg for the Tracking owner
|
|
176
|
+
* If the tracking owner is not the one deploying the solution
|
|
177
|
+
* tracker groups will be created under the deployment user but
|
|
178
|
+
* will be reassigned to the tracking owner.
|
|
167
179
|
* @return Information about created group
|
|
168
180
|
*/
|
|
169
|
-
export declare function createUniqueGroup(title: string, groupItem: IGroupAdd, templateDictionary: any, authentication: UserSession): Promise<IAddGroupResponse>;
|
|
181
|
+
export declare function createUniqueGroup(title: string, groupItem: IGroupAdd, templateDictionary: any, authentication: UserSession, owner?: string): Promise<IAddGroupResponse>;
|
|
170
182
|
/**
|
|
171
183
|
* Gets the ids of the dependencies of an AGOL feature service item.
|
|
172
184
|
* Dependencies will only exist when the service is a view.
|
|
@@ -189,10 +201,22 @@ export declare function getLayers(serviceUrl: string, layerList: any[], authenti
|
|
|
189
201
|
* Add additional options to a layers definition.
|
|
190
202
|
*
|
|
191
203
|
* @param args The IPostProcessArgs for the request(s)
|
|
204
|
+
* @param isPortal boolean to indicate if we are deploying to portal
|
|
205
|
+
*
|
|
192
206
|
* @return An array of update instructions
|
|
193
207
|
* @private
|
|
194
208
|
*/
|
|
195
209
|
export declare function getLayerUpdates(args: IPostProcessArgs, isPortal: boolean): IUpdate[];
|
|
210
|
+
/**
|
|
211
|
+
* Sorts relationships based on order of supporting layers and tables in the service definition
|
|
212
|
+
*
|
|
213
|
+
* @param layers the layers from the service
|
|
214
|
+
* @param tables the tables from the service
|
|
215
|
+
* @param relUpdates the relationships to add for the service
|
|
216
|
+
*
|
|
217
|
+
* @return An array with relationships that have been sorted
|
|
218
|
+
*/
|
|
219
|
+
export declare function _sortRelationships(layers: any[], tables: any[], relUpdates: any): any[];
|
|
196
220
|
/**
|
|
197
221
|
* Update view service when sourceSchemaChangesAllowed is true.
|
|
198
222
|
*
|
|
@@ -296,6 +320,17 @@ export declare function removeItemOrGroup(itemId: string, authentication: UserSe
|
|
|
296
320
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
297
321
|
*/
|
|
298
322
|
export declare function searchGroups(searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalSearchOptions): Promise<ISearchResult<IGroup>>;
|
|
323
|
+
/**
|
|
324
|
+
* Searches for groups matching criteria recurusively.
|
|
325
|
+
*
|
|
326
|
+
* @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
|
|
327
|
+
* @param authentication Credentials for the request to AGO
|
|
328
|
+
* @param groups List of groups that have been found from previous requests
|
|
329
|
+
* @param inPagingParams The paging params for the recurisve searching
|
|
330
|
+
*
|
|
331
|
+
* @return A promise that will resolve with all groups that meet the search criteria
|
|
332
|
+
*/
|
|
333
|
+
export declare function searchAllGroups(searchString: string, authentication: UserSession, groups?: IGroup[], inPagingParams?: IPagingParams): Promise<IGroup[]>;
|
|
299
334
|
/**
|
|
300
335
|
* Searches for group contents matching criteria.
|
|
301
336
|
*
|
|
@@ -311,16 +346,40 @@ export declare function searchGroups(searchString: string, authentication: UserS
|
|
|
311
346
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
312
347
|
*/
|
|
313
348
|
export declare function searchGroupContents(groupId: string, searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalSearchOptions, portalUrl?: string): Promise<ISearchResult<IItem>>;
|
|
349
|
+
/**
|
|
350
|
+
* Reassign ownership of a group
|
|
351
|
+
*
|
|
352
|
+
* @param groupId Group to remove users from
|
|
353
|
+
* @param userName The new owner for the group
|
|
354
|
+
* @param authentication Credentials for the request to
|
|
355
|
+
*
|
|
356
|
+
* @return A promise that will resolve after the group ownership has been assigned
|
|
357
|
+
*
|
|
358
|
+
*/
|
|
359
|
+
export declare function reassignGroup(groupId: string, userName: string, authentication: UserSession): Promise<any>;
|
|
360
|
+
/**
|
|
361
|
+
* Remove users from a group
|
|
362
|
+
*
|
|
363
|
+
* @param groupId Group to remove users from
|
|
364
|
+
* @param users List of users to remove from the group
|
|
365
|
+
* @param authentication Credentials for the request to
|
|
366
|
+
*
|
|
367
|
+
* @return A promise that will resolve after the users have been removed
|
|
368
|
+
*
|
|
369
|
+
*/
|
|
370
|
+
export declare function removeUsers(groupId: string, users: string[], authentication: UserSession): Promise<any>;
|
|
314
371
|
/**
|
|
315
372
|
* Shares an item to the defined group
|
|
316
373
|
*
|
|
317
374
|
* @param groupId Group to share with
|
|
318
375
|
* @param id the item id to share with the group
|
|
319
376
|
* @param destinationAuthentication Credentials for the request to AGO
|
|
377
|
+
* @param owner owner of the group when sharing tracking items (can be different from the deploying user)
|
|
378
|
+
*
|
|
320
379
|
* @return A promise that will resolve after the item has been shared
|
|
321
380
|
*
|
|
322
381
|
*/
|
|
323
|
-
export declare function shareItem(groupId: string, id: string, destinationAuthentication: UserSession): Promise<void>;
|
|
382
|
+
export declare function shareItem(groupId: string, id: string, destinationAuthentication: UserSession, owner?: string): Promise<void>;
|
|
324
383
|
/**
|
|
325
384
|
* Updates an item.
|
|
326
385
|
*
|
|
@@ -342,7 +401,7 @@ export declare function updateItem(itemInfo: IItemUpdate, authentication: UserSe
|
|
|
342
401
|
* @param access "public" or "org"
|
|
343
402
|
* @return
|
|
344
403
|
*/
|
|
345
|
-
export declare function updateItemExtended(itemInfo: IItemUpdate, data: any, authentication: UserSession, thumbnail?: File, access?: string | undefined): Promise<IUpdateItemResponse>;
|
|
404
|
+
export declare function updateItemExtended(itemInfo: IItemUpdate, data: any, authentication: UserSession, thumbnail?: File, access?: string | undefined, templateDictionary?: any): Promise<IUpdateItemResponse>;
|
|
346
405
|
/**
|
|
347
406
|
* Update an item's base and data using a dictionary.
|
|
348
407
|
*
|
|
@@ -444,12 +503,13 @@ export declare function _reportVariablesInItem(itemId: string, itemType: string,
|
|
|
444
503
|
* Updates a feature service item.
|
|
445
504
|
*
|
|
446
505
|
* @param item Item to update
|
|
506
|
+
* @param itemTemplate item template for the new item
|
|
447
507
|
* @param serviceInfo Service information
|
|
448
508
|
* @param params arcgis-rest-js params to update
|
|
449
509
|
* @param isPortal Is the service hosted in a portal?
|
|
450
510
|
* @return Updated item
|
|
451
511
|
*/
|
|
452
|
-
export declare function _setItemProperties(item: any, serviceInfo: any, params: IParams, isPortal: boolean): any;
|
|
512
|
+
export declare function _setItemProperties(item: any, itemTemplate: IItemTemplate, serviceInfo: any, params: IParams, isPortal: boolean): any;
|
|
453
513
|
/**
|
|
454
514
|
* Set isUnique as true for indexes that reference origin relationship keyFields.
|
|
455
515
|
*
|
|
@@ -21,5 +21,6 @@ import { UserSession } from "../";
|
|
|
21
21
|
* @param groups Array of Group Ids
|
|
22
22
|
* @param itemId Item Id
|
|
23
23
|
* @param authentication UserSession
|
|
24
|
+
* @param owner owner of the group when sharing tracking items (can be different from the deploying user)
|
|
24
25
|
*/
|
|
25
|
-
export declare function shareItemToGroups(groupIds: string[], itemId: string, authentication: UserSession): Promise<any>;
|
|
26
|
+
export declare function shareItemToGroups(groupIds: string[], itemId: string, authentication: UserSession, owner?: string): Promise<any>;
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
* @protected
|
|
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
|
+
* @protected
|
|
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
|
+
* @protected
|
|
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
|
+
* @protected
|
|
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
|
+
* @protected
|
|
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
|
+
* @protected
|
|
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
|
+
* @protected
|
|
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
|
+
* @protected
|
|
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
|
+
* @protected
|
|
115
|
+
*/
|
|
116
|
+
export declare function setTrackingOptions(itemTemplate: IItemTemplate, options: any, templateDictionary: any): ICreateServiceParams;
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { UserSession } from "./interfaces";
|
|
17
|
+
export declare const BASE_NAMES: string[];
|
|
18
|
+
export declare const PROP_NAMES: string[];
|
|
17
19
|
/**
|
|
18
20
|
* Get the base velocity url from the current orgs subscription info
|
|
19
21
|
*
|
|
@@ -49,6 +49,17 @@ export declare function templatizeWorkforce(data: any, keyProperties: string[],
|
|
|
49
49
|
*/
|
|
50
50
|
export declare function getWorkforceDependencies(itemTemplate: IItemTemplate, dependencies: any[]): any;
|
|
51
51
|
export declare function getWorkforceServiceInfo(properties: IFeatureServiceProperties, url: string, authentication: UserSession): Promise<IFeatureServiceProperties>;
|
|
52
|
+
/**
|
|
53
|
+
* Wrap global id and assignmenttype values in curly braces
|
|
54
|
+
*
|
|
55
|
+
* Added for issue #734
|
|
56
|
+
*
|
|
57
|
+
* This function will update the provided workforceInfos object
|
|
58
|
+
*
|
|
59
|
+
* @param workforceInfos the object that stores the integration and type info with global ids
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
export declare function _updateGlobalIdAndAssignmentType(workforceInfos: any): void;
|
|
52
63
|
export declare function _getAssignmentTypeInfos(assignmentTypes: any): any[];
|
|
53
64
|
export declare function _getAssignmentIntegrationInfos(assignmentIntegrations: any, authentication: UserSession): Promise<any>;
|
|
54
65
|
export declare function getUrlDependencies(requests: Array<Promise<any>>, urls: string[]): Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Provides general helper functions for @esri/solution.js.",
|
|
5
5
|
"main": "dist/node/index.js",
|
|
6
6
|
"unpkg": "dist/umd/common.umd.min.js",
|
|
@@ -13,36 +13,36 @@
|
|
|
13
13
|
"dist/**"
|
|
14
14
|
],
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@esri/arcgis-rest-auth": "
|
|
17
|
-
"@esri/arcgis-rest-feature-layer": "
|
|
18
|
-
"@esri/arcgis-rest-portal": "
|
|
19
|
-
"@esri/arcgis-rest-request": "
|
|
20
|
-
"@esri/arcgis-rest-service-admin": "
|
|
21
|
-
"@esri/hub-common": "
|
|
22
|
-
"@esri/hub-initiatives": "
|
|
23
|
-
"@esri/hub-sites": "
|
|
24
|
-
"@esri/hub-teams": "
|
|
16
|
+
"@esri/arcgis-rest-auth": "3.4.3",
|
|
17
|
+
"@esri/arcgis-rest-feature-layer": "3.4.3",
|
|
18
|
+
"@esri/arcgis-rest-portal": "3.4.3",
|
|
19
|
+
"@esri/arcgis-rest-request": "3.4.3",
|
|
20
|
+
"@esri/arcgis-rest-service-admin": "3.4.3",
|
|
21
|
+
"@esri/hub-common": "9.7.2",
|
|
22
|
+
"@esri/hub-initiatives": "9.7.2",
|
|
23
|
+
"@esri/hub-sites": "9.7.2",
|
|
24
|
+
"@esri/hub-teams": "9.7.2",
|
|
25
25
|
"@types/adlib": "^3.0.1",
|
|
26
|
-
"rollup": "^
|
|
26
|
+
"rollup": "^2.60.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@esri/arcgis-rest-auth": "
|
|
30
|
-
"@esri/arcgis-rest-feature-layer": "
|
|
31
|
-
"@esri/arcgis-rest-portal": "
|
|
32
|
-
"@esri/arcgis-rest-request": "
|
|
33
|
-
"@esri/arcgis-rest-service-admin": "
|
|
34
|
-
"@esri/hub-common": "
|
|
35
|
-
"@esri/hub-initiatives": "
|
|
36
|
-
"@esri/hub-sites": "
|
|
37
|
-
"@esri/hub-teams": "
|
|
29
|
+
"@esri/arcgis-rest-auth": "3.4.3",
|
|
30
|
+
"@esri/arcgis-rest-feature-layer": "3.4.3",
|
|
31
|
+
"@esri/arcgis-rest-portal": "3.4.3",
|
|
32
|
+
"@esri/arcgis-rest-request": "3.4.3",
|
|
33
|
+
"@esri/arcgis-rest-service-admin": "3.4.3",
|
|
34
|
+
"@esri/hub-common": "9.7.2",
|
|
35
|
+
"@esri/hub-initiatives": "9.7.2",
|
|
36
|
+
"@esri/hub-sites": "9.7.2",
|
|
37
|
+
"@esri/hub-teams": "9.7.2"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@esri/arcgis-html-sanitizer": "
|
|
40
|
+
"@esri/arcgis-html-sanitizer": "2.8.0",
|
|
41
41
|
"@types/lodash.isplainobject": "^4.0.6",
|
|
42
42
|
"adlib": "3.0.7",
|
|
43
|
-
"jszip": "3.7.
|
|
43
|
+
"jszip": "3.7.1",
|
|
44
44
|
"lodash.isplainobject": "^4.0.6",
|
|
45
|
-
"tslib": "
|
|
45
|
+
"tslib": "1.13.0",
|
|
46
46
|
"xss": "^1.0.6"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"esri",
|
|
96
96
|
"ES6"
|
|
97
97
|
],
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "70f706fb28a50db0b9b13030f263f8e9e270b98d"
|
|
99
99
|
}
|