@esri/solution-common 5.6.8 → 5.7.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.
Files changed (37) hide show
  1. package/README.md +0 -50
  2. package/dist/cjs/arcgisRestJS.d.ts +42 -4
  3. package/dist/cjs/arcgisRestJS.js +121 -52
  4. package/dist/cjs/arcgisRestJS.js.map +1 -1
  5. package/dist/cjs/getItemTypeAbbrev.js +2 -2
  6. package/dist/cjs/resources/add-resource.d.ts +38 -0
  7. package/dist/cjs/resources/add-resource.js +84 -0
  8. package/dist/cjs/resources/add-resource.js.map +1 -0
  9. package/dist/cjs/resources/copyAssociatedFiles.d.ts +2 -2
  10. package/dist/cjs/resources/copyAssociatedFiles.js +34 -15
  11. package/dist/cjs/resources/copyAssociatedFiles.js.map +1 -1
  12. package/dist/cjs/resources/index.d.ts +2 -1
  13. package/dist/cjs/resources/index.js +2 -1
  14. package/dist/cjs/resources/index.js.map +1 -1
  15. package/dist/cjs/resources/{add-resource-from-blob.d.ts → update-resource.d.ts} +8 -7
  16. package/dist/cjs/resources/{add-resource-from-blob.js → update-resource.js} +15 -14
  17. package/dist/cjs/resources/update-resource.js.map +1 -0
  18. package/dist/esm/arcgisRestJS.d.ts +42 -4
  19. package/dist/esm/arcgisRestJS.js +75 -4
  20. package/dist/esm/arcgisRestJS.js.map +1 -1
  21. package/dist/esm/getItemTypeAbbrev.js +2 -2
  22. package/dist/esm/resources/add-resource.d.ts +38 -0
  23. package/dist/esm/resources/add-resource.js +79 -0
  24. package/dist/esm/resources/add-resource.js.map +1 -0
  25. package/dist/esm/resources/copyAssociatedFiles.d.ts +2 -2
  26. package/dist/esm/resources/copyAssociatedFiles.js +34 -15
  27. package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
  28. package/dist/esm/resources/index.d.ts +2 -1
  29. package/dist/esm/resources/index.js +2 -1
  30. package/dist/esm/resources/index.js.map +1 -1
  31. package/dist/esm/resources/{add-resource-from-blob.d.ts → update-resource.d.ts} +8 -7
  32. package/dist/esm/resources/{add-resource-from-blob.js → update-resource.js} +14 -13
  33. package/dist/esm/resources/update-resource.js.map +1 -0
  34. package/dist/solution.js_commit.txt +6 -8
  35. package/package.json +2 -2
  36. package/dist/cjs/resources/add-resource-from-blob.js.map +0 -1
  37. package/dist/esm/resources/add-resource-from-blob.js.map +0 -1
@@ -13,8 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export * from "./add-resource";
16
17
  export * from "./addMetadataFromBlob";
17
- export * from "./add-resource-from-blob";
18
18
  export * from "./convert-item-resource-to-storage-resource";
19
19
  export * from "./convert-storage-resource-to-item-resource";
20
20
  export * from "./copyAssociatedFiles";
@@ -27,3 +27,4 @@ export * from "./get-blob";
27
27
  export * from "./getItemResourcesFilesFromPaths";
28
28
  export * from "./getItemResourcesPaths";
29
29
  export * from "./solution-resource";
30
+ export * from "./update-resource";
@@ -16,8 +16,8 @@
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const tslib_1 = require("tslib");
19
+ tslib_1.__exportStar(require("./add-resource"), exports);
19
20
  tslib_1.__exportStar(require("./addMetadataFromBlob"), exports);
20
- tslib_1.__exportStar(require("./add-resource-from-blob"), exports);
21
21
  tslib_1.__exportStar(require("./convert-item-resource-to-storage-resource"), exports);
22
22
  tslib_1.__exportStar(require("./convert-storage-resource-to-item-resource"), exports);
23
23
  tslib_1.__exportStar(require("./copyAssociatedFiles"), exports);
@@ -30,4 +30,5 @@ tslib_1.__exportStar(require("./get-blob"), exports);
30
30
  tslib_1.__exportStar(require("./getItemResourcesFilesFromPaths"), exports);
31
31
  tslib_1.__exportStar(require("./getItemResourcesPaths"), exports);
32
32
  tslib_1.__exportStar(require("./solution-resource"), exports);
33
+ tslib_1.__exportStar(require("./update-resource"), exports);
33
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gEAAsC;AACtC,mEAAyC;AACzC,sFAA4D;AAC5D,sFAA4D;AAC5D,gEAAsC;AACtC,6DAAmC;AACnC,iEAAuC;AACvC,gEAAsC;AACtC,4DAAkC;AAClC,8DAAoC;AACpC,qDAA2B;AAC3B,2EAAiD;AACjD,kEAAwC;AACxC,8DAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,yDAA+B;AAC/B,gEAAsC;AACtC,sFAA4D;AAC5D,sFAA4D;AAC5D,gEAAsC;AACtC,6DAAmC;AACnC,iEAAuC;AACvC,gEAAsC;AACtC,4DAAkC;AAClC,8DAAoC;AACpC,qDAA2B;AAC3B,2EAAiD;AACjD,kEAAwC;AACxC,8DAAoC;AACpC,4DAAkC"}
@@ -15,12 +15,13 @@
15
15
  */
16
16
  import { UserSession } from "../arcgisRestJS";
17
17
  /**
18
- * Add a resource from a blob
18
+ * Adds a text resource.
19
19
  *
20
- * @param blob
21
- * @param itemId
22
- * @param folder
23
- * @param filename
24
- * @param authentication
20
+ * @param content Text to add as a resource
21
+ * @param itemId Id of the item to add the resource to
22
+ * @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
23
+ * @param filename File name used to rename an existing file resource uploaded, or to be used together with
24
+ * text as file name for it. File name must have the file resource extension.
25
+ * @param authentication Credentials for the request
25
26
  */
26
- export declare function addResourceFromBlob(blob: any, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;
27
+ export declare function updateTextResource(content: string, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;
@@ -15,37 +15,38 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.addResourceFromBlob = void 0;
18
+ exports.updateTextResource = void 0;
19
19
  const arcgisRestJS_1 = require("../arcgisRestJS");
20
20
  /**
21
- * Add a resource from a blob
21
+ * Adds a text resource.
22
22
  *
23
- * @param blob
24
- * @param itemId
25
- * @param folder
26
- * @param filename
27
- * @param authentication
23
+ * @param content Text to add as a resource
24
+ * @param itemId Id of the item to add the resource to
25
+ * @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
26
+ * @param filename File name used to rename an existing file resource uploaded, or to be used together with
27
+ * text as file name for it. File name must have the file resource extension.
28
+ * @param authentication Credentials for the request
28
29
  */
29
- function addResourceFromBlob(blob, itemId, folder, filename, authentication) {
30
+ function updateTextResource(content, itemId, folder, filename, authentication) {
30
31
  // Check that the filename has an extension because it is required by the addResources call
31
32
  if (filename && filename.indexOf(".") < 0) {
32
33
  return new Promise((resolve, reject) => {
33
34
  reject(new arcgisRestJS_1.ArcGISAuthError("Filename must have an extension indicating its type"));
34
35
  });
35
36
  }
36
- const addRsrcOptions = {
37
+ const requestOptions = {
37
38
  id: itemId,
38
- resource: blob,
39
+ content,
39
40
  name: filename,
40
41
  authentication: authentication,
41
42
  params: {},
42
43
  };
43
44
  if (folder) {
44
- addRsrcOptions.params = {
45
+ requestOptions.params = {
45
46
  resourcesPrefix: folder,
46
47
  };
47
48
  }
48
- return (0, arcgisRestJS_1.addItemResource)(addRsrcOptions);
49
+ return (0, arcgisRestJS_1.updateItemResource)(requestOptions);
49
50
  }
50
- exports.addResourceFromBlob = addResourceFromBlob;
51
- //# sourceMappingURL=add-resource-from-blob.js.map
51
+ exports.updateTextResource = updateTextResource;
52
+ //# sourceMappingURL=update-resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-resource.js","sourceRoot":"","sources":["../../../src/resources/update-resource.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,kDAAyG;AAEzG;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAChC,OAAe,EACf,MAAc,EACd,MAAc,EACd,QAAgB,EAChB,cAA2B;IAE3B,2FAA2F;IAC3F,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,CAAC,IAAI,8BAAe,CAAC,qDAAqD,CAAC,CAAC,CAAC;QACrF,CAAC,CAAC,CAAC;KACJ;IAED,MAAM,cAAc,GAAyB;QAC3C,EAAE,EAAE,MAAM;QACV,OAAO;QACP,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,cAAc;QAC9B,MAAM,EAAE,EAAE;KACX,CAAC;IACF,IAAI,MAAM,EAAE;QACV,cAAc,CAAC,MAAM,GAAG;YACtB,eAAe,EAAE,MAAM;SACxB,CAAC;KACH;IACD,OAAO,IAAA,iCAAkB,EAAC,cAAc,CAAC,CAAC;AAC5C,CAAC;AA3BD,gDA2BC"}
@@ -16,8 +16,46 @@
16
16
  /**
17
17
  * Provides common functions and classes from ArcGIS REST JS.
18
18
  */
19
+ import { IFolderIdOptions, IGetGroupContentOptions, IGetUserOptions, IGroup, IGroupContentResult, IGetRelatedItemsResponse, IGroupSharingOptions, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IPortal, IRemoveItemResourceOptions, ISearchOptions, ISearchResult, ISharingResponse, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserGroupOptions, IUserItemOptions, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
20
+ import { IRequestOptions } from "@esri/arcgis-rest-request";
21
+ import { IQueryRelatedOptions, IQueryRelatedResponse } from "@esri/arcgis-rest-feature-layer";
22
+ import { IAddToServiceDefinitionOptions, IAddToServiceDefinitionResult } from "@esri/arcgis-rest-service-admin";
19
23
  export { ICredential, IUserRequestOptions, IUserSessionOptions, UserSession } from "@esri/arcgis-rest-auth";
20
- export { IFeature, IQueryRelatedOptions, IQueryRelatedResponse, IRelatedRecordGroup, queryFeatures as rest_queryFeatures, addFeatures as rest_addFeatures, queryRelated, applyEdits, queryFeatures, } from "@esri/arcgis-rest-feature-layer";
21
- export { IAddFolderResponse, IAddItemDataOptions, ICreateItemOptions, ICreateItemResponse, IFolder, IFolderIdOptions, IGetGroupContentOptions, IGetRelatedItemsResponse, IGroup, IGroupAdd, IGroupCategorySchema as restIGroupCategorySchema, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IManageItemRelationshipOptions, IMoveItemOptions, IMoveItemResponse, IPagingParams, IPortal, IRemoveItemResourceOptions, ISearchGroupContentOptions, ISearchOptions, ISearchResult, ISetAccessOptions, ISharingResponse, ItemRelationshipType, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserContentResponse, IUserGroupOptions, IGroupSharingOptions, IUserItemOptions, addItemData as restAddItemData, addItemRelationship, addItemResource, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroup, getGroupContent, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, getSelf, getRelatedItems, getUser as restGetUser, searchGroupContent, searchItems as restSearchItems, setItemAccess, searchGroups as restSearchGroups, shareItemWithGroup, removeFolder as restRemoveFolder, removeGroup as restRemoveGroup, removeGroupUsers, removeItem as restRemoveItem, removeItemResource, unprotectGroup, unprotectItem, updateGroup as restUpdateGroup, updateItem as restUpdateItem, updateItemResource, } from "@esri/arcgis-rest-portal";
22
- export { IRequestOptions, IParams, ArcGISAuthError, encodeFormData, request } from "@esri/arcgis-rest-request";
23
- export { ICreateServiceParams, ICreateServiceResult, IExtent, ISpatialReference, addToServiceDefinition as svcAdminAddToServiceDefinition, createFeatureService as svcAdminCreateFeatureService, } from "@esri/arcgis-rest-service-admin";
24
+ export { IFeature, IQueryRelatedOptions, IQueryRelatedResponse, IRelatedRecordGroup, queryFeatures as rest_queryFeatures, addFeatures as rest_addFeatures, applyEdits, queryFeatures, } from "@esri/arcgis-rest-feature-layer";
25
+ export { IAddFolderResponse, IAddItemDataOptions, ICreateItemOptions, ICreateItemResponse, IFolder, IFolderIdOptions, IGetGroupContentOptions, IGetRelatedItemsResponse, IGroup, IGroupAdd, IGroupCategorySchema as restIGroupCategorySchema, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IManageItemRelationshipOptions, IMoveItemOptions, IMoveItemResponse, IPagingParams, IPortal, IRemoveItemResourceOptions, ISearchGroupContentOptions, ISearchOptions, ISearchResult, ISetAccessOptions, ISharingResponse, ItemRelationshipType, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserContentResponse, IUserGroupOptions, IGroupSharingOptions, IUserItemOptions, addItemData as restAddItemData, addItemRelationship, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, searchGroupContent, setItemAccess, searchGroups as restSearchGroups, removeGroupUsers, removeItem as restRemoveItem, } from "@esri/arcgis-rest-portal";
26
+ export { IRequestOptions, IParams, ArcGISAuthError, encodeFormData } from "@esri/arcgis-rest-request";
27
+ export { ICreateServiceParams, ICreateServiceResult, IExtent, ISpatialReference, createFeatureService as svcAdminCreateFeatureService, } from "@esri/arcgis-rest-service-admin";
28
+ export interface IFolderSuccessResult {
29
+ success: boolean;
30
+ folder: {
31
+ username: string;
32
+ id: string;
33
+ title: string;
34
+ };
35
+ }
36
+ export interface IGroupSuccessResult {
37
+ success: boolean;
38
+ groupId: string;
39
+ }
40
+ export interface ISuccessResult {
41
+ success: boolean;
42
+ }
43
+ export declare function addItemResource(requestOptions: IItemResourceOptions): Promise<IItemResourceResponse>;
44
+ export declare function getGroup(id: string, requestOptions?: IRequestOptions): Promise<IGroup>;
45
+ export declare function getGroupContent(id: string, requestOptions?: IGetGroupContentOptions): Promise<IGroupContentResult>;
46
+ export declare function getRelatedItems(requestOptions: IItemRelationshipOptions): Promise<IGetRelatedItemsResponse>;
47
+ export declare function getSelf(requestOptions?: IRequestOptions): Promise<IPortal>;
48
+ export declare function queryRelated(requestOptions: IQueryRelatedOptions): Promise<IQueryRelatedResponse>;
49
+ export declare function removeItemResource(requestOptions: IRemoveItemResourceOptions): Promise<ISuccessResult>;
50
+ export declare function request(url: string, requestOptions?: IRequestOptions): Promise<any>;
51
+ export declare function restGetUser(requestOptions?: string | IGetUserOptions): Promise<IUser>;
52
+ export declare function restRemoveFolder(requestOptions: IFolderIdOptions): Promise<IFolderSuccessResult>;
53
+ export declare function restRemoveGroup(requestOptions: IUserGroupOptions): Promise<any>;
54
+ export declare function restSearchItems(search: string | ISearchOptions | SearchQueryBuilder): Promise<ISearchResult<IItem>>;
55
+ export declare function restUpdateItem(requestOptions: IUpdateItemOptions): Promise<IUpdateItemResponse>;
56
+ export declare function restUpdateGroup(requestOptions: IUpdateGroupOptions): Promise<IGroupSuccessResult>;
57
+ export declare function shareItemWithGroup(requestOptions: IGroupSharingOptions): Promise<ISharingResponse>;
58
+ export declare function svcAdminAddToServiceDefinition(url: string, requestOptions: IAddToServiceDefinitionOptions): Promise<IAddToServiceDefinitionResult>;
59
+ export declare function updateItemResource(requestOptions: IItemResourceOptions): Promise<IItemResourceResponse>;
60
+ export declare function unprotectGroup(requestOptions: IUserGroupOptions): Promise<ISuccessResult>;
61
+ export declare function unprotectItem(requestOptions: IUserItemOptions): Promise<ISuccessResult>;
@@ -16,9 +16,80 @@
16
16
  /**
17
17
  * Provides common functions and classes from ArcGIS REST JS.
18
18
  */
19
+ import { addItemResource as restAddItemResource, getGroup as restGetGroup, getGroupContent as restGetGroupContent, getRelatedItems as restGetRelatedItems, getSelf as restGetSelf, getUser, removeFolder, removeGroup, removeItemResource as restRemoveItemResource, searchItems, shareItemWithGroup as restShareItemWithGroup, unprotectGroup as restUnprotectGroup, unprotectItem as restUnprotectItem, updateGroup, updateItem, updateItemResource as restUpdateItemResource, } from "@esri/arcgis-rest-portal";
20
+ import { request as restRequest } from "@esri/arcgis-rest-request";
21
+ import {
22
+ //IRelatedRecordGroup,
23
+ queryRelated as restQueryRelated, } from "@esri/arcgis-rest-feature-layer";
24
+ import { addToServiceDefinition, } from "@esri/arcgis-rest-service-admin";
19
25
  export { UserSession } from "@esri/arcgis-rest-auth";
20
- export { queryFeatures as rest_queryFeatures, addFeatures as rest_addFeatures, queryRelated, applyEdits, queryFeatures, } from "@esri/arcgis-rest-feature-layer";
21
- export { addItemData as restAddItemData, addItemRelationship, addItemResource, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroup, getGroupContent, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, getSelf, getRelatedItems, getUser as restGetUser, searchGroupContent, searchItems as restSearchItems, setItemAccess, searchGroups as restSearchGroups, shareItemWithGroup, removeFolder as restRemoveFolder, removeGroup as restRemoveGroup, removeGroupUsers, removeItem as restRemoveItem, removeItemResource, unprotectGroup, unprotectItem, updateGroup as restUpdateGroup, updateItem as restUpdateItem, updateItemResource, } from "@esri/arcgis-rest-portal";
22
- export { ArcGISAuthError, encodeFormData, request } from "@esri/arcgis-rest-request";
23
- export { addToServiceDefinition as svcAdminAddToServiceDefinition, createFeatureService as svcAdminCreateFeatureService, } from "@esri/arcgis-rest-service-admin";
26
+ export { queryFeatures as rest_queryFeatures, addFeatures as rest_addFeatures, applyEdits, queryFeatures, } from "@esri/arcgis-rest-feature-layer";
27
+ export { addItemData as restAddItemData, addItemRelationship, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, searchGroupContent, setItemAccess, searchGroups as restSearchGroups, removeGroupUsers, removeItem as restRemoveItem, } from "@esri/arcgis-rest-portal";
28
+ export { ArcGISAuthError, encodeFormData } from "@esri/arcgis-rest-request";
29
+ export { createFeatureService as svcAdminCreateFeatureService, } from "@esri/arcgis-rest-service-admin";
30
+ //custom export functions that mimic the same export function from arcgis-rest-js
31
+ //to bypass unit test error:
32
+ //Error: <spyOn> : <functon or property> is not declared writable or has no setter
33
+ export function addItemResource(requestOptions) {
34
+ return restAddItemResource(requestOptions);
35
+ }
36
+ export function getGroup(id, requestOptions) {
37
+ return restGetGroup(id, requestOptions);
38
+ }
39
+ export function getGroupContent(id, requestOptions) {
40
+ return restGetGroupContent(id, requestOptions);
41
+ }
42
+ export function getRelatedItems(requestOptions) {
43
+ return restGetRelatedItems(requestOptions);
44
+ }
45
+ export function getSelf(requestOptions) {
46
+ return restGetSelf(requestOptions);
47
+ }
48
+ export function queryRelated(requestOptions) {
49
+ return restQueryRelated(requestOptions);
50
+ }
51
+ export function removeItemResource(requestOptions) {
52
+ return restRemoveItemResource(requestOptions);
53
+ }
54
+ export function request(url, requestOptions) {
55
+ return restRequest(url, requestOptions);
56
+ }
57
+ //getUser already exists as an custom export in restHelperGet so this export has 'rest' prefix to denote it's from rest.
58
+ export function restGetUser(requestOptions) {
59
+ return getUser(requestOptions);
60
+ }
61
+ //removeFolder already exists as an custom export in restHelperGet so this export has 'rest' prefix to denote it's from rest.
62
+ export function restRemoveFolder(requestOptions) {
63
+ return removeFolder(requestOptions);
64
+ }
65
+ //removeGroup already exists as an custom export in restHelperGet so this export has 'rest' prefix to denote it's from rest.
66
+ export function restRemoveGroup(requestOptions) {
67
+ return removeGroup(requestOptions);
68
+ }
69
+ //searchItems already exists as an custom export in restHelperGet so this export has 'rest' prefix to denote it's from rest.
70
+ export function restSearchItems(search) {
71
+ return searchItems(search);
72
+ }
73
+ //supdateItem already exists as an custom export in restHelperGet so this export has 'rest' prefix to denote it's from rest.
74
+ export function restUpdateItem(requestOptions) {
75
+ return updateItem(requestOptions);
76
+ }
77
+ export function restUpdateGroup(requestOptions) {
78
+ return updateGroup(requestOptions);
79
+ }
80
+ export function shareItemWithGroup(requestOptions) {
81
+ return restShareItemWithGroup(requestOptions);
82
+ }
83
+ export function svcAdminAddToServiceDefinition(url, requestOptions) {
84
+ return addToServiceDefinition(url, requestOptions);
85
+ }
86
+ export function updateItemResource(requestOptions) {
87
+ return restUpdateItemResource(requestOptions);
88
+ }
89
+ export function unprotectGroup(requestOptions) {
90
+ return restUnprotectGroup(requestOptions);
91
+ }
92
+ export function unprotectItem(requestOptions) {
93
+ return restUnprotectItem(requestOptions);
94
+ }
24
95
  //# sourceMappingURL=arcgisRestJS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"arcgisRestJS.js","sourceRoot":"","sources":["../../src/arcgisRestJS.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AAEH,OAAO,EAAyD,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC5G,OAAO,EAKL,aAAa,IAAI,kBAAkB,EACnC,WAAW,IAAI,gBAAgB,EAC/B,YAAY,EACZ,UAAU,EACV,aAAa,GACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAoCL,WAAW,IAAI,eAAe,EAC9B,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,eAAe,EACf,sBAAsB,IAAI,0BAA0B,EACpD,OAAO,EACP,WAAW,EACX,gBAAgB,IAAI,oBAAoB,EACxC,cAAc,EACd,SAAS,IAAI,aAAa,EAC1B,YAAY,EACZ,OAAO,EACP,eAAe,EACf,OAAO,IAAI,WAAW,EACtB,kBAAkB,EAClB,WAAW,IAAI,eAAe,EAC9B,aAAa,EACb,YAAY,IAAI,gBAAgB,EAChC,kBAAkB,EAClB,YAAY,IAAI,gBAAgB,EAChC,WAAW,IAAI,eAAe,EAC9B,gBAAgB,EAChB,UAAU,IAAI,cAAc,EAC5B,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,WAAW,IAAI,eAAe,EAC9B,UAA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105
  "Desktop Application Template": "dat",
106
- "Desktop Style": "xxx",
106
+ "Desktop Style": "dst",
107
107
  "Document Link": "doc",
108
108
  "Explorer Add In": "xxx",
109
109
  "Explorer Layer": "xxx",
@@ -158,7 +158,7 @@ export function getItemTypeAbbrev(type) {
158
158
  "Service Definition": "xxx",
159
159
  "Shapefile": "xxx",
160
160
  "Statistical Data Collection": "xxx",
161
- "Style": "xxx",
161
+ "Style": "sty",
162
162
  "Survey123 Add In": "xxx",
163
163
  "Symbol Set": "xxx",
164
164
  "Task File": "xxx",
@@ -0,0 +1,38 @@
1
+ /** @license
2
+ * Copyright 2018 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { UserSession } from "../arcgisRestJS";
17
+ /**
18
+ * Adds a blob resource.
19
+ *
20
+ * @param blob Blob containing the resource to add
21
+ * @param itemId Id of the item to add the resource to
22
+ * @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
23
+ * @param filename File name used to rename an existing file resource uploaded.
24
+ * File name must have the file resource extension.
25
+ * @param authentication Credentials for the request
26
+ */
27
+ export declare function addBlobResource(blob: any, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;
28
+ /**
29
+ * Adds a text resource.
30
+ *
31
+ * @param content Text to add as a resource
32
+ * @param itemId Id of the item to add the resource to
33
+ * @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
34
+ * @param filename File name used to rename an existing file resource uploaded, or to be used together with
35
+ * text as file name for it. File name must have the file resource extension.
36
+ * @param authentication Credentials for the request
37
+ */
38
+ export declare function addTextResource(content: string, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;
@@ -0,0 +1,79 @@
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 { ArcGISAuthError, addItemResource } from "../arcgisRestJS";
17
+ /**
18
+ * Adds a blob resource.
19
+ *
20
+ * @param blob Blob containing the resource to add
21
+ * @param itemId Id of the item to add the resource to
22
+ * @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
23
+ * @param filename File name used to rename an existing file resource uploaded.
24
+ * File name must have the file resource extension.
25
+ * @param authentication Credentials for the request
26
+ */
27
+ export function addBlobResource(blob, itemId, folder, filename, authentication) {
28
+ // Check that the filename has an extension because it is required by the addResources call
29
+ if (filename && filename.indexOf(".") < 0) {
30
+ return new Promise((resolve, reject) => {
31
+ reject(new ArcGISAuthError("Filename must have an extension indicating its type"));
32
+ });
33
+ }
34
+ const requestOptions = {
35
+ id: itemId,
36
+ resource: blob,
37
+ name: filename,
38
+ authentication: authentication,
39
+ params: {},
40
+ };
41
+ if (folder) {
42
+ requestOptions.params = {
43
+ resourcesPrefix: folder,
44
+ };
45
+ }
46
+ return addItemResource(requestOptions);
47
+ }
48
+ /**
49
+ * Adds a text resource.
50
+ *
51
+ * @param content Text to add as a resource
52
+ * @param itemId Id of the item to add the resource to
53
+ * @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
54
+ * @param filename File name used to rename an existing file resource uploaded, or to be used together with
55
+ * text as file name for it. File name must have the file resource extension.
56
+ * @param authentication Credentials for the request
57
+ */
58
+ export function addTextResource(content, itemId, folder, filename, authentication) {
59
+ // Check that the filename has an extension because it is required by the addResources call
60
+ if (filename && filename.indexOf(".") < 0) {
61
+ return new Promise((resolve, reject) => {
62
+ reject(new ArcGISAuthError("Filename must have an extension indicating its type"));
63
+ });
64
+ }
65
+ const requestOptions = {
66
+ id: itemId,
67
+ content,
68
+ name: filename,
69
+ authentication: authentication,
70
+ params: {},
71
+ };
72
+ if (folder) {
73
+ requestOptions.params = {
74
+ resourcesPrefix: folder,
75
+ };
76
+ }
77
+ return addItemResource(requestOptions);
78
+ }
79
+ //# sourceMappingURL=add-resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-resource.js","sourceRoot":"","sources":["../../../src/resources/add-resource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAwB,eAAe,EAAE,eAAe,EAAe,MAAM,iBAAiB,CAAC;AAEtG;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAC7B,IAAS,EACT,MAAc,EACd,MAAc,EACd,QAAgB,EAChB,cAA2B;IAE3B,2FAA2F;IAC3F,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,CAAC,IAAI,eAAe,CAAC,qDAAqD,CAAC,CAAC,CAAC;QACrF,CAAC,CAAC,CAAC;KACJ;IAED,MAAM,cAAc,GAAyB;QAC3C,EAAE,EAAE,MAAM;QACV,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,cAAc;QAC9B,MAAM,EAAE,EAAE;KACX,CAAC;IACF,IAAI,MAAM,EAAE;QACV,cAAc,CAAC,MAAM,GAAG;YACtB,eAAe,EAAE,MAAM;SACxB,CAAC;KACH;IACD,OAAO,eAAe,CAAC,cAAc,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAe,EACf,MAAc,EACd,MAAc,EACd,QAAgB,EAChB,cAA2B;IAE3B,2FAA2F;IAC3F,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,CAAC,IAAI,eAAe,CAAC,qDAAqD,CAAC,CAAC,CAAC;QACrF,CAAC,CAAC,CAAC;KACJ;IAED,MAAM,cAAc,GAAyB;QAC3C,EAAE,EAAE,MAAM;QACV,OAAO;QACP,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,cAAc;QAC9B,MAAM,EAAE,EAAE;KACX,CAAC;IACF,IAAI,MAAM,EAAE;QACV,cAAc,CAAC,MAAM,GAAG;YACtB,eAAe,EAAE,MAAM;SACxB,CAAC;KACH;IACD,OAAO,eAAe,CAAC,cAAc,CAAC,CAAC;AACzC,CAAC"}
@@ -25,10 +25,10 @@ import { IAssociatedFileCopyResults, IAssociatedFileInfo, IItemTemplate, ISource
25
25
  * @param files List of item files' URLs and folder/filenames for storing the files
26
26
  * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
27
27
  * @param destinationAuthentication Credentials for the request to the storage
28
- * @param filesPerZip Number of files to include per zip file; AGO limits zips to 50 files
28
+ * @param maxFilesPerZip Number of files to include per zip file; AGO limits zips to 50 files
29
29
  * @returns A promise which resolves to a list of the result of the copies
30
30
  */
31
- export declare function copyFilesAsResources(files: ISourceFile[], destinationItemId: string, destinationAuthentication: UserSession, filesPerZip?: number): Promise<IAssociatedFileCopyResults[]>;
31
+ export declare function copyFilesAsResources(files: ISourceFile[], destinationItemId: string, destinationAuthentication: UserSession, maxFilesPerZip?: number): Promise<IAssociatedFileCopyResults[]>;
32
32
  /**
33
33
  * Copies the files described by a list of full URLs and storage folder/filename combinations for storing
34
34
  * the resources, metadata, and thumbnail of an item or group to a storage item with different
@@ -31,29 +31,35 @@ import JSZip from "jszip";
31
31
  * @param files List of item files' URLs and folder/filenames for storing the files
32
32
  * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
33
33
  * @param destinationAuthentication Credentials for the request to the storage
34
- * @param filesPerZip Number of files to include per zip file; AGO limits zips to 50 files
34
+ * @param maxFilesPerZip Number of files to include per zip file; AGO limits zips to 50 files
35
35
  * @returns A promise which resolves to a list of the result of the copies
36
36
  */
37
- export function copyFilesAsResources(files, destinationItemId, destinationAuthentication, filesPerZip = 40) {
37
+ export function copyFilesAsResources(files, destinationItemId, destinationAuthentication, maxFilesPerZip = 40) {
38
38
  return new Promise((resolve) => {
39
- let awaitAllItems = [];
39
+ const awaitAllItems = [];
40
40
  const zipInfos = [];
41
41
  if (files.length > 0) {
42
42
  // Bundle the resources into chunked zip updates because AGO tends to have problems with
43
43
  // many updates in a row to the same item: it claims success despite randomly failing.
44
- // Note that AGO imposes a limit of 50 files per zip, so we break the list of resource
45
- // file info into chunks below this threshold and start a zip for each
44
+ // Note that AGO imposes a limit of 50 files per zip and a maximum upload file size under
45
+ // 50MB, so we break the list of resource file info into chunks below this threshold and
46
+ // start a zip for each.
46
47
  // https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm
47
- const chunkedResourceFiles = chunkArray(files, filesPerZip);
48
- chunkedResourceFiles.forEach((chunk, index) => {
49
- // Create a zip for this chunk
50
- const zipInfo = {
51
- filename: `resources${index}.zip`,
52
- zip: new JSZip(),
53
- filelist: [],
54
- };
55
- awaitAllItems = awaitAllItems.concat(chunk.map((file) => copyResourceIntoZip(file, zipInfo)));
56
- zipInfos.push(zipInfo);
48
+ const maxZipSize = 49999000; // bytes
49
+ let zipIndex = 0;
50
+ let currentZipInfo = _createEmptyZipInfo(zipIndex);
51
+ zipInfos.push(currentZipInfo);
52
+ let currentZipSize = 0;
53
+ files.forEach((file) => {
54
+ if (currentZipInfo.filelist.length >= maxFilesPerZip || currentZipSize + file.file.size >= maxZipSize) {
55
+ // Create a new zip for the next chunk
56
+ zipIndex++;
57
+ currentZipInfo = _createEmptyZipInfo(zipIndex);
58
+ zipInfos.push(currentZipInfo);
59
+ currentZipSize = 0;
60
+ }
61
+ awaitAllItems.push(copyResourceIntoZip(file, currentZipInfo));
62
+ currentZipSize += file.file.size;
57
63
  });
58
64
  }
59
65
  if (awaitAllItems.length > 0) {
@@ -203,6 +209,19 @@ export function _copyAssociatedFileZips(zipInfos, destinationItemId, destination
203
209
  }
204
210
  });
205
211
  }
212
+ /**
213
+ * Creates an empty zip info object.
214
+ *
215
+ * @param index Index of the zip info object, used as a suffix for the filename
216
+ * @returns An empty zip info object
217
+ */
218
+ function _createEmptyZipInfo(index) {
219
+ return {
220
+ filename: `resources${index}.zip`,
221
+ zip: new JSZip(),
222
+ filelist: [],
223
+ };
224
+ }
206
225
  /**
207
226
  * Replace templatizations in an item's resources
208
227
  *
@@ -1 +1 @@
1
- {"version":3,"file":"copyAssociatedFiles.js","sourceRoot":"","sources":["../../../src/resources/copyAssociatedFiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EACL,SAAS,GAOV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wHAA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AsC;IAEtC,OAAO,IAAI,OAAO,CAA+B,CAAC,OAAO,EAAE,EAAE;QAC3D,IAAI,UAAU,GAAiC,EAAE,CAAC;QAElD,iCAAiC;QACjC,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAErC,4BAA4B;QAC5B,IAAI,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,EAAkC,CAAC,CAAC;QAC5E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,iBAAiB,GAAG,uBAAuB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;SACrG;QACD,KAAK,iBAAiB;aACnB,IAAI,CAAC,CAAC,QAAsC,EAAE,EAAE;YAC/C,UAAU,GAAG,QAAQ,CAAC;YAEtB,8CAA8C;YAC9C,OAAO,IAAI,OAAO,CAAO,CAAC,YAAY,EAAE,EAAE;gBACxC,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,CAAC;YACzC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;aACD,IAAI,CAAC,GAAG,EAAE;YACT,yDAAyD;YACzD,OAAO,eAAe,CAAC,aAAa,EAAE,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;QACtF,CAAC,CAAC;aACD,IAAI,CAAC,CAAC,SAA0B,EAAE,EAAE;YACnC,yFAAyF;YACzF,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAA6B,EAAE,EAAE;gBAC3D,UAAU,CAAC,IAAI,CACb,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,mBAAmB,CAA+B,CAC/F,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,OAAO,CAAC,UAAU,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -13,8 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export * from "./add-resource";
16
17
  export * from "./addMetadataFromBlob";
17
- export * from "./add-resource-from-blob";
18
18
  export * from "./convert-item-resource-to-storage-resource";
19
19
  export * from "./convert-storage-resource-to-item-resource";
20
20
  export * from "./copyAssociatedFiles";
@@ -27,3 +27,4 @@ export * from "./get-blob";
27
27
  export * from "./getItemResourcesFilesFromPaths";
28
28
  export * from "./getItemResourcesPaths";
29
29
  export * from "./solution-resource";
30
+ export * from "./update-resource";
@@ -13,8 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export * from "./add-resource";
16
17
  export * from "./addMetadataFromBlob";
17
- export * from "./add-resource-from-blob";
18
18
  export * from "./convert-item-resource-to-storage-resource";
19
19
  export * from "./convert-storage-resource-to-item-resource";
20
20
  export * from "./copyAssociatedFiles";
@@ -27,4 +27,5 @@ export * from "./get-blob";
27
27
  export * from "./getItemResourcesFilesFromPaths";
28
28
  export * from "./getItemResourcesPaths";
29
29
  export * from "./solution-resource";
30
+ export * from "./update-resource";
30
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
@@ -15,12 +15,13 @@
15
15
  */
16
16
  import { UserSession } from "../arcgisRestJS";
17
17
  /**
18
- * Add a resource from a blob
18
+ * Adds a text resource.
19
19
  *
20
- * @param blob
21
- * @param itemId
22
- * @param folder
23
- * @param filename
24
- * @param authentication
20
+ * @param content Text to add as a resource
21
+ * @param itemId Id of the item to add the resource to
22
+ * @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
23
+ * @param filename File name used to rename an existing file resource uploaded, or to be used together with
24
+ * text as file name for it. File name must have the file resource extension.
25
+ * @param authentication Credentials for the request
25
26
  */
26
- export declare function addResourceFromBlob(blob: any, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;
27
+ export declare function updateTextResource(content: string, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;