@mikezimm/fps-core-v7 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/banner/components/SingleHelpPage/interfaces/ITrickRow.d.ts.map +1 -1
- package/lib/banner/components/SingleHelpPage/interfaces/ITrickRow.js +1 -0
- package/lib/banner/components/SingleHelpPage/interfaces/ITrickRow.js.map +1 -1
- package/lib/components/atoms/easy-icons/SystemIcons/DefaultEasyIcons.d.ts.map +1 -1
- package/lib/components/atoms/easy-icons/SystemIcons/DefaultEasyIcons.js.map +1 -1
- package/lib/components/atoms/easy-icons/interfaces/eiTypes.d.ts.map +1 -1
- package/lib/components/atoms/easy-icons/interfaces/eiTypes.js +3 -4
- package/lib/components/atoms/easy-icons/interfaces/eiTypes.js.map +1 -1
- package/lib/components/molecules/AnyContent/IAnyListLib.d.ts +8 -3
- package/lib/components/molecules/AnyContent/IAnyListLib.d.ts.map +1 -1
- package/lib/components/molecules/AnyContent/IAnyListLib.js +4 -16
- package/lib/components/molecules/AnyContent/IAnyListLib.js.map +1 -1
- package/lib/components/molecules/SearchPage/functions/addListIsAMeta.d.ts +13 -0
- package/lib/components/molecules/SearchPage/functions/addListIsAMeta.d.ts.map +1 -1
- package/lib/components/molecules/SearchPage/functions/addListIsAMeta.js +13 -0
- package/lib/components/molecules/SearchPage/functions/addListIsAMeta.js.map +1 -1
- package/lib/components/molecules/SearchPage/functions/addSearchMeta1.d.ts.map +1 -1
- package/lib/components/molecules/SearchPage/functions/addSearchMeta1.js +3 -1
- package/lib/components/molecules/SearchPage/functions/addSearchMeta1.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getFormDigestValueNoContext.js +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getFormDigestValueNoContext.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.js +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.js.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts +3 -0
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts.map +1 -0
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.js +15 -0
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.js.map +1 -0
- package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.d.ts +0 -1
- package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.d.ts.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.js +2 -2
- package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.js.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.d.ts +4 -0
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.d.ts.map +1 -0
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.js +15 -0
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.js.map +1 -0
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.d.ts +3 -0
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.d.ts.map +1 -0
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.js +9 -0
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.js.map +1 -0
- package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.d.ts.map +1 -1
- package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.js +2 -4
- package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.js.map +1 -1
- package/lib/logic/Math/convertFileSizeStringToNum.d.ts.map +1 -1
- package/lib/logic/Math/convertFileSizeStringToNum.js +3 -0
- package/lib/logic/Math/convertFileSizeStringToNum.js.map +1 -1
- package/lib/logic/Math/labels.d.ts +8 -0
- package/lib/logic/Math/labels.d.ts.map +1 -1
- package/lib/logic/Math/labels.js +12 -0
- package/lib/logic/Math/labels.js.map +1 -1
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.d.ts +10 -0
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.d.ts.map +1 -0
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.js +18 -0
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.js.map +1 -0
- package/lib/restAPIs/lists/files/getFileEmbedUrl.d.ts +37 -0
- package/lib/restAPIs/lists/files/getFileEmbedUrl.d.ts.map +1 -0
- package/lib/restAPIs/lists/files/getFileEmbedUrl.js +74 -0
- package/lib/restAPIs/lists/files/getFileEmbedUrl.js.map +1 -0
- package/lib/restAPIs/lists/files/postSourceFilesAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/files/postSourceFilesAPI.js +12 -8
- package/lib/restAPIs/lists/files/postSourceFilesAPI.js.map +1 -1
- package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts +5 -0
- package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/items/getSourceItemsAPI.js +28 -10
- package/lib/restAPIs/lists/items/getSourceItemsAPI.js.map +1 -1
- package/lib/restAPIs/lists/items/getSourceItemsBatchAPI.d.ts +1 -3
- package/lib/restAPIs/lists/items/getSourceItemsBatchAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/items/getSourceItemsBatchAPI.js +37 -35
- package/lib/restAPIs/lists/items/getSourceItemsBatchAPI.js.map +1 -1
- package/lib/restAPIs/lists/items/getTodayRestFilter.d.ts +9 -0
- package/lib/restAPIs/lists/items/getTodayRestFilter.d.ts.map +1 -0
- package/lib/restAPIs/lists/items/getTodayRestFilter.js +29 -0
- package/lib/restAPIs/lists/items/getTodayRestFilter.js.map +1 -0
- package/lib/restAPIs/lists/items/postSourceItemsAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/items/postSourceItemsAPI.js +10 -6
- package/lib/restAPIs/lists/items/postSourceItemsAPI.js.map +1 -1
- package/lib/restAPIs/lists/lists/MinListSelects.d.ts +8 -0
- package/lib/restAPIs/lists/lists/MinListSelects.d.ts.map +1 -0
- package/lib/restAPIs/lists/lists/MinListSelects.js +26 -0
- package/lib/restAPIs/lists/lists/MinListSelects.js.map +1 -0
- package/lib/restAPIs/lists/lists/getSourceListsAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/lists/getSourceListsAPI.js +10 -6
- package/lib/restAPIs/lists/lists/getSourceListsAPI.js.map +1 -1
- package/lib/restAPIs/sites/groups/GroupSelects.d.ts +4 -0
- package/lib/restAPIs/sites/groups/GroupSelects.d.ts.map +1 -0
- package/lib/restAPIs/sites/groups/GroupSelects.js +4 -0
- package/lib/restAPIs/sites/groups/GroupSelects.js.map +1 -0
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts +4 -5
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js +17 -13
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js.map +1 -1
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.d.ts +6 -0
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.d.ts.map +1 -0
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js +65 -0
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js.map +1 -0
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts +2 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js +15 -6
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js.map +1 -1
- package/lib/restAPIs/sites/sites/getSiteAPI.d.ts +8 -0
- package/lib/restAPIs/sites/sites/getSiteAPI.d.ts.map +1 -0
- package/lib/restAPIs/sites/sites/getSiteAPI.js +77 -0
- package/lib/restAPIs/sites/sites/getSiteAPI.js.map +1 -0
- package/lib/restAPIs/sites/users/UserGroupSelects.d.ts +3 -0
- package/lib/restAPIs/sites/users/UserGroupSelects.d.ts.map +1 -0
- package/lib/restAPIs/sites/users/UserGroupSelects.js +3 -0
- package/lib/restAPIs/sites/users/UserGroupSelects.js.map +1 -0
- package/lib/restAPIs/sites/users/getSiteUsersAPI.d.ts +5 -0
- package/lib/restAPIs/sites/users/getSiteUsersAPI.d.ts.map +1 -0
- package/lib/restAPIs/sites/users/getSiteUsersAPI.js +62 -0
- package/lib/restAPIs/sites/users/getSiteUsersAPI.js.map +1 -0
- package/lib/types/fps-returns/common/IFPSResultStatus.d.ts +1 -1
- package/lib/types/fps-returns/common/IFPSResultStatus.d.ts.map +1 -1
- package/lib/types/fps-returns/common/IFPSResultStatus.js +1 -1
- package/lib/types/fps-returns/common/IFPSResultStatus.js.map +1 -1
- package/lib/types/fps-returns/sites/IFpsSiteReturn.d.ts +41 -0
- package/lib/types/fps-returns/sites/IFpsSiteReturn.d.ts.map +1 -0
- package/lib/types/fps-returns/sites/IFpsSiteReturn.js +2 -0
- package/lib/types/fps-returns/sites/IFpsSiteReturn.js.map +1 -0
- package/lib/types/fps-returns/sites/ISiteErrorObj.d.ts +3 -0
- package/lib/types/fps-returns/sites/ISiteErrorObj.d.ts.map +1 -1
- package/lib/types/fps-returns/sites/groups/IGroupResults.d.ts +18 -12
- package/lib/types/fps-returns/sites/groups/IGroupResults.d.ts.map +1 -1
- package/lib/types/fps-returns/sites/groups/IGroupResults.js +0 -10
- package/lib/types/fps-returns/sites/groups/IGroupResults.js.map +1 -1
- package/lib/types/fps-returns/sites/groups/IGroupsResults.d.ts +10 -12
- package/lib/types/fps-returns/sites/groups/IGroupsResults.d.ts.map +1 -1
- package/lib/types/fps-returns/sites/groups/IGroupsResults.js +0 -10
- package/lib/types/fps-returns/sites/groups/IGroupsResults.js.map +1 -1
- package/lib/types/fps-returns/sites/users/{ISiteUsersResults.d.ts → IFpsUsersReturn.d.ts} +6 -3
- package/lib/types/fps-returns/sites/users/IFpsUsersReturn.d.ts.map +1 -0
- package/lib/types/fps-returns/sites/users/{ISiteUsersResults.js → IFpsUsersReturn.js} +1 -1
- package/lib/types/fps-returns/sites/users/IFpsUsersReturn.js.map +1 -0
- package/lib/types/fps-returns/sites/users/ISiteUserResults.d.ts +5 -2
- package/lib/types/fps-returns/sites/users/ISiteUserResults.d.ts.map +1 -1
- package/lib/types/fps-returns/sites/webs/IWebErrorObj.d.ts +2 -2
- package/lib/types/fps-returns/sites/webs/IWebErrorObj.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/types/fps-returns/sites/users/ISiteUsersResults.d.ts.map +0 -1
- package/lib/types/fps-returns/sites/users/ISiteUsersResults.js.map +0 -1
|
@@ -1,45 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 2024-11-23: This is for EXPERIMENTAL Purposes to test out batch calls
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Content-
|
|
4
|
+
function sampleBatchCall() {
|
|
5
|
+
const siteUrl = "https://fuzzypawstech.sharepoint.com/sites/WorldMaps";
|
|
6
|
+
const batchEndpoint = `${siteUrl}/_api/$batch`;
|
|
7
|
+
async function executeBatch() {
|
|
8
|
+
const headers = {
|
|
9
|
+
"Accept": "application/json;odata=verbose",
|
|
10
|
+
"Content-Type": "multipart/mixed; boundary=batch_boundary",
|
|
11
|
+
"Authorization": "Bearer YOUR_ACCESS_TOKEN" // Use an access token if required
|
|
12
|
+
};
|
|
13
|
+
// Construct batch request body
|
|
14
|
+
const body = `
|
|
15
|
+
--batch_boundary
|
|
16
|
+
Content-Type: application/http
|
|
17
|
+
Content-Transfer-Encoding: binary
|
|
17
18
|
|
|
18
|
-
GET ${siteUrl}/_api/web/lists/getbytitle('WorldCoords888')/items?$top=5 HTTP/1.1
|
|
19
|
-
Accept: application/json;odata=verbose
|
|
19
|
+
GET ${siteUrl}/_api/web/lists/getbytitle('WorldCoords888')/items?$top=5 HTTP/1.1
|
|
20
|
+
Accept: application/json;odata=verbose
|
|
20
21
|
|
|
21
|
-
--batch_boundary
|
|
22
|
-
Content-Type: application/http
|
|
23
|
-
Content-Transfer-Encoding: binary
|
|
22
|
+
--batch_boundary
|
|
23
|
+
Content-Type: application/http
|
|
24
|
+
Content-Transfer-Encoding: binary
|
|
24
25
|
|
|
25
|
-
GET ${siteUrl}/_api/web/lists/getbytitle('WorldCoords999')/items?$top=5 HTTP/1.1
|
|
26
|
-
Accept: application/json;odata=verbose
|
|
26
|
+
GET ${siteUrl}/_api/web/lists/getbytitle('WorldCoords999')/items?$top=5 HTTP/1.1
|
|
27
|
+
Accept: application/json;odata=verbose
|
|
27
28
|
|
|
28
|
-
--batch_boundary--
|
|
29
|
-
`;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
--batch_boundary--
|
|
30
|
+
`;
|
|
31
|
+
// Send batch request
|
|
32
|
+
const response = await fetch(batchEndpoint, {
|
|
33
|
+
method: "POST",
|
|
34
|
+
headers,
|
|
35
|
+
body
|
|
36
|
+
});
|
|
37
|
+
if (response.ok) {
|
|
38
|
+
const text = await response.text();
|
|
39
|
+
console.log(text); // Contains the raw batch response
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
console.error(`Batch request failed with status: ${response.status}`);
|
|
43
|
+
}
|
|
42
44
|
}
|
|
45
|
+
executeBatch();
|
|
43
46
|
}
|
|
44
|
-
executeBatch();
|
|
45
47
|
//# sourceMappingURL=getSourceItemsBatchAPI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSourceItemsBatchAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsBatchAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,MAAM,OAAO,GAAG,sDAAsD,CAAC;
|
|
1
|
+
{"version":3,"file":"getSourceItemsBatchAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsBatchAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,SAAS,eAAe;IAEtB,MAAM,OAAO,GAAG,sDAAsD,CAAC;IACvE,MAAM,aAAa,GAAG,GAAG,OAAO,cAAc,CAAC;IAE/C,KAAK,UAAU,YAAY;QACvB,MAAM,OAAO,GAAG;YACZ,QAAQ,EAAE,gCAAgC;YAC1C,cAAc,EAAE,0CAA0C;YAC1D,eAAe,EAAE,0BAA0B,CAAC,kCAAkC;SACjF,CAAC;QAEF,+BAA+B;QAC/B,MAAM,IAAI,GAAG;;;;;QAKX,OAAO;;;;;;;QAOP,OAAO;;;;GAIZ,CAAC;QAEE,qBAAqB;QACrB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,aAAa,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;SACP,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,EAAE,EAAE;YACb,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,kCAAkC;SACxD;aAAM;YACH,OAAO,CAAC,KAAK,CAAC,qCAAqC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;SACzE;IACL,CAAC;IAED,YAAY,EAAE,CAAC;AAGjB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migrated from fps-Pnp2
|
|
3
|
+
* Added for https://github.com/mikezimm/drilldown7/issues/369
|
|
4
|
+
* Takes a typical rest filter and replaces references like [Today -7] with proper rest filter string
|
|
5
|
+
* @param restFilter
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function getTodayRestFilter(restFilter: string): string;
|
|
9
|
+
//# sourceMappingURL=getTodayRestFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTodayRestFilter.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getTodayRestFilter.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,wBAAgB,kBAAkB,CAAE,UAAU,EAAE,MAAM,GAAI,MAAM,CAwB/D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migrated from fps-Pnp2
|
|
3
|
+
* Added for https://github.com/mikezimm/drilldown7/issues/369
|
|
4
|
+
* Takes a typical rest filter and replaces references like [Today -7] with proper rest filter string
|
|
5
|
+
* @param restFilter
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export function getTodayRestFilter(restFilter) {
|
|
9
|
+
if (!restFilter)
|
|
10
|
+
return '';
|
|
11
|
+
if (restFilter && restFilter.indexOf('[Today') > 1) {
|
|
12
|
+
const currentTime = new Date().toISOString();
|
|
13
|
+
//Replace [Today] with currect time
|
|
14
|
+
restFilter = restFilter.replace(/\B\[Today\]\B/gi, `datetime'${currentTime}'`);
|
|
15
|
+
//Regex looks for anything matching [Today-+xxx] and replaces with date string
|
|
16
|
+
// NOTE This did not work: "MeetingDate gt datetime'2023-09-17T00:08:07.458Z'"
|
|
17
|
+
restFilter = restFilter.replace(/\[Today(.*?)\]/gi, (match => {
|
|
18
|
+
let numb = parseInt(match.toLowerCase().substring(6).replace("]", ""), 10);
|
|
19
|
+
const today = new Date();
|
|
20
|
+
var newdate = new Date();
|
|
21
|
+
newdate.setDate(today.getDate() + numb);
|
|
22
|
+
let newDateString = newdate.toISOString();
|
|
23
|
+
// return `'${newDateString}'`;
|
|
24
|
+
return `datetime'${newDateString}'`;
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
return restFilter;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=getTodayRestFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTodayRestFilter.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getTodayRestFilter.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,MAAM,UAAU,kBAAkB,CAAE,UAAkB;IAEpD,IAAK,CAAC,UAAU;QAAG,OAAO,EAAE,CAAC;IAE7B,IAAK,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAG;QACpD,MAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC7C,mCAAmC;QACnC,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,iBAAiB,EAAE,YAAY,WAAW,GAAG,CAAC,CAAC;QAE/E,8EAA8E;QAC9E,+EAA+E;QAC/E,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,KAAK,CAAC,EAAE;YAC3D,IAAI,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3E,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;YACzB,IAAI,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;YACzB,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;YACxC,IAAI,aAAa,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;YAC1C,+BAA+B;YAC/B,OAAO,YAAY,aAAa,GAAG,CAAC;QACtC,CAAC,CAAC,CAAC,CAAC;KACL;IAED,OAAO,UAAU,CAAC;AAEpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postSourceItemsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/postSourceItemsAPI.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"postSourceItemsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/postSourceItemsAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;AAQrH,wBAAsB,kBAAkB,CAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAG,GAAG,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAsD9K"}
|
|
@@ -4,27 +4,30 @@ import { startPerformOpV2, updatePerformanceEndV2 } from "../../../components/mo
|
|
|
4
4
|
import { check4This } from "../../../logic/Links/CheckSearch";
|
|
5
5
|
import { doSpJsFetchOrPost } from "../../../components/molecules/SpHttp/doSpJsFetch";
|
|
6
6
|
import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
|
|
7
|
+
import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
|
|
7
8
|
export async function postSourceItemsAPI(sourceProps, saveItem, alertMe, consoleLog) {
|
|
8
9
|
const { performanceSettings } = sourceProps;
|
|
9
10
|
const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
|
|
10
|
-
const {
|
|
11
|
+
const { listTitle, } = sourceProps;
|
|
12
|
+
// 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
|
|
13
|
+
const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
|
|
11
14
|
/**
|
|
12
15
|
SAMPLE Full SharePoint Items Rest call:
|
|
13
16
|
https://example.sharepoint.com/sites/MySite/_api/web/lists/getbytitle('MyList')/items
|
|
14
17
|
|
|
15
18
|
*/
|
|
16
|
-
let postAPI = `${
|
|
17
|
-
if (!
|
|
19
|
+
let postAPI = `${useUrl}/_api/web/lists/getbytitle('${listTitle}')/items`;
|
|
20
|
+
if (!useUrl) {
|
|
18
21
|
// NO WebURL... Throw Alert
|
|
19
22
|
if (alertMe === true)
|
|
20
23
|
alert(`${listTitle} ${SourcePropsNoWebUrl}`);
|
|
21
|
-
return createErrorFpsListReturn(
|
|
24
|
+
return createErrorFpsListReturn(useUrl, listTitle);
|
|
22
25
|
}
|
|
23
26
|
if (!listTitle) {
|
|
24
27
|
// NO WebURL... Throw Alert
|
|
25
28
|
if (alertMe === true)
|
|
26
29
|
alert(`${''} ${SourcePropsNoListTitle}`);
|
|
27
|
-
return createErrorFpsListReturn(
|
|
30
|
+
return createErrorFpsListReturn(useUrl, listTitle);
|
|
28
31
|
}
|
|
29
32
|
const initialResult = await doSpJsFetchOrPost(postAPI, 'POST', sourceProps.digestValue ? sourceProps.digestValue : '', '', saveItem);
|
|
30
33
|
// Add any required custom logic here
|
|
@@ -33,7 +36,8 @@ export async function postSourceItemsAPI(sourceProps, saveItem, alertMe, console
|
|
|
33
36
|
// }
|
|
34
37
|
const result = checkItemsResults(initialResult, `fps-core-v7: postSourceItems ~ 46`, alertMe, consoleLog);
|
|
35
38
|
result.fpsContentType = !sourceProps.fpsContentType ? ['item'] : sourceProps.fpsContentType;
|
|
36
|
-
if
|
|
39
|
+
// 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
|
|
40
|
+
if (result.fpsContentType.indexOf('item') < 0)
|
|
37
41
|
result.fpsContentType.push('item');
|
|
38
42
|
result.unifiedPerformanceOps.save = performanceSettings ?
|
|
39
43
|
updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: 1 })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postSourceItemsAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/postSourceItemsAPI.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"postSourceItemsAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/postSourceItemsAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC,CAAC,iBAAiB;AACtJ,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAErF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;AAE5G,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAE,WAAyB,EAAE,QAAc,EAAE,OAA4B,EAAE,UAA+B;IAEhJ,MAAM,EAAE,mBAAmB,EAAE,GAAG,WAAW,CAAC;IAC5C,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,CAAC,gBAAgB,CAAE,mBAAmB,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAErF,MAAM,EAAE,SAAS,GAAG,GAAG,WAAW,CAAC;IAEnC,sIAAsI;IACtI,MAAM,MAAM,GAAW,gCAAgC,CAAE,WAAW,CAAE,CAAC;IAEvE;;;;MAIE;IAEA,IAAI,OAAO,GAAW,GAAG,MAAM,+BAA+B,SAAS,UAAU,CAAC;IAEpF,IAAK,CAAC,MAAM,EAAG;QACb,2BAA2B;QAC3B,IAAK,OAAO,KAAK,IAAI;YAAG,KAAK,CAAC,GAAG,SAAS,IAAI,mBAAmB,EAAE,CAAC,CAAC;QACrE,OAAO,wBAAwB,CAAE,MAAM,EAAE,SAAS,CAAE,CAAC;KACtD;IA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,CAAE,CAAA;KAAE;IAAA,CAAC;IAEjI,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IAnyLibrary, IAnyList } from "../../../components/molecules/AnyContent/IAnyListLib";
|
|
2
|
+
/**
|
|
3
|
+
* NOTES: USE These selects for basic List/Library fetches
|
|
4
|
+
* addListIsAMeta
|
|
5
|
+
*/
|
|
6
|
+
export declare const MinListSelects: Array<keyof IAnyList | keyof IAnyLibrary>;
|
|
7
|
+
export declare const MinIsAListSelects: Array<keyof IAnyList | keyof IAnyLibrary>;
|
|
8
|
+
//# sourceMappingURL=MinListSelects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinListSelects.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/lists/MinListSelects.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAG,MAAM,sDAAsD,CAAC;AAE9F;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAGpE,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAkBvE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// https://github.com/mikezimm/pivottiles7/issues/238
|
|
2
|
+
/**
|
|
3
|
+
* NOTES: USE These selects for basic List/Library fetches
|
|
4
|
+
* addListIsAMeta
|
|
5
|
+
*/
|
|
6
|
+
export const MinListSelects = [
|
|
7
|
+
'Title', 'Description', 'BaseType', 'BaseTemplate', 'ServerRelativeUrl', 'Hidden', 'Id', 'EntityTypeName',
|
|
8
|
+
// 'IsSystemList', I think this is my property
|
|
9
|
+
];
|
|
10
|
+
// https://github.com/mikezimm/pivottiles7/issues/238
|
|
11
|
+
export const MinIsAListSelects = [
|
|
12
|
+
...MinListSelects,
|
|
13
|
+
'ItemCount', 'NoCrawl', 'EnableVersioning', 'MajorVersionLimit', 'EnableFolderCreation',
|
|
14
|
+
'EnableAttachments', 'OnQuickLaunch', 'AllowContentTypes', 'HasUniqueRoleAssignments',
|
|
15
|
+
'LastItemModifiedDate', 'LastItemUserModifiedDate',
|
|
16
|
+
// COPIED FROM export const TypeCheckKeysAnyLibrary: string[] = [
|
|
17
|
+
'EnableMinimalDownload',
|
|
18
|
+
'DraftVersionVisibility',
|
|
19
|
+
'ForceCheckout',
|
|
20
|
+
'EnableMinorVersions',
|
|
21
|
+
'MajorWithMinorVersionsLimit',
|
|
22
|
+
'EnableModeration',
|
|
23
|
+
'EnableRequestSignOff',
|
|
24
|
+
'ExemptFromBlockDownloadOfNonViewableFiles',
|
|
25
|
+
];
|
|
26
|
+
//# sourceMappingURL=MinListSelects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinListSelects.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/lists/MinListSelects.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAIrD;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAA8C;IACvE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,mBAAmB,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB;IACzG,8CAA8C;CAC/C,CAAC;AAEF,qDAAqD;AACrD,MAAM,CAAC,MAAM,iBAAiB,GAA8C;IAC1E,GAAG,cAAc;IACjB,WAAW,EAAE,SAAS,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,sBAAsB;IACvF,mBAAmB,EAAE,eAAe,EAAE,mBAAmB,EAAE,0BAA0B;IACrF,sBAAsB,EAAE,0BAA0B;IAElD,iEAAiE;IACjE,uBAAuB;IACvB,wBAAwB;IACxB,eAAe;IAEf,qBAAqB;IACrB,6BAA6B;IAE7B,kBAAkB;IAClB,sBAAsB;IAEtB,2CAA2C;CAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSourceListsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/lists/getSourceListsAPI.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"getSourceListsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/lists/getSourceListsAPI.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;AAQrH,wBAAsB,mBAAmB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAG/J;AAED,wBAAsB,iBAAiB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CA0D7J"}
|
|
@@ -4,6 +4,7 @@ import { SourcePropsNoListTitle, SourcePropsNoWebUrl } from '../../../components
|
|
|
4
4
|
import { checkItemsResults } from '../../../components/molecules/process-results/CheckItemsResults';
|
|
5
5
|
import { check4This } from '../../../logic/Links/CheckSearch';
|
|
6
6
|
import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
|
|
7
|
+
import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
|
|
7
8
|
// Renamed from fetch to get
|
|
8
9
|
export async function fetchSourceListsAPI(sourceProps, alertMe, consoleLog) {
|
|
9
10
|
const results = await getSourceListsAPI(sourceProps, alertMe, consoleLog);
|
|
@@ -13,23 +14,25 @@ export async function getSourceListsAPI(sourceProps, alertMe, consoleLog) {
|
|
|
13
14
|
const { performanceSettings } = sourceProps;
|
|
14
15
|
// 2024-09-15: Change to null as any to pass linting when migrating from fps-library-v2
|
|
15
16
|
const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
|
|
16
|
-
const {
|
|
17
|
-
|
|
17
|
+
const { listTitle, orderBy, restFilter, selectThese, } = sourceProps;
|
|
18
|
+
// 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
|
|
19
|
+
const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
|
|
20
|
+
if (!useUrl || !listTitle) {
|
|
18
21
|
// NO WebURL... Throw Alert
|
|
19
22
|
if (alertMe === true)
|
|
20
23
|
alert(`${listTitle ? listTitle : SourcePropsNoListTitle} ${SourcePropsNoWebUrl}`);
|
|
21
|
-
const results = createErrorFpsListReturn(
|
|
24
|
+
const results = createErrorFpsListReturn(useUrl, listTitle);
|
|
22
25
|
return results;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
SAMPLE Full SharePoint Items Rest call:
|
|
26
|
-
`${this.props.SettingsSource.
|
|
29
|
+
`${this.props.SettingsSource.useUrl}/
|
|
27
30
|
_api/web/lists?
|
|
28
31
|
$filter=startswith(Title,'EULA')&
|
|
29
32
|
$select=Title,Id`;
|
|
30
33
|
|
|
31
34
|
*/
|
|
32
|
-
let fetchAPI = `${
|
|
35
|
+
let fetchAPI = `${useUrl}/_api/web/lists?`;
|
|
33
36
|
if (selectThese && selectThese.length > 0)
|
|
34
37
|
fetchAPI += `$select=${selectThese && selectThese.length > 0 ? selectThese.join(',') : 'Title,Id'}&`;
|
|
35
38
|
if (restFilter)
|
|
@@ -44,7 +47,8 @@ export async function getSourceListsAPI(sourceProps, alertMe, consoleLog) {
|
|
|
44
47
|
// }
|
|
45
48
|
let result = checkItemsResults(initialResult, `fps-core-v7: fetchSourceListsAPI ~ 43`, alertMe, consoleLog);
|
|
46
49
|
result.fpsContentType = !sourceProps.fpsContentType ? ['list'] : sourceProps.fpsContentType;
|
|
47
|
-
if
|
|
50
|
+
// 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
|
|
51
|
+
if (result.fpsContentType.indexOf('list') < 0)
|
|
48
52
|
result.fpsContentType.push('list');
|
|
49
53
|
// result.unifiedPerformanceOps.fetch = performanceSettings ?
|
|
50
54
|
// updatePerformanceEndV2( { op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items.length }) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSourceListsAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/lists/getSourceListsAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,GAAG,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAgB,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;
|
|
1
|
+
{"version":3,"file":"getSourceListsAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/lists/getSourceListsAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,GAAG,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAgB,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,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roupSelects.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/GroupSelects.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,EAAE,MAAM,EAAsD,CAAC;AAE3F,eAAO,MAAM,qBAAqB,EAAE,MAAM,EAAsD,CAAC;AAEjG,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAAwC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export const GroupSelectsMin = ['Title', 'Description', 'Id', 'PrincipalType'];
|
|
2
|
+
export const GroupSelectsWithOwner = [...GroupSelectsMin, 'Owner/Title', 'Owner/Id'];
|
|
3
|
+
export const GroupSelectsFull = ['*', ...GroupSelectsWithOwner,];
|
|
4
|
+
//# sourceMappingURL=GroupSelects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupSelects.js","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/GroupSelects.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAa,CAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,CAAE,CAAC;AAE3F,MAAM,CAAC,MAAM,qBAAqB,GAAa,CAAE,GAAG,eAAe,EAAE,aAAa,EAAE,UAAU,CAAE,CAAC;AAEjG,MAAM,CAAC,MAAM,gBAAgB,GAAa,CAAE,GAAG,EAAE,GAAG,qBAAqB,EAAI,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IFpsItemsReturn } from '../../../components/molecules/process-results/CheckItemsResults';
|
|
2
|
-
|
|
3
|
-
export declare
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function getGroupMembersAPI(absoluteWebUrl: string, GroupName: string, restFilter: string, digestValue: string, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
|
|
2
|
+
import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
|
|
3
|
+
export declare function checkCurrentUserInGroup(sourceProps: ISourceProps, GroupName: string, LoginName: string): Promise<IFpsItemsReturn>;
|
|
4
|
+
export declare function getAllUsersInGroup(sourceProps: ISourceProps, GroupName: string): Promise<IFpsItemsReturn>;
|
|
5
|
+
export declare function getGroupMembersAPI(sourceProps: ISourceProps, GroupName: string, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
|
|
7
6
|
//# sourceMappingURL=getGroupMembersAPI.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGroupMembersAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/getGroupMembersAPI.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"getGroupMembersAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/getGroupMembersAPI.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;AAKrH,OAAO,EAAE,YAAY,EAAuB,MAAM,yDAAyD,CAAC;AAI5G,wBAAsB,uBAAuB,CAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAI,OAAO,CAAC,eAAe,CAAC,CAKzI;AAED,wBAAsB,kBAAkB,CAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAK,OAAO,CAAC,eAAe,CAAC,CAIlH;AAED,wBAAsB,kBAAkB,CAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CA8DjL"}
|
|
@@ -4,26 +4,29 @@ import { checkItemsResults } from '../../../components/molecules/process-results
|
|
|
4
4
|
import { check4This } from '../../../logic/Links/CheckSearch';
|
|
5
5
|
import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
|
|
6
6
|
import { SourcePropsNoWebUrl } from '../../../components/molecules/source-props/ISourceProps';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export async function checkCurrentUserInGroup(
|
|
7
|
+
import { getAbsoluteWebUrlFromSourceProps, } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
|
|
8
|
+
import { UserGroupSelects } from '../users/UserGroupSelects';
|
|
9
|
+
export async function checkCurrentUserInGroup(sourceProps, GroupName, LoginName) {
|
|
10
10
|
// const results: IFpsItemsReturn = await getGroupMembersAPI( absoluteWebUrl, GroupName, `Title eq '${LoginName}'`, false, true );
|
|
11
|
-
|
|
11
|
+
// 2024-12-05: Noticed next line may have error: The rest filter is Title eq and property says LoginName
|
|
12
|
+
const results = await getGroupMembersAPI({ ...sourceProps, ...{ restFilter: `Title eq '${LoginName}'` } }, GroupName, false, true);
|
|
12
13
|
return results;
|
|
13
14
|
}
|
|
14
|
-
export async function getAllUsersInGroup(
|
|
15
|
+
export async function getAllUsersInGroup(sourceProps, GroupName) {
|
|
15
16
|
// const results: IFpsItemsReturn = await getGroupMembersAPI( absoluteWebUrl, GroupName, `Title eq '${LoginName}'`, false, true );
|
|
16
|
-
const results = await getGroupMembersAPI(
|
|
17
|
+
const results = await getGroupMembersAPI({ ...sourceProps, restFilter: '' }, GroupName, false, true);
|
|
17
18
|
return results;
|
|
18
19
|
}
|
|
19
|
-
export async function getGroupMembersAPI(
|
|
20
|
+
export async function getGroupMembersAPI(sourceProps, GroupName, alertMe, consoleLog) {
|
|
21
|
+
const { restFilter, digestValue = '', selectThese = UserGroupSelects } = sourceProps;
|
|
20
22
|
const performanceSettings = { label: GroupName, includeMsStr: true, updateMiliseconds: true, op: 'fetch' };
|
|
21
23
|
const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
|
|
22
|
-
|
|
24
|
+
const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
|
|
25
|
+
if (!useUrl) {
|
|
23
26
|
// NO WebURL... Throw Alert
|
|
24
27
|
if (alertMe === true)
|
|
25
28
|
alert(`getGroupInfoAPI: ${SourcePropsNoWebUrl}`);
|
|
26
|
-
const results = createErrorFpsListReturn(
|
|
29
|
+
const results = createErrorFpsListReturn(useUrl, '');
|
|
27
30
|
results.status = 'NoWeb';
|
|
28
31
|
return results;
|
|
29
32
|
}
|
|
@@ -31,7 +34,7 @@ export async function getGroupMembersAPI(absoluteWebUrl, GroupName, restFilter,
|
|
|
31
34
|
// NO WebURL... Throw Alert
|
|
32
35
|
if (alertMe === true)
|
|
33
36
|
alert(`${''} SourceProps does NOT have an GroupName`);
|
|
34
|
-
const results = createErrorFpsListReturn(
|
|
37
|
+
const results = createErrorFpsListReturn(useUrl, '');
|
|
35
38
|
results.statusText = 'No GroupName';
|
|
36
39
|
results.status = 'NoGroup';
|
|
37
40
|
return results;
|
|
@@ -39,14 +42,15 @@ export async function getGroupMembersAPI(absoluteWebUrl, GroupName, restFilter,
|
|
|
39
42
|
/**
|
|
40
43
|
SAMPLE Full SharePoint Items Rest call:
|
|
41
44
|
|
|
42
|
-
https://example.sharepoint.com/sites/MySite/_api/web/
|
|
45
|
+
https://example.sharepoint.com/sites/MySite/_api/web/sitegroups/getbyname('GroupName')/users?
|
|
43
46
|
$select=Id,Title,EULAText,ExpandedField1/Id,ExpandedField1/Title,ExpandedField2/Id,ExpandedField2/Title&
|
|
44
47
|
$expand=ExpandedField1,ExpandedField2&
|
|
45
48
|
$filter=Title eq 'SomeTitle'&
|
|
46
49
|
$orderby=Id desc
|
|
47
50
|
|
|
48
51
|
*/
|
|
49
|
-
let fetchAPI = `${
|
|
52
|
+
let fetchAPI = `${useUrl}/_api/web/sitegroups/getbyname('${GroupName}')/users?$select=${selectThese.join(',')}`;
|
|
53
|
+
fetchAPI += `$orderby=Title asc`;
|
|
50
54
|
if (restFilter)
|
|
51
55
|
fetchAPI += `&$filter=${encodeURIComponent(restFilter)}&`;
|
|
52
56
|
const initialResult = await doSpJsFetchOrPost(fetchAPI, 'GET', digestValue, '');
|
|
@@ -55,7 +59,7 @@ export async function getGroupMembersAPI(absoluteWebUrl, GroupName, restFilter,
|
|
|
55
59
|
// resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
|
|
56
60
|
// }
|
|
57
61
|
const result = checkItemsResults(initialResult, `fps-core-v7: getGroupMembersAPI ~ 24`, alertMe, consoleLog);
|
|
58
|
-
result.fpsContentType = ['
|
|
62
|
+
result.fpsContentType = ['user'];
|
|
59
63
|
result.unifiedPerformanceOps.fetch = performanceSettings ?
|
|
60
64
|
updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items ? result.items.length : 0 })
|
|
61
65
|
: null; // 2024-09-29: set null as any to pass build error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGroupMembersAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/getGroupMembersAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AAEvH,OAAO,
|
|
1
|
+
{"version":3,"file":"getGroupMembersAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/getGroupMembersAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,MAA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AqB,CAAC,KAAK,GAAG,mBAAmB,CAAC,CAAC;QACxD,sBAAsB,CAAE,EAAE,EAAE,EAAE,OAAyB,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACnK,CAAC,CAAC,IAAW,CAAC,CAAE,oDAAoD;IAEtE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC,KAAK,CAAC;IAEpD,IAAK,UAAU,CAAE,0BAA0B,CAAE,KAAK,IAAI,EAAG;QAAE,OAAO,CAAC,GAAG,CAAE,+CAA+C,EAAE,MAAM,CAAE,CAAA;KAAE;IAAA,CAAC;IAEpI,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
|
|
2
|
+
import { IAssociatedGroupType } from '../../../types/fps-returns/sites/groups/IAssociatedGroupType';
|
|
3
|
+
import { IFpsAssocGroupsReturn, IFpsGroupReturn } from '../../../types/fps-returns/sites/groups/IGroupResults';
|
|
4
|
+
export declare function getWebAllAssociatedGroupsAPI(sourceProps: ISourceProps, digestValue: string, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsAssocGroupsReturn>;
|
|
5
|
+
export declare function getWebAssociatedGroupAPI(sourceProps: ISourceProps, group: IAssociatedGroupType, digestValue: string, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsGroupReturn>;
|
|
6
|
+
//# sourceMappingURL=getWebAssociatedGroupAPI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWebAssociatedGroupAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/getWebAssociatedGroupAPI.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAuB,MAAM,yDAAyD,CAAC;AAE5G,OAAO,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAC;AAEpG,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAC;AAE/G,wBAAsB,4BAA4B,CAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,qBAAqB,CAAC,CAwBnM;AAED,wBAAsB,wBAAwB,CAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAgDtN"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { doSpJsFetchOrPost } from '../../../components/molecules/SpHttp/doSpJsFetch';
|
|
2
|
+
import { startPerformOpV2, updatePerformanceEndV2 } from '../../../components/molecules/Performance/functions';
|
|
3
|
+
import { checkItemsResults } from '../../../components/molecules/process-results/CheckItemsResults';
|
|
4
|
+
import { check4This } from '../../../logic/Links/CheckSearch';
|
|
5
|
+
import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
|
|
6
|
+
import { SourcePropsNoWebUrl } from '../../../components/molecules/source-props/ISourceProps';
|
|
7
|
+
import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
|
|
8
|
+
import { createEmptyFetchReturn } from '../../../components/molecules/SpHttp/IJSFetchReturn';
|
|
9
|
+
export async function getWebAllAssociatedGroupsAPI(sourceProps, digestValue, alertMe, consoleLog) {
|
|
10
|
+
const performanceSettings = { label: `AssocGroups`, includeMsStr: true, updateMiliseconds: true, op: 'fetch' };
|
|
11
|
+
const fetchOp = startPerformOpV2(performanceSettings); // 2024-09-29: set null as any to pass build error.
|
|
12
|
+
const allReturns = await Promise.all(['Owner', 'Member', 'Visitor'].map((group, idx) => { return getWebAssociatedGroupAPI(sourceProps, group, digestValue, alertMe, consoleLog); }));
|
|
13
|
+
const result = createEmptyFetchReturn(allReturns[0][`fetchAPI`], 'GET');
|
|
14
|
+
result.items = allReturns;
|
|
15
|
+
result.owner = allReturns[0];
|
|
16
|
+
result.member = allReturns[1];
|
|
17
|
+
result.visitor = allReturns[2];
|
|
18
|
+
if (!result.unifiedPerformanceOps)
|
|
19
|
+
result.unifiedPerformanceOps = {};
|
|
20
|
+
result.unifiedPerformanceOps.fetch = performanceSettings ?
|
|
21
|
+
updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items ? result.items.length : 0 }) : null;
|
|
22
|
+
result.fetchOp = result.unifiedPerformanceOps.fetch;
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
export async function getWebAssociatedGroupAPI(sourceProps, group, digestValue, alertMe, consoleLog) {
|
|
26
|
+
const performanceSettings = { label: `AssocGroups`, includeMsStr: true, updateMiliseconds: true, op: 'fetch' };
|
|
27
|
+
const fetchOp = startPerformOpV2(performanceSettings); // 2024-09-29: set null as any to pass build error.
|
|
28
|
+
// 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
|
|
29
|
+
const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
|
|
30
|
+
if (!useUrl) {
|
|
31
|
+
// NO WebURL... Throw Alert
|
|
32
|
+
if (alertMe === true)
|
|
33
|
+
alert(`getWebAssociatedGroupAPI: ${SourcePropsNoWebUrl}`);
|
|
34
|
+
const results = createErrorFpsListReturn(useUrl, '');
|
|
35
|
+
return results;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
SAMPLE Full SharePoint Items Rest call:
|
|
39
|
+
``${this.props.SettingsSource.useUrl}/
|
|
40
|
+
_api/web/associatedownergroup?
|
|
41
|
+
$select=Title,Id`;
|
|
42
|
+
*/
|
|
43
|
+
const { selectThese, } = sourceProps;
|
|
44
|
+
let fetchAPI = `${useUrl}/_api/web/associated${group}group?`;
|
|
45
|
+
fetchAPI += `$select=${selectThese && selectThese.length > 0 ? selectThese.join(',') : 'Title,Id'}&`;
|
|
46
|
+
const initialResult = await doSpJsFetchOrPost(fetchAPI, 'GET', digestValue, '');
|
|
47
|
+
// Add any required custom logic here
|
|
48
|
+
// if ( resultHubSites.ok ) {
|
|
49
|
+
// resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
|
|
50
|
+
// }
|
|
51
|
+
const result = checkItemsResults(initialResult, `fps-core-v7: getWebAssociatedGroupAPI ~ 39`, alertMe, consoleLog);
|
|
52
|
+
result.fpsContentType = ['group'];
|
|
53
|
+
result.group = result.items ? result.items[0] : undefined;
|
|
54
|
+
if (!result.unifiedPerformanceOps)
|
|
55
|
+
result.unifiedPerformanceOps = {};
|
|
56
|
+
result.unifiedPerformanceOps.fetch = performanceSettings ?
|
|
57
|
+
updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items ? result.items.length : 0 }) : null;
|
|
58
|
+
result.fetchOp = result.unifiedPerformanceOps.fetch;
|
|
59
|
+
if (check4This(`fpsShowFetchResults=true`) === true) {
|
|
60
|
+
console.log(`fps-core-v7 COMPLETE: getWebAssociatedGroupAPI ~ 47`, result);
|
|
61
|
+
}
|
|
62
|
+
;
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=getWebAssociatedGroupAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWebAssociatedGroupAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/getWebAssociatedGroupAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB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AA;KAAE;IAAA,CAAC;IAE1I,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { IFpsItemsReturn } from '../../../components/molecules/process-results/CheckItemsResults';
|
|
2
|
-
|
|
2
|
+
import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
|
|
3
|
+
export declare function getWebGroupInfoAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
|
|
3
4
|
//# sourceMappingURL=getWebGroupInfoAPI.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWebGroupInfoAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/getWebGroupInfoAPI.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"getWebGroupInfoAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/sites/groups/getWebGroupInfoAPI.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;AAKrH,OAAO,EAAE,YAAY,EAAuB,MAAM,yDAAyD,CAAC;AAM5G,wBAAsB,kBAAkB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAkD9J"}
|