@esri/solution-workflow 5.2.1 → 5.2.2

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.
Files changed (56) hide show
  1. package/README.md +3 -6
  2. package/dist/cjs/index.js.map +1 -0
  3. package/dist/{esm/workflow/src → cjs}/workflow.d.ts +12 -3
  4. package/dist/cjs/workflow.js +118 -0
  5. package/dist/cjs/workflow.js.map +1 -0
  6. package/dist/esm/index.js.map +1 -0
  7. package/dist/{cjs/workflow/src → esm}/workflow.d.ts +12 -3
  8. package/dist/esm/workflow.js +112 -0
  9. package/dist/esm/workflow.js.map +1 -0
  10. package/package.json +3 -3
  11. package/dist/cjs/common/src/generalHelpers.d.ts +0 -400
  12. package/dist/cjs/common/src/generalHelpers.js +0 -877
  13. package/dist/cjs/common/src/generalHelpers.js.map +0 -1
  14. package/dist/cjs/common/src/getItemTypeAbbrev.d.ts +0 -19
  15. package/dist/cjs/common/src/getItemTypeAbbrev.js +0 -186
  16. package/dist/cjs/common/src/getItemTypeAbbrev.js.map +0 -1
  17. package/dist/cjs/common/src/interfaces.d.ts +0 -1344
  18. package/dist/cjs/common/src/interfaces.js +0 -77
  19. package/dist/cjs/common/src/interfaces.js.map +0 -1
  20. package/dist/cjs/common/src/libConnectors.d.ts +0 -73
  21. package/dist/cjs/common/src/libConnectors.js +0 -115
  22. package/dist/cjs/common/src/libConnectors.js.map +0 -1
  23. package/dist/cjs/common/test/mocks/templates.d.ts +0 -71
  24. package/dist/cjs/common/test/mocks/templates.js +0 -1220
  25. package/dist/cjs/common/test/mocks/templates.js.map +0 -1
  26. package/dist/cjs/common/test/mocks/utils.d.ts +0 -605
  27. package/dist/cjs/common/test/mocks/utils.js +0 -1222
  28. package/dist/cjs/common/test/mocks/utils.js.map +0 -1
  29. package/dist/cjs/workflow/src/index.js.map +0 -1
  30. package/dist/cjs/workflow/src/workflow.js +0 -51
  31. package/dist/cjs/workflow/src/workflow.js.map +0 -1
  32. package/dist/esm/common/src/generalHelpers.d.ts +0 -400
  33. package/dist/esm/common/src/generalHelpers.js +0 -829
  34. package/dist/esm/common/src/generalHelpers.js.map +0 -1
  35. package/dist/esm/common/src/getItemTypeAbbrev.d.ts +0 -19
  36. package/dist/esm/common/src/getItemTypeAbbrev.js +0 -182
  37. package/dist/esm/common/src/getItemTypeAbbrev.js.map +0 -1
  38. package/dist/esm/common/src/interfaces.d.ts +0 -1344
  39. package/dist/esm/common/src/interfaces.js +0 -72
  40. package/dist/esm/common/src/interfaces.js.map +0 -1
  41. package/dist/esm/common/src/libConnectors.d.ts +0 -73
  42. package/dist/esm/common/src/libConnectors.js +0 -105
  43. package/dist/esm/common/src/libConnectors.js.map +0 -1
  44. package/dist/esm/common/test/mocks/templates.d.ts +0 -71
  45. package/dist/esm/common/test/mocks/templates.js +0 -1195
  46. package/dist/esm/common/test/mocks/templates.js.map +0 -1
  47. package/dist/esm/common/test/mocks/utils.d.ts +0 -605
  48. package/dist/esm/common/test/mocks/utils.js +0 -1177
  49. package/dist/esm/common/test/mocks/utils.js.map +0 -1
  50. package/dist/esm/workflow/src/index.js.map +0 -1
  51. package/dist/esm/workflow/src/workflow.js +0 -45
  52. package/dist/esm/workflow/src/workflow.js.map +0 -1
  53. /package/dist/cjs/{workflow/src/index.d.ts → index.d.ts} +0 -0
  54. /package/dist/cjs/{workflow/src/index.js → index.js} +0 -0
  55. /package/dist/esm/{workflow/src/index.d.ts → index.d.ts} +0 -0
  56. /package/dist/esm/{workflow/src/index.js → index.js} +0 -0
@@ -1,1344 +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 interfaces.
18
- */
19
- import { IGetRelatedItemsResponse, IGroup, IItem, IItemRelationshipOptions } from "@esri/arcgis-rest-portal";
20
- import { ISpatialReference } from "@esri/arcgis-rest-service-admin";
21
- import { UserSession } from "@esri/arcgis-rest-auth";
22
- export { IUserRequestOptions, IUserSessionOptions, UserSession } from "@esri/arcgis-rest-auth";
23
- export { IFeature, IQueryRelatedOptions, IQueryRelatedResponse, IRelatedRecordGroup, queryRelated } from "@esri/arcgis-rest-feature-layer";
24
- export { IAddFolderResponse, ICreateItemResponse, IGetRelatedItemsResponse, IGroup, IGroupAdd, IItem, IPagingParams, IPortal, ISearchResult, ItemRelationshipType, IUpdateItemResponse, IUser } from "@esri/arcgis-rest-portal";
25
- export { ICreateServiceResult, IExtent, ISpatialReference } from "@esri/arcgis-rest-service-admin";
26
- import JSZip from "jszip";
27
- export declare const SolutionTemplateFormatVersion = 1;
28
- export declare const DeployedSolutionFormatVersion = 1;
29
- export declare const UNREACHABLE = "unreachable";
30
- /**
31
- * Flags for storing an item's binary resources.
32
- */
33
- export declare enum EFileType {
34
- Data = 0,
35
- Info = 1,
36
- Metadata = 2,
37
- Resource = 3,
38
- Thumbnail = 4
39
- }
40
- /**
41
- * Text versions of flags for storing an item's binary resources.
42
- */
43
- export declare enum SFileType {
44
- "Data" = 0,
45
- "Info" = 1,
46
- "Metadata" = 2,
47
- "Resource" = 3,
48
- "Thumbnail" = 4
49
- }
50
- /**
51
- * Flags for reporting the status of creating or deploying an item.
52
- */
53
- export declare enum EItemProgressStatus {
54
- Started = 0,
55
- Created = 1,
56
- Cancelled = 2,
57
- Finished = 3,
58
- Ignored = 4,
59
- Failed = 5,
60
- Unknown = 6
61
- }
62
- /**
63
- * Text versions of flags for reporting the status of creating or deploying an item.
64
- */
65
- export declare const SItemProgressStatus: string[];
66
- /**
67
- * Function signature describing internal item-level progress to enable cancellation and rollback in case of failure
68
- *
69
- */
70
- export type IItemProgressCallback = (
71
- /**
72
- * Id of item
73
- */
74
- itemId: string,
75
- /**
76
- * Progress status code (e.g., Started, Created,...)
77
- */
78
- status: EItemProgressStatus,
79
- /**
80
- * Accumulated "costs" of task, which can be divided by the total estimated cost to get percent done
81
- */
82
- costUsed: number,
83
- /**
84
- * Id of created item, which is supplied when status is EItemProgressStatus.Created or .Finished
85
- */
86
- createdItemId?: string) => boolean;
87
- /**
88
- * Function signature describing progress to calling programs
89
- */
90
- export type ISolutionProgressCallback = (
91
- /**
92
- * Percent of total work done
93
- */
94
- percentDone: number,
95
- /**
96
- * Calling-program-supplied id, perhaps used to distinguish between concurrent deployments or deletions
97
- */
98
- jobId?: string,
99
- /**
100
- * Packet of supplemental information provided from certain progress states, e.g., Finished deleting an item
101
- * or deploying a Solution item
102
- */
103
- progressEvent?: ISolutionProgressEvent) => void;
104
- export type INoArgFunction = () => any;
105
- /**
106
- * Result of creating a unique group
107
- */
108
- export interface IAddGroupResponse {
109
- /**
110
- * Success or failure
111
- */
112
- success: boolean;
113
- /**
114
- * Id of created group
115
- */
116
- group: IGroup;
117
- }
118
- /**
119
- * Additional info to be used when searching the contents of a group
120
- */
121
- export interface IAdditionalGroupSearchOptions {
122
- /**
123
- * The number of the first entry requested. The index number is 1-based.
124
- */
125
- start?: number;
126
- /**
127
- * The number of results requested.
128
- */
129
- num?: number;
130
- /**
131
- * Sets sort field for group items. Values: title | owner | avgrating | numviews | created | modified
132
- */
133
- sortField?: string;
134
- /**
135
- * Sets sort order for group items. Values: asc | desc
136
- */
137
- sortOrder?: string;
138
- /**
139
- * The bounding box for a spatial search defined as minx, miny, maxx, or maxy. Spatial search is an
140
- * overlaps/intersects function of the query bbox and the extent of the document. Documents that have
141
- * no extent (for example, mxds, 3dds, lyr) will not be found when doing a bbox search. Document extent
142
- * is assumed to be in the WGS84 geographic coordinate system. E.g.: "-118,32,-116,34"
143
- */
144
- bbox?: string;
145
- /**
146
- * A list of desired categories; maximum of 8
147
- */
148
- categories?: string[];
149
- /**
150
- * Generically definines remaining/unused properties
151
- */
152
- [key: string]: any;
153
- }
154
- /**
155
- * Results of fetching and copying a file associated with an item.
156
- */
157
- export interface IAssociatedFileCopyResults extends IAssociatedFileInfo, ICopyResults {
158
- }
159
- /**
160
- * Information for working with a file associated with an item.
161
- */
162
- export interface IAssociatedFileInfo {
163
- /**
164
- * Resource's "folder"--the prefix before the filename
165
- */
166
- folder: string;
167
- /**
168
- * Resource's filename
169
- */
170
- filename: string;
171
- /**
172
- * An internal classification of the type of file: data, metadata, resource
173
- */
174
- type?: EFileType;
175
- /**
176
- * The mime type of the file
177
- */
178
- mimeType?: string;
179
- /**
180
- * URL where a resource, metadata, or thumbnail of an item or group can be found
181
- */
182
- url?: string;
183
- /**
184
- * File holding a resource, metadata, or thumbnail of an item or group
185
- */
186
- file?: File;
187
- }
188
- /**
189
- * Describes the results of topologically sorting items to be deployed so that dependencies are created before
190
- * the items that depend on them.
191
- */
192
- export interface IBuildOrdering {
193
- /**
194
- * Item ids in order in which items are to be built.
195
- */
196
- buildOrder: string[];
197
- /**
198
- * Item ids of dependencies that were not supplied to ordering algorithm.
199
- */
200
- missingDependencies: string[];
201
- /**
202
- * Dictionary of item ids that need dependency patching; each id has a list of the ids of the dependencies to be patched.
203
- */
204
- itemsToBePatched: IKeyedListsOfStrings;
205
- }
206
- /**
207
- * Holds a complete AGO item.
208
- */
209
- export interface ICompleteItem {
210
- /**
211
- * The "base" information of an item as MIME format text/plain JSON
212
- */
213
- base: IItem;
214
- /**
215
- * The data section of an item as a file even though it may be JSON
216
- */
217
- data: File;
218
- /**
219
- * The item's thumbnail as MIME format image/*
220
- */
221
- thumbnail: File;
222
- /**
223
- * The item's metadata as MIME format application/xml
224
- */
225
- metadata: File;
226
- /**
227
- * The item's resource files
228
- */
229
- resources: File[];
230
- /**
231
- * list of forward relationshipType/relatedItems[] pairs
232
- */
233
- fwdRelatedItems: IRelatedItems[];
234
- /**
235
- * list of reverse relationshipType/relatedItems[] pairs
236
- */
237
- revRelatedItems: IRelatedItems[];
238
- /**
239
- * Additional feature-service-only info
240
- */
241
- featureServiceProperties?: IFeatureServiceProperties;
242
- /**
243
- * Additional workflow-only info
244
- */
245
- workflowConfiguration?: any;
246
- }
247
- /**
248
- * Results of fetching and copying an item.
249
- */
250
- export interface ICopyResults {
251
- /**
252
- * Status of fetching item from source
253
- */
254
- fetchedFromSource: boolean;
255
- /**
256
- * Status of copying item to destination; undefined if fetchedFromSource is false
257
- */
258
- copiedToDestination?: boolean;
259
- }
260
- export interface ICreateItemFromTemplateResponse {
261
- /**
262
- * Created item
263
- */
264
- item?: IItemTemplate;
265
- /**
266
- * Item's AGO id
267
- */
268
- id: string;
269
- /**
270
- * AGO item type name
271
- */
272
- type: string;
273
- /**
274
- * Does the item need post processing to handle unresolved variables
275
- */
276
- postProcess: boolean;
277
- }
278
- /**
279
- * Options for creating a solution item.
280
- */
281
- export interface ICreateSolutionOptions {
282
- /**
283
- * Calling-program-supplied id, perhaps used to distinguish between concurrent deployments or deletions;
284
- * default: id of group used to create Solution
285
- */
286
- jobId?: string;
287
- /**
288
- * Title to be given to created Solution item; defaults: for a group, group title;
289
- * for an item, random string from common.createShortId()
290
- */
291
- title?: string;
292
- /**
293
- * Snippet to be given to created Solution item; defaults: for a group, group snippet; for an item, ""
294
- */
295
- snippet?: string;
296
- /**
297
- * Description to be given to created Solution item; defaults: for a group, group description; for an item, ""
298
- */
299
- description?: string;
300
- /**
301
- * Tags to be given to created Solution item; defaults: for a group, group tags; for an item, []
302
- */
303
- tags?: string[];
304
- /**
305
- * URL to thumbnail to be given to created Solution item, but see `thumbnail` property; default: ""
306
- */
307
- thumbnailurl?: string;
308
- /**
309
- * Thumbnail file to be given to created Solution item; default: null; has priority over `thumbnailurl`
310
- */
311
- thumbnail?: File;
312
- /**
313
- * Folder in which to place created Solution item; default is top level
314
- */
315
- folderId?: string;
316
- /**
317
- * Facts to be used for creating the Solution item; default: \{\}
318
- */
319
- templateDictionary?: any;
320
- /**
321
- * Should fields be templatized; default: false
322
- */
323
- templatizeFields?: boolean;
324
- /**
325
- * Additional typeKeywords (beyond always-added ["Solution", "Template"]) to be added to Solution item; default: []
326
- */
327
- additionalTypeKeywords?: string[];
328
- /**
329
- * Packet of supplemental information provided from certain progress states, e.g., Finished deleting an item
330
- * or deploying a Solution item
331
- */
332
- progressCallback?: ISolutionProgressCallback;
333
- /**
334
- * Should progress be echoed to the debugging console? default: false
335
- */
336
- consoleProgress?: boolean;
337
- /**
338
- * Placeholder for ids of items to be placed into Solution. DO NOT USE--it is overwritten by function createSolution
339
- */
340
- itemIds?: string[];
341
- /**
342
- * Credentials for the organization with the source items; default: solution item authentication
343
- */
344
- sourceItemAuthentication?: UserSession;
345
- /**
346
- * Groups to be included in solution; it's an alternate to including tags of the form "group.<embeddedGroupId>"
347
- * in the top-level group.
348
- */
349
- subgroupIds?: string[];
350
- }
351
- /**
352
- * Result of creating a solution item.
353
- */
354
- export interface ICreateSolutionResult {
355
- /**
356
- * Success or failure
357
- */
358
- success: boolean;
359
- /**
360
- * Id of created Solution template
361
- */
362
- solutionTemplateItemId: string;
363
- /**
364
- * When true items with source-itemId type keyword will be reused; default: false
365
- */
366
- enableItemReuse?: boolean;
367
- }
368
- /**
369
- * The relevant elements of a data source that are used for templatization
370
- */
371
- export interface IDatasourceInfo {
372
- /**
373
- * Calculated pattern used for templatization eg. "\{\{itemId.fields.layerId.fieldname\}\}"
374
- */
375
- basePath: string;
376
- /**
377
- * The portal item id eg. "4efe5f693de34620934787ead6693f19"
378
- */
379
- itemId: string;
380
- /**
381
- * The id for the layer from the service eg. 0
382
- */
383
- layerId: number;
384
- /**
385
- * The webmap layer id eg. "TestLayerForDashBoardMap_632"
386
- */
387
- id?: string;
388
- /**
389
- * The id for the layer from a map could be referenced by more than one map for a solution
390
- */
391
- ids: string[];
392
- /**
393
- * The url used for fields lookup
394
- */
395
- url?: string;
396
- /**
397
- * The fields this datasource contains
398
- */
399
- fields: any[];
400
- /**
401
- * The ralative ids for references to a datasource
402
- * Application types like dashboard can reference datasources via realtive widget reference ids
403
- */
404
- references?: any[];
405
- /**
406
- * The details on any relationships that the datasource is involved in
407
- */
408
- relationships: any[];
409
- /**
410
- * The layers adminLayerInfo
411
- * Used to fetch relationship info in some cases
412
- */
413
- adminLayerInfo: any;
414
- }
415
- /**
416
- * Options for deleting a deployed solution item and all of the items that were created as part of that deployment
417
- */
418
- export interface IDeleteSolutionOptions {
419
- /**
420
- * Calling-program-supplied id, perhaps used to distinguish between concurrent deployments or deletions;
421
- * default: id of solution being deleted
422
- */
423
- jobId?: string;
424
- /**
425
- * Packet of supplemental information provided from certain progress states, e.g., Finished deleting an item
426
- * or deploying a Solution item
427
- */
428
- progressCallback?: ISolutionProgressCallback;
429
- /**
430
- * Should progress be echoed to the debugging console? default: false
431
- */
432
- consoleProgress?: boolean;
433
- }
434
- /**
435
- * Storage of dependencies.
436
- */
437
- export interface IDependency {
438
- /**
439
- * Dependency item id for templatization.
440
- */
441
- id: string;
442
- /**
443
- * Dependency service name for name mapping.
444
- * This is used to find appropriate source service name for views.
445
- */
446
- name: string;
447
- }
448
- /**
449
- * IDeployFilename extended to include the URL to the stored resource.
450
- */
451
- export interface IDeployFileCopyPath extends IDeployFilename {
452
- url: string;
453
- }
454
- /**
455
- * File type, folder, and filename for deploying an item's binary resource.
456
- */
457
- export interface IDeployFilename {
458
- type: EFileType;
459
- folder: string;
460
- filename: string;
461
- }
462
- /**
463
- * Options for deploying a solution item and for creating the solution index item representing the deployment
464
- */
465
- export interface IDeploySolutionOptions {
466
- /**
467
- * Calling-program-supplied id, perhaps used to distinguish between concurrent deployments or deletions;
468
- * default: id of solution being deployed
469
- */
470
- jobId?: string;
471
- /**
472
- * Title to be given to deployed Solution item; default: copied from solution item
473
- */
474
- title?: string;
475
- /**
476
- * Snippet to be given to created Solution item; default: copied from solution item
477
- */
478
- snippet?: string;
479
- /**
480
- * Description to be given to created Solution item; default: copied from solution item
481
- */
482
- description?: string;
483
- /**
484
- * Tags to be given to created Solution item; default: copied from solution item
485
- */
486
- tags?: string[];
487
- /**
488
- * URL to thumbnail to be given to created Solution item, but see `thumbnail` property; default: copied from
489
- * solution item
490
- */
491
- thumbnailurl?: string;
492
- /**
493
- * Thumbnail file to be given to created Solution item; default: null; has priority over `thumbnailurl`
494
- */
495
- thumbnail?: File;
496
- /**
497
- * Facts to be used for creating the Solution item; default: \{\}
498
- */
499
- templateDictionary?: any;
500
- /**
501
- * Additional typeKeywords (beyond always-added ["Solution", "Deployed"]) to be added to Solution item; default: []
502
- */
503
- additionalTypeKeywords?: string[];
504
- /**
505
- * When true items with source-itemId type keyword will be reused; default: false
506
- */
507
- enableItemReuse?: boolean;
508
- /**
509
- * Packet of supplemental information provided from certain progress states, e.g., Finished deleting an item
510
- * or deploying a Solution item
511
- */
512
- progressCallback?: ISolutionProgressCallback;
513
- /**
514
- * Should progress be echoed to the debugging console? default: false
515
- */
516
- consoleProgress?: boolean;
517
- /**
518
- * Credentials for the organization with the source items; default: authentication supplied for deployment destination
519
- */
520
- storageAuthentication?: UserSession;
521
- /**
522
- * Version of storage read from Solution item. DO NOT USE--it is overwritten by function deploySolutionFromTemplate
523
- */
524
- storageVersion?: number;
525
- }
526
- /**
527
- * Result of deploying a solution item.
528
- */
529
- export interface IDeploySolutionResult {
530
- /**
531
- * Success or failure
532
- */
533
- success: boolean;
534
- /**
535
- * Id of deployed Solution
536
- */
537
- deployedSolutionItemId: string;
538
- }
539
- /**
540
- * Contains feature-service-specific properties.
541
- */
542
- export interface IFeatureServiceProperties {
543
- service: any;
544
- layers: any[];
545
- tables: any[];
546
- workforceInfos?: any;
547
- contingentValues?: any;
548
- }
549
- /**
550
- * File folder, filename, and data.
551
- */
552
- export interface IFile {
553
- folder: string;
554
- filename: string;
555
- blob: Blob;
556
- }
557
- /**
558
- * Filename, MIME type, and data.
559
- */
560
- export interface IFileMimeTyped {
561
- filename: string;
562
- mimeType: string;
563
- blob: Blob;
564
- }
565
- /**
566
- * Existing Items promises, associated item Ids and types
567
- */
568
- export interface IFindExistingItemsResponse {
569
- existingItemsDefs: Array<Promise<any>>;
570
- existingItemInfos: IFindExistingItemInfos[];
571
- }
572
- /**
573
- * Item Id and item type
574
- */
575
- export interface IFindExistingItemInfos {
576
- itemId: string;
577
- type: string;
578
- }
579
- /**
580
- * Response from removing a folder.
581
- */
582
- export interface IFolderStatusResponse {
583
- /**
584
- * Success or failure
585
- */
586
- success: boolean;
587
- folder: {
588
- username: string;
589
- id: string;
590
- title: string;
591
- };
592
- }
593
- /**
594
- * Undocumented property returned by portal function `getRelatedItems`.
595
- */
596
- interface IGetRelatedItemsResponseAggregation {
597
- total: IGetRelatedItemsResponseAggregationTotal;
598
- }
599
- /**
600
- * Undocumented property returned by portal function `getRelatedItems`.
601
- */
602
- interface IGetRelatedItemsResponseAggregationTotal {
603
- /**
604
- * Number of items returned in this response
605
- */
606
- count: number;
607
- /**
608
- * Description of `count`, e.g., "total"
609
- */
610
- name: string;
611
- }
612
- /**
613
- * Extension of type to represent actual return from portal function `getRelatedItems`.
614
- */
615
- export interface IGetRelatedItemsResponseFull extends IGetRelatedItemsResponse {
616
- /**
617
- * Undocumented property returned by portal function `getRelatedItems`.
618
- */
619
- aggregations: IGetRelatedItemsResponseAggregation;
620
- /**
621
- * Property used in conjunction with `start` to request the next batch of related items.
622
- */
623
- nextkey: string | null;
624
- /**
625
- * Echo of number of related items requested.
626
- */
627
- num: number;
628
- }
629
- /**
630
- * Response from getting the resources of a specified item, extended with paging properties
631
- */
632
- export interface IGetResourcesResponse {
633
- /**
634
- * Total number of responses
635
- */
636
- total: number;
637
- /**
638
- * Resources
639
- */
640
- resources: IResource[];
641
- /**
642
- * The number of the first entry requested. The index number is 1-based.
643
- */
644
- start: number;
645
- /**
646
- * The number of results requested.
647
- */
648
- num: number;
649
- /**
650
- * The 1-based index of the start of the next batch of results; value is -1 if there are no more results
651
- * to be fetched
652
- */
653
- nextStart: number;
654
- }
655
- /**
656
- * Response from getting the category schema set on a group.
657
- *
658
- * @see https://developers.arcgis.com/rest/users-groups-and-items/group-category-schema.htm
659
- */
660
- export interface IGroupCategorySchema {
661
- categorySchema: IGroupCategory[];
662
- }
663
- /**
664
- * Nestable category schema descripion set on a group.
665
- *
666
- * @see https://developers.arcgis.com/rest/users-groups-and-items/group-category-schema.htm
667
- */
668
- export interface IGroupCategory {
669
- /**
670
- * Category title
671
- */
672
- title: string;
673
- /**
674
- * Category description
675
- */
676
- description?: string;
677
- /**
678
- * Child categories of this category
679
- */
680
- categories?: IGroupCategory[];
681
- }
682
- /**
683
- * Hierarchical arrangement of items and their dependencies.
684
- */
685
- export interface IHierarchyElement {
686
- /**
687
- * Item id
688
- */
689
- id: string;
690
- /**
691
- * Items that this item depends on
692
- */
693
- dependencies: IHierarchyElement[];
694
- }
695
- /**
696
- * Subset of portal.IItem containing just the properties that are stored in a template--the item's "base" section.
697
- */
698
- export interface IItemGeneralized {
699
- /**
700
- * Item categories
701
- */
702
- categories?: string[];
703
- /**
704
- * Specifies the locale for which content is returned.
705
- */
706
- culture?: string;
707
- /**
708
- * Item description
709
- */
710
- description?: string;
711
- /**
712
- * _Undocumented AGO item property_
713
- */
714
- documentation?: string;
715
- /**
716
- * An array that defines the bounding rectangle of the item as [[minx, miny], [maxx, maxy]]. Should always be in WGS84.
717
- */
718
- extent?: number[][] | string;
719
- /**
720
- * The unique ID for this item.
721
- */
722
- id: string;
723
- /**
724
- * A JSON object that primarily applies to system requirements, Terms and Conditions, version, supported platforms,
725
- * YouTube video ID, etc., associated with the application.
726
- */
727
- properties?: any;
728
- /**
729
- * A short summary description of the item.
730
- */
731
- snippet?: string;
732
- /**
733
- * The coordinate system of the item.
734
- */
735
- spatialReference?: ISpatialReference;
736
- /**
737
- * An array of user defined tags that describe the item.
738
- */
739
- tags?: string[];
740
- /**
741
- * The title of the item. This is the name that's displayed to users and by which they refer to the item.
742
- */
743
- title?: string;
744
- /**
745
- * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and
746
- * Web Mapping Application.
747
- */
748
- type: string;
749
- /**
750
- * An array of keywords that further describes the type of this item. Each item is tagged with a set of
751
- * type keywords that are derived based on its primary type.
752
- */
753
- typeKeywords?: string[];
754
- /**
755
- * The URL for the resource represented by the item. Applies only to items that represent web-accessible
756
- * resources such as map services.
757
- */
758
- url?: string;
759
- /**
760
- * Generically definines remaining/unused properties
761
- */
762
- [key: string]: any;
763
- }
764
- /**
765
- * Extends `IItemRelationshipOptions` for the REST JS `getRelatedItems` call because it doesn't include
766
- * the new `start` and `num` properties.
767
- */
768
- export interface IItemRelationshipOptionsPaging extends IItemRelationshipOptions {
769
- params: {
770
- /**
771
- * Relationship direction sought
772
- */
773
- direction: "forward" | "reverse";
774
- /**
775
- * One-based index of start of next batch to fetch
776
- */
777
- start: number;
778
- /**
779
- * Number of items requested; maximum value is 100
780
- */
781
- num: number;
782
- /**
783
- * Key needed by related records search for second and subsequent batches; value comes from previous fetch
784
- */
785
- nextkey?: string;
786
- };
787
- }
788
- /**
789
- * The templatized form of an item or group.
790
- */
791
- export interface IItemTemplate {
792
- /**
793
- * Item's AGO id
794
- */
795
- itemId: string;
796
- /**
797
- * AGO item type name
798
- */
799
- type: string;
800
- /**
801
- * Fairly unique identifier; set to 'i' + chars 2-8 of a random number in base 36
802
- */
803
- key: string;
804
- /**
805
- * Item base section JSON
806
- */
807
- item: IItemGeneralized;
808
- /**
809
- * Item data section JSON
810
- */
811
- data: any;
812
- /**
813
- * References to item resources
814
- */
815
- resources: any[];
816
- /**
817
- * References to related item
818
- */
819
- relatedItems?: IRelatedItems[];
820
- /**
821
- * List of ids of AGO items needed by this item
822
- */
823
- dependencies: string[];
824
- /**
825
- * List of ids of AGO groups the item needs to be shared with
826
- */
827
- groups: string[];
828
- /**
829
- * Miscellaneous item-specific properties
830
- */
831
- properties: any;
832
- /**
833
- * Estimated relative cost of deploying this item; corresponds to number of progressCallback
834
- * function calls made during while deploying it
835
- */
836
- estimatedDeploymentCostFactor: number;
837
- /**
838
- * Allow for adhoc properties
839
- */
840
- [propName: string]: any;
841
- }
842
- /**
843
- * Function signatures for use in a function lookup array.
844
- */
845
- export interface IItemTemplateConversions {
846
- /**
847
- * Converts an item into a template for use in a Solution.
848
- */
849
- convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary?: any): Promise<IItemTemplate>;
850
- /**
851
- * Creates an item using templatized info in a Solution.
852
- */
853
- createItemFromTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
854
- }
855
- /**
856
- * Structure for mapping from item type to module with type-specific template-handling code
857
- */
858
- export type moduleHandler = IItemTemplateConversions | undefined | null;
859
- /**
860
- * Mapping from an AGO item type to the code handling that type.
861
- */
862
- export interface IItemTypeModuleMap {
863
- [itemType: string]: moduleHandler;
864
- }
865
- export interface IItemUpdate {
866
- id: string;
867
- /**
868
- * Key-value pair for update parameter.
869
- * N.B.: Use `data` key for binary data; all other keys are serialized, which zeroes out binary data!
870
- */
871
- [key: string]: any;
872
- }
873
- /**
874
- * Type with key access to lists of strings
875
- */
876
- export interface IKeyedListsOfStrings {
877
- [key: string]: string[];
878
- }
879
- /**
880
- * Type with key access to strings
881
- */
882
- export interface IKeyedStrings {
883
- [key: string]: string;
884
- }
885
- /**
886
- * A simple interface for a key value pair with number as the key
887
- */
888
- export interface INumberValuePair {
889
- [key: number]: any;
890
- }
891
- /**
892
- * Subset of a esri/portal/Portal used by this library.
893
- */
894
- export interface IPortalSubset {
895
- /**
896
- * Name of the organization.
897
- */
898
- name: string;
899
- /**
900
- * The id of the organization that owns this portal. If null then this is the default portal
901
- * for anonymous and non-organizational users.
902
- */
903
- id: string;
904
- /**
905
- * The REST URL for the portal, for example "https://www.arcgis.com/sharing/rest" for ArcGIS Online
906
- * and "https://www.example.com/arcgis/sharing/rest" for your in-house portal.
907
- */
908
- restUrl: string;
909
- /**
910
- * The URL to the portal instance.
911
- */
912
- portalUrl: string;
913
- /**
914
- * The prefix selected by the organization's administrator to be used with the custom base URL for the portal.
915
- */
916
- urlKey: string;
917
- }
918
- /**
919
- * Storage of arguments for post processing functions
920
- */
921
- export interface IPostProcessArgs {
922
- /**
923
- * Status message to show after the layerDefinition is updated.
924
- */
925
- message: string;
926
- /**
927
- * Key objects to add to the layerDefinition.
928
- */
929
- objects: any;
930
- /**
931
- * Template of item to be created
932
- */
933
- itemTemplate: any;
934
- /**
935
- * Credentials for the request
936
- */
937
- authentication: UserSession;
938
- }
939
- /**
940
- * The relevant elements of a data source that are used for templatization
941
- */
942
- export interface IQuickCaptureDatasource {
943
- /**
944
- * The portal item id for the datasource eg. "4efe5f693de34620934787ead6693f19"
945
- */
946
- featureServiceItemId: string;
947
- /**
948
- * The application item id for the datasource eg. "1d4de1e4-ef58-4e02-9159-7a6e6701cada"
949
- */
950
- dataSourceId: string;
951
- /**
952
- * The url used for the datasource
953
- */
954
- url: number;
955
- }
956
- /**
957
- * A mapping between a relationship type and the list of item ids using that relationship.
958
- */
959
- export interface IRelatedItems {
960
- /**
961
- * The type of relationship between the two items.
962
- *
963
- * @see https://developers.arcgis.com/rest/users-groups-and-items/relationship-types.htm
964
- */
965
- relationshipType: string;
966
- /**
967
- * Ids of related items
968
- */
969
- relatedItemIds: string[];
970
- }
971
- /**
972
- * Summary of a resource.
973
- */
974
- export interface IResource {
975
- /**
976
- * Name of resource
977
- */
978
- resource: string;
979
- /**
980
- * The date the resource was created. Shown in UNIX time in milliseconds.
981
- */
982
- created: number;
983
- /**
984
- * The size of the resource in bytes.
985
- */
986
- size: number;
987
- }
988
- /**
989
- * A solution template AGO item
990
- */
991
- export interface ISolutionItem {
992
- /**
993
- * Item base section JSON
994
- */
995
- item: any;
996
- /**
997
- * Item data section JSON
998
- */
999
- data: ISolutionItemData;
1000
- /**
1001
- * Supplemental information
1002
- */
1003
- properties?: IStringValuePair;
1004
- /**
1005
- * Generically definines remaining/unused properties
1006
- */
1007
- [key: string]: any;
1008
- }
1009
- /**
1010
- * The data section of a solution item.
1011
- */
1012
- export interface ISolutionItemData {
1013
- /**
1014
- * General information about the solution template
1015
- */
1016
- metadata: any;
1017
- /**
1018
- * The collection of templates
1019
- */
1020
- templates: IItemTemplate[];
1021
- }
1022
- /**
1023
- * A brief form of an item in a deployed Solution item.
1024
- */
1025
- export interface ISolutionItemPrecis {
1026
- /**
1027
- * The unique ID for this item.
1028
- */
1029
- id: string;
1030
- /**
1031
- * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and
1032
- * Web Mapping Application.
1033
- */
1034
- type: string;
1035
- /**
1036
- * The title of the item. This is the name that's displayed to users and by which they refer to the item.
1037
- */
1038
- title: string;
1039
- /**
1040
- * The date the item was last modified. Shown in UNIX time in milliseconds.
1041
- */
1042
- modified: number;
1043
- /**
1044
- * The username of the user who owns this item.
1045
- */
1046
- owner: string;
1047
- }
1048
- /**
1049
- * A brief form of a deployed Solution item.
1050
- */
1051
- export interface ISolutionPrecis {
1052
- /**
1053
- * The unique ID for this Solution item.
1054
- */
1055
- id: string;
1056
- /**
1057
- * The title of the item. This is the name that's displayed to users and by which they refer to the item.
1058
- */
1059
- title: string;
1060
- /**
1061
- * Folder containing the deployed Solution
1062
- */
1063
- folder: string;
1064
- /**
1065
- * Items contained in this solution
1066
- */
1067
- items: ISolutionItemPrecis[];
1068
- /**
1069
- * Ids of groups affiliated with this solution
1070
- */
1071
- groups: string[];
1072
- }
1073
- /**
1074
- * Packet of supplemental information provided via a ISolutionProgressCallback call.
1075
- */
1076
- export interface ISolutionProgressEvent {
1077
- /**
1078
- * Tag describing data
1079
- */
1080
- event: string;
1081
- /**
1082
- * Data
1083
- */
1084
- data?: any;
1085
- }
1086
- /**
1087
- * Information about a resource to be copied into an item.
1088
- */
1089
- export interface ISourceFile {
1090
- /**
1091
- * The portal item id, e.g., "4efe5f693de34620934787ead6693f19", that supplies the resource
1092
- */
1093
- itemId: string;
1094
- /**
1095
- * Resource file
1096
- */
1097
- file: File;
1098
- /**
1099
- * Resource's "folder"--the prefix before the filename
1100
- */
1101
- folder: string;
1102
- /**
1103
- * Resource's filename
1104
- */
1105
- filename: string;
1106
- }
1107
- /**
1108
- * Information for storing a resource in a storage item.
1109
- */
1110
- export interface ISourceFileCopyPath {
1111
- /**
1112
- * The portal item id, e.g., "4efe5f693de34620934787ead6693f19", that supplies the resource
1113
- */
1114
- itemId: string;
1115
- /**
1116
- * URL where a resource, metadata, or thumbnail of an item or group can be found
1117
- */
1118
- url: string;
1119
- /**
1120
- * Resource's "folder"--the prefix before the filename
1121
- */
1122
- folder: string;
1123
- /**
1124
- * Resource's filename
1125
- */
1126
- filename: string;
1127
- }
1128
- /**
1129
- * A simple interface for a key value pair with string as the key
1130
- */
1131
- export interface IStringValuePair {
1132
- [key: string]: any;
1133
- }
1134
- /**
1135
- * A common status response from AGO.
1136
- */
1137
- export interface IStatusResponse {
1138
- /**
1139
- * Success or failure of request
1140
- */
1141
- success: boolean;
1142
- /**
1143
- * AGO id of item for which request was made
1144
- */
1145
- itemId: string;
1146
- }
1147
- /**
1148
- * Storage of update info
1149
- */
1150
- export interface IUpdate {
1151
- /**
1152
- * URL for the update request
1153
- */
1154
- url: string;
1155
- /**
1156
- * object to update the layers definition
1157
- */
1158
- params: any;
1159
- /**
1160
- * arguments for post processing functions
1161
- */
1162
- args: IPostProcessArgs;
1163
- }
1164
- /**
1165
- * Survey 123 create API parameters
1166
- */
1167
- export interface ISurvey123CreateParams {
1168
- /**
1169
- * Title for the survey Form item & folder
1170
- */
1171
- title: string;
1172
- /**
1173
- * Array of tags for the survey Form item
1174
- */
1175
- tags: string[];
1176
- /**
1177
- * Array of typeKeywords for the survey Form item
1178
- */
1179
- typeKeywords: string[];
1180
- /**
1181
- * Description for the survey Form item
1182
- */
1183
- description: string;
1184
- /**
1185
- * The survey form configuration schema. This defines configurable
1186
- * content like the theme, questions, & header/footer text, etc.
1187
- */
1188
- form: any;
1189
- /**
1190
- * The username from the current session
1191
- */
1192
- username: string;
1193
- /**
1194
- * The token from the current session
1195
- */
1196
- token: string;
1197
- /**
1198
- * The portalUrl for Survey123 to direct API requests to
1199
- */
1200
- portalUrl: string;
1201
- }
1202
- /**
1203
- * Successful Survey123 create API response
1204
- */
1205
- export interface ISurvey123CreateSuccess {
1206
- /**
1207
- * Statically defined, always true for success
1208
- */
1209
- success: true;
1210
- /**
1211
- * Resulting Form item ID
1212
- */
1213
- id: string;
1214
- /**
1215
- * Subset of resulting Form item details
1216
- */
1217
- formItemInfo: {
1218
- /**
1219
- * Resulting Form item typeKeywords
1220
- */
1221
- typeKeywords: string[];
1222
- /**
1223
- * Resulting Form item ownerFolder
1224
- */
1225
- ownerFolder: string;
1226
- /**
1227
- * Resulting Form item access
1228
- */
1229
- access: string;
1230
- /**
1231
- * Resulting Form item owner
1232
- */
1233
- owner: string;
1234
- };
1235
- /**
1236
- * Subset of resulting Feature Service(s) details
1237
- */
1238
- featureService: {
1239
- /**
1240
- * Subset of source Feature Service details
1241
- */
1242
- source: {
1243
- /**
1244
- * Resulting Feature Service item ID
1245
- */
1246
- itemId: string;
1247
- /**
1248
- * Generically definines remaining/unused properties
1249
- */
1250
- [key: string]: any;
1251
- };
1252
- /**
1253
- * Generically definines remaining/unused properties
1254
- */
1255
- [key: string]: any;
1256
- };
1257
- /**
1258
- * Generically definines remaining/unused properties
1259
- */
1260
- [key: string]: any;
1261
- }
1262
- /**
1263
- * Unsuccessful Survey123 create API response
1264
- */
1265
- export interface ISurvey123CreateError {
1266
- /**
1267
- * Statically defined, always false when unsuccessful
1268
- */
1269
- success: false;
1270
- /**
1271
- * Error details
1272
- */
1273
- error: {
1274
- /**
1275
- * HTTP error code
1276
- */
1277
- code: number;
1278
- /**
1279
- * Optional, additional details about the error
1280
- */
1281
- details: string[];
1282
- /**
1283
- * Message describing the error
1284
- */
1285
- message: string;
1286
- };
1287
- }
1288
- /**
1289
- * Result details for a successful Survey123 create
1290
- * API request
1291
- */
1292
- export interface ISurvey123CreateResult {
1293
- formId: string;
1294
- featureServiceId: string;
1295
- folderId: string;
1296
- }
1297
- /**
1298
- * Result of fetching webmap dependencies
1299
- */
1300
- export interface IWebmapDependencies {
1301
- /**
1302
- * Updated list of dependency ids
1303
- */
1304
- dependencies: string[];
1305
- /**
1306
- * Hash from URL to AGO item id
1307
- */
1308
- urlHash: IKeyedStrings;
1309
- }
1310
- /**
1311
- * Results of sending a zip to an item.
1312
- */
1313
- export interface IZipCopyResults extends IZipInfo, ICopyResults {
1314
- }
1315
- /**
1316
- * Information about a zipped file.
1317
- */
1318
- export interface IZipInfo {
1319
- /**
1320
- * Zip's filename
1321
- */
1322
- filename: string;
1323
- /**
1324
- * JSZip object
1325
- */
1326
- zip: JSZip;
1327
- /**
1328
- * List of files included in this zip
1329
- */
1330
- filelist: any[];
1331
- }
1332
- /**
1333
- * Title information for Velocity data.
1334
- */
1335
- export interface IVelocityTitle {
1336
- /**
1337
- * The current label for the object
1338
- */
1339
- label: string;
1340
- /**
1341
- * Existing titles that have been used in the org
1342
- */
1343
- titles: string[];
1344
- }