@esri/solution-common 6.6.0-next.20260407204859 → 6.6.1-next.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.
@@ -27,6 +27,23 @@ export declare function getPortalUrls(authentication: UserSession): Promise<IPor
27
27
  export declare function getUser(authentication: UserSession): Promise<IUser>;
28
28
  export declare function getUsername(authentication: UserSession): Promise<string>;
29
29
  export declare function getFoldersAndGroups(authentication: UserSession): Promise<any>;
30
+ /**
31
+ * Gets the folders of a specific user.
32
+ *
33
+ * @param username Username of the user whose folders are sought
34
+ * @param authentication Credentials for the request to AGO
35
+ * @returns A promise that will resolve with list of user's folders or an empty list
36
+ */
37
+ export declare function getUserFolders(username: string, authentication: UserSession): Promise<any[]>;
38
+ /**
39
+ * Gets a specific folder and its contents for a user.
40
+ *
41
+ * @param username Username of the user whose folder is sought
42
+ * @param folderId ID of the folder to retrieve
43
+ * @param authentication Credentials for the request to AGO
44
+ * @returns A promise that will resolve with folder information including currentFolder and items
45
+ */
46
+ export declare function getUserFolder(username: string, folderId: string, authentication: UserSession): Promise<any>;
30
47
  /**
31
48
  * Gets a Blob from a web site and casts it as a file using the supplied name.
32
49
  *
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.getPortalDefaultBasemap = exports._getItemResourcesTranche = exports._getGroupContentsTranche = exports._fixTextBlobType = exports.getThumbnailFile = exports.getSolutionsRelatedToAnItem = exports.getPortalUrlFromAuth = exports.getPortalSharingUrlFromAuth = exports.getOrganizationSettings = exports.getJson = exports.getItemThumbnailUrl = exports.getItemThumbnailAsFile = exports.getItemThumbnail = exports.getItemsRelatedToASolution = exports.getItemResourcesFiles = exports.getItemResources = exports.getItemRelatedItemsInSameDirection = exports.getItemRelatedItems = exports.getItemMetadataBlobUrl = exports.getItemMetadataBlob = exports.getItemMetadataAsFile = exports.getItemInfoFileUrlPrefix = exports.getItemDataBlobUrl = exports.getItemDataBlob = exports.getItemDataAsJson = exports.getItemDataAsFile = exports.getItemBase = exports.getGroupContents = exports.getGroupCategorySchema = exports.getGroupBase = exports.getFilenameFromUrl = exports.getEnterpriseServers = exports.getBlobCheckForError = exports.getBlobAsFile = exports.getFoldersAndGroups = exports.getUsername = exports.getUser = exports.getPortalUrls = exports.getPortal = exports.checkJsonForError = void 0;
18
+ exports.getPortalDefaultBasemap = exports._getItemResourcesTranche = exports._getGroupContentsTranche = exports._fixTextBlobType = exports.getThumbnailFile = exports.getSolutionsRelatedToAnItem = exports.getPortalUrlFromAuth = exports.getPortalSharingUrlFromAuth = exports.getOrganizationSettings = exports.getJson = exports.getItemThumbnailUrl = exports.getItemThumbnailAsFile = exports.getItemThumbnail = exports.getItemsRelatedToASolution = exports.getItemResourcesFiles = exports.getItemResources = exports.getItemRelatedItemsInSameDirection = exports.getItemRelatedItems = exports.getItemMetadataBlobUrl = exports.getItemMetadataBlob = exports.getItemMetadataAsFile = exports.getItemInfoFileUrlPrefix = exports.getItemDataBlobUrl = exports.getItemDataBlob = exports.getItemDataAsJson = exports.getItemDataAsFile = exports.getItemBase = exports.getGroupContents = exports.getGroupCategorySchema = exports.getGroupBase = exports.getFilenameFromUrl = exports.getEnterpriseServers = exports.getBlobCheckForError = exports.getBlobAsFile = exports.getUserFolder = exports.getUserFolders = exports.getFoldersAndGroups = exports.getUsername = exports.getUser = exports.getPortalUrls = exports.getPortal = exports.checkJsonForError = void 0;
19
19
  /**
20
20
  * Provides common item fetch functions involving the arcgis-rest-js library.
21
21
  *
@@ -88,6 +88,49 @@ function getFoldersAndGroups(authentication) {
88
88
  });
89
89
  }
90
90
  exports.getFoldersAndGroups = getFoldersAndGroups;
91
+ /**
92
+ * Gets the folders of a specific user.
93
+ *
94
+ * @param username Username of the user whose folders are sought
95
+ * @param authentication Credentials for the request to AGO
96
+ * @returns A promise that will resolve with list of user's folders or an empty list
97
+ */
98
+ function getUserFolders(username, authentication) {
99
+ return new Promise((resolve, reject) => {
100
+ const requestOptions = {
101
+ httpMethod: "GET",
102
+ authentication: authentication,
103
+ rawResponse: false,
104
+ };
105
+ const foldersUrl = `${authentication.portal}/content/users/${encodeURIComponent(username)}`;
106
+ (0, arcgisRestJS_1.request)(foldersUrl, requestOptions).then((response) => {
107
+ resolve(response.folders || []);
108
+ }, (e) => reject(e));
109
+ });
110
+ }
111
+ exports.getUserFolders = getUserFolders;
112
+ /**
113
+ * Gets a specific folder and its contents for a user.
114
+ *
115
+ * @param username Username of the user whose folder is sought
116
+ * @param folderId ID of the folder to retrieve
117
+ * @param authentication Credentials for the request to AGO
118
+ * @returns A promise that will resolve with folder information including currentFolder and items
119
+ */
120
+ function getUserFolder(username, folderId, authentication) {
121
+ return new Promise((resolve, reject) => {
122
+ const requestOptions = {
123
+ httpMethod: "GET",
124
+ authentication: authentication,
125
+ rawResponse: false,
126
+ };
127
+ const folderUrl = `${authentication.portal}/content/users/${encodeURIComponent(username)}/${encodeURIComponent(folderId)}`;
128
+ (0, arcgisRestJS_1.request)(folderUrl, requestOptions).then((response) => {
129
+ resolve(response);
130
+ }, (e) => reject(e));
131
+ });
132
+ }
133
+ exports.getUserFolder = getUserFolder;
91
134
  /**
92
135
  * Gets a Blob from a web site and casts it as a file using the supplied name.
93
136
  *
@@ -27,6 +27,23 @@ export declare function getPortalUrls(authentication: UserSession): Promise<IPor
27
27
  export declare function getUser(authentication: UserSession): Promise<IUser>;
28
28
  export declare function getUsername(authentication: UserSession): Promise<string>;
29
29
  export declare function getFoldersAndGroups(authentication: UserSession): Promise<any>;
30
+ /**
31
+ * Gets the folders of a specific user.
32
+ *
33
+ * @param username Username of the user whose folders are sought
34
+ * @param authentication Credentials for the request to AGO
35
+ * @returns A promise that will resolve with list of user's folders or an empty list
36
+ */
37
+ export declare function getUserFolders(username: string, authentication: UserSession): Promise<any[]>;
38
+ /**
39
+ * Gets a specific folder and its contents for a user.
40
+ *
41
+ * @param username Username of the user whose folder is sought
42
+ * @param folderId ID of the folder to retrieve
43
+ * @param authentication Credentials for the request to AGO
44
+ * @returns A promise that will resolve with folder information including currentFolder and items
45
+ */
46
+ export declare function getUserFolder(username: string, folderId: string, authentication: UserSession): Promise<any>;
30
47
  /**
31
48
  * Gets a Blob from a web site and casts it as a file using the supplied name.
32
49
  *
@@ -79,6 +79,47 @@ export function getFoldersAndGroups(authentication) {
79
79
  }, (e) => reject(e));
80
80
  });
81
81
  }
82
+ /**
83
+ * Gets the folders of a specific user.
84
+ *
85
+ * @param username Username of the user whose folders are sought
86
+ * @param authentication Credentials for the request to AGO
87
+ * @returns A promise that will resolve with list of user's folders or an empty list
88
+ */
89
+ export function getUserFolders(username, authentication) {
90
+ return new Promise((resolve, reject) => {
91
+ const requestOptions = {
92
+ httpMethod: "GET",
93
+ authentication: authentication,
94
+ rawResponse: false,
95
+ };
96
+ const foldersUrl = `${authentication.portal}/content/users/${encodeURIComponent(username)}`;
97
+ request(foldersUrl, requestOptions).then((response) => {
98
+ resolve(response.folders || []);
99
+ }, (e) => reject(e));
100
+ });
101
+ }
102
+ /**
103
+ * Gets a specific folder and its contents for a user.
104
+ *
105
+ * @param username Username of the user whose folder is sought
106
+ * @param folderId ID of the folder to retrieve
107
+ * @param authentication Credentials for the request to AGO
108
+ * @returns A promise that will resolve with folder information including currentFolder and items
109
+ */
110
+ export function getUserFolder(username, folderId, authentication) {
111
+ return new Promise((resolve, reject) => {
112
+ const requestOptions = {
113
+ httpMethod: "GET",
114
+ authentication: authentication,
115
+ rawResponse: false,
116
+ };
117
+ const folderUrl = `${authentication.portal}/content/users/${encodeURIComponent(username)}/${encodeURIComponent(folderId)}`;
118
+ request(folderUrl, requestOptions).then((response) => {
119
+ resolve(response);
120
+ }, (e) => reject(e));
121
+ });
122
+ }
82
123
  /**
83
124
  * Gets a Blob from a web site and casts it as a file using the supplied name.
84
125
  *
@@ -1,7 +1,10 @@
1
- Built 04/07/2026 20:43:13.02
1
+ Built 04/09/2026 10:00:11.09
2
2
  develop
3
- commit e14750ebf04de7066dde6a970560935552c6036b
4
- Author: Ryan Cosby <ryan9313@esri.com>
5
- Date: Mon Apr 6 20:50:15 2026 -0700
3
+ commit a17c59d6edd0de471700387f3d1a85802b9f0c76
4
+ Merge: 8e253fd90 2d8ae8cb0
5
+ Author: Ryan Cosby <rcosby@esri.com>
6
+ Date: Thu Apr 9 10:46:11 2026 -0600
6
7
 
7
- v6.6.0-next.20260406204848
8
+ Merge pull request #1574 from Esri/ryan9313-build-increment-change
9
+
10
+ incremental # approach
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-common",
3
- "version": "6.6.0-next.20260407204859",
3
+ "version": "6.6.1-next.0",
4
4
  "description": "Provides general helper functions for @esri/solution.js.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -96,5 +96,5 @@
96
96
  "esri",
97
97
  "ES6"
98
98
  ],
99
- "gitHead": "e14750ebf04de7066dde6a970560935552c6036b"
99
+ "gitHead": "a17c59d6edd0de471700387f3d1a85802b9f0c76"
100
100
  }