@mikezimm/fps-core-v7 1.0.20 → 1.0.22
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/ItemPicker/functions/fetchFileList.d.ts +2 -3
- package/lib/banner/components/ItemPicker/functions/fetchFileList.d.ts.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchFileList.js +5 -5
- package/lib/banner/components/ItemPicker/functions/fetchFileList.js.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchFileListUniqueIds.d.ts +1 -2
- package/lib/banner/components/ItemPicker/functions/fetchFileListUniqueIds.d.ts.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchFileListUniqueIds.js +2 -2
- package/lib/banner/components/ItemPicker/functions/fetchFileListUniqueIds.js.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchListList.d.ts +1 -2
- package/lib/banner/components/ItemPicker/functions/fetchListList.d.ts.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchListList.js +4 -4
- package/lib/banner/components/ItemPicker/functions/fetchListList.js.map +1 -1
- package/lib/banner/features/FPSDOM/IFPSDigestValues.d.ts +12 -0
- package/lib/banner/features/FPSDOM/IFPSDigestValues.d.ts.map +1 -0
- package/lib/banner/features/FPSDOM/IFPSDigestValues.js +2 -0
- package/lib/banner/features/FPSDOM/IFPSDigestValues.js.map +1 -0
- package/lib/banner/features/FPSDOM/Window.d.ts +2 -0
- package/lib/banner/features/FPSDOM/Window.d.ts.map +1 -1
- package/lib/common/Pivots/Types.d.ts.map +1 -1
- package/lib/common/Pivots/Types.js +1 -0
- package/lib/common/Pivots/Types.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getRequestDigestFromContext.d.ts +13 -0
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getRequestDigestFromContext.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getRequestDigestFromContext.js +26 -0
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getRequestDigestFromContext.js.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getThisFPSDigestValueFromContext.d.ts +17 -0
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getThisFPSDigestValueFromContext.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getThisFPSDigestValueFromContext.js +49 -0
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getThisFPSDigestValueFromContext.js.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getFormDigestValueNoContext.d.ts +20 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getFormDigestValueNoContext.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getFormDigestValueNoContext.js +62 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getFormDigestValueNoContext.js.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.d.ts +16 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js +49 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.d.ts +13 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.js +46 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.js.map +1 -0
- package/lib/components/molecules/SpHttp/doSpJsFetch.d.ts +5 -3
- package/lib/components/molecules/SpHttp/doSpJsFetch.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/doSpJsFetch.js +46 -16
- package/lib/components/molecules/SpHttp/doSpJsFetch.js.map +1 -1
- package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.d.ts +12 -0
- package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.js +54 -0
- package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.js.map +1 -0
- package/lib/components/molecules/SpHttp/helpers/getCurrentFPSDigest.d.ts +3 -0
- package/lib/components/molecules/SpHttp/helpers/getCurrentFPSDigest.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/helpers/getCurrentFPSDigest.js +16 -0
- package/lib/components/molecules/SpHttp/helpers/getCurrentFPSDigest.js.map +1 -0
- package/lib/components/molecules/SpHttp/helpers/getListContentType.d.ts +8 -0
- package/lib/components/molecules/SpHttp/helpers/getListContentType.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/helpers/getListContentType.js +30 -0
- package/lib/components/molecules/SpHttp/helpers/getListContentType.js.map +1 -0
- package/lib/components/molecules/process-results/CheckAnyResults.js +1 -1
- package/lib/components/molecules/process-results/CheckAnyResults.js.map +1 -1
- package/lib/components/molecules/process-results/CheckItemsResults.js +1 -1
- package/lib/components/molecules/process-results/CheckItemsResults.js.map +1 -1
- package/lib/components/molecules/process-results/Logging.d.ts.map +1 -1
- package/lib/components/molecules/process-results/Logging.js +29 -0
- package/lib/components/molecules/process-results/Logging.js.map +1 -1
- package/lib/components/molecules/source-props/ISourceProps.d.ts +1 -0
- package/lib/components/molecules/source-props/ISourceProps.d.ts.map +1 -1
- package/lib/components/molecules/source-props/prepSourceColumns.js +2 -2
- package/lib/components/molecules/source-props/prepSourceColumns.js.map +1 -1
- package/lib/components/webparts/PalettePal/functions/ReactComponent.d.ts +1 -1
- package/lib/components/webparts/PalettePal/functions/ReactComponent.d.ts.map +1 -1
- package/lib/components/webparts/PalettePal/functions/ReactComponent.js +2 -2
- package/lib/components/webparts/PalettePal/functions/ReactComponent.js.map +1 -1
- package/lib/logic/Strings/getFullUrlFromSlashSitesUrl.d.ts +6 -0
- package/lib/logic/Strings/getFullUrlFromSlashSitesUrl.d.ts.map +1 -0
- package/lib/logic/Strings/getFullUrlFromSlashSitesUrl.js +24 -0
- package/lib/logic/Strings/getFullUrlFromSlashSitesUrl.js.map +1 -0
- package/lib/logic/Strings/getSiteCollectionUrlFromLink.d.ts +2 -0
- package/lib/logic/Strings/getSiteCollectionUrlFromLink.d.ts.map +1 -0
- package/lib/logic/Strings/getSiteCollectionUrlFromLink.js +21 -0
- package/lib/logic/Strings/getSiteCollectionUrlFromLink.js.map +1 -0
- package/lib/logic/Strings/urlServices.d.ts +2 -6
- package/lib/logic/Strings/urlServices.d.ts.map +1 -1
- package/lib/logic/Strings/urlServices.js +2 -43
- package/lib/logic/Strings/urlServices.js.map +1 -1
- package/lib/logic/Time/constants.d.ts +1 -0
- package/lib/logic/Time/constants.d.ts.map +1 -1
- package/lib/logic/Time/constants.js +1 -0
- package/lib/logic/Time/constants.js.map +1 -1
- package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts +16 -0
- package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts.map +1 -0
- package/lib/restAPIs/lists/items/getSourceItemsAPI.js +76 -0
- package/lib/restAPIs/lists/items/getSourceItemsAPI.js.map +1 -0
- package/lib/restAPIs/lists/items/postSourceItemsAPI.d.ts +4 -0
- package/lib/restAPIs/lists/items/postSourceItemsAPI.d.ts.map +1 -0
- package/lib/restAPIs/lists/items/postSourceItemsAPI.js +44 -0
- package/lib/restAPIs/lists/items/postSourceItemsAPI.js.map +1 -0
- package/lib/restAPIs/lists/lists/getSourceListsAPI.d.ts +5 -0
- package/lib/restAPIs/lists/lists/getSourceListsAPI.d.ts.map +1 -0
- package/lib/{components/molecules/SpHttp/Lists/fetchSourceListsAPI.js → restAPIs/lists/lists/getSourceListsAPI.js} +14 -12
- package/lib/restAPIs/lists/lists/getSourceListsAPI.js.map +1 -0
- package/lib/restAPIs/logging/interfaces/EasyContents.d.ts +8 -0
- package/lib/restAPIs/logging/interfaces/EasyContents.d.ts.map +1 -0
- package/lib/restAPIs/logging/interfaces/EasyContents.js +8 -0
- package/lib/restAPIs/logging/interfaces/EasyContents.js.map +1 -0
- package/lib/restAPIs/logging/interfaces/ExtremeStorageLog.d.ts +2 -0
- package/lib/restAPIs/logging/interfaces/ExtremeStorageLog.d.ts.map +1 -0
- package/lib/restAPIs/logging/interfaces/ExtremeStorageLog.js +2 -0
- package/lib/restAPIs/logging/interfaces/ExtremeStorageLog.js.map +1 -0
- package/lib/restAPIs/logging/interfaces/constants.d.ts +11 -0
- package/lib/restAPIs/logging/interfaces/constants.d.ts.map +1 -0
- package/lib/restAPIs/logging/interfaces/constants.js +17 -0
- package/lib/restAPIs/logging/interfaces/constants.js.map +1 -0
- package/lib/restAPIs/logging/saveErrorToLog.d.ts +8 -0
- package/lib/restAPIs/logging/saveErrorToLog.d.ts.map +1 -0
- package/lib/restAPIs/logging/saveErrorToLog.js +46 -0
- package/lib/restAPIs/logging/saveErrorToLog.js.map +1 -0
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts +7 -0
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts.map +1 -0
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js +66 -0
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js.map +1 -0
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts +3 -0
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts.map +1 -0
- package/lib/{components/molecules/SpHttp/Groups/fetchWebGroupInfoAPI.js → restAPIs/sites/groups/getWebGroupInfoAPI.js} +11 -11
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js.map +1 -0
- package/lib/types/@msft/1.4.1/IFPSSPHttpClientConfiguration.d.ts +33 -0
- package/lib/types/@msft/1.4.1/IFPSSPHttpClientConfiguration.d.ts.map +1 -0
- package/lib/types/@msft/1.4.1/IFPSSPHttpClientConfiguration.js +37 -0
- package/lib/types/@msft/1.4.1/IFPSSPHttpClientConfiguration.js.map +1 -0
- package/lib/types/@msft/1.4.1/ISPHttpClient.d.ts +71 -0
- package/lib/types/@msft/1.4.1/ISPHttpClient.d.ts.map +1 -0
- package/lib/types/@msft/1.4.1/ISPHttpClient.js +13 -0
- package/lib/types/@msft/1.4.1/ISPHttpClient.js.map +1 -0
- package/package.json +1 -1
- package/lib/components/molecules/SpHttp/Groups/fetchWebGroupInfoAPI.d.ts +0 -3
- package/lib/components/molecules/SpHttp/Groups/fetchWebGroupInfoAPI.d.ts.map +0 -1
- package/lib/components/molecules/SpHttp/Groups/fetchWebGroupInfoAPI.js.map +0 -1
- package/lib/components/molecules/SpHttp/Lists/fetchSourceListsAPI.d.ts +0 -4
- package/lib/components/molecules/SpHttp/Lists/fetchSourceListsAPI.d.ts.map +0 -1
- package/lib/components/molecules/SpHttp/Lists/fetchSourceListsAPI.js.map +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// import { IHelpfullOutput, IHelpfullInput } from '@mikezimm/fps-core-v7/lib/logic/Errors/friendly';
|
|
2
|
+
// import { getUrlVarsAsStrings, getCurrentPageLink } from '@mikezimm/fps-core-v7/lib/logic/Links/UrlFunctions';
|
|
3
|
+
// import { saveThisLogItem } from '@mikezimm/fps-pnp2/lib/services/sp/logging/saveThisLogItem';
|
|
4
|
+
import { doSpJsFetchOrPost } from "../../components/molecules/SpHttp/doSpJsFetch";
|
|
5
|
+
import { getCurrentPageLink, getUrlVarsAsStrings } from "../../logic/Links/UrlFunctions";
|
|
6
|
+
import { AnalyticsWebAbsolute, ErrorLog } from "./interfaces/constants";
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param errorInfo
|
|
10
|
+
* @param errorInput
|
|
11
|
+
*/
|
|
12
|
+
export async function saveErrorToLog(errorInfo, errorInput) {
|
|
13
|
+
//Return if you are not supposed to log an error
|
|
14
|
+
if (errorInput.logErrors !== true) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
// https://github.com/mikezimm/fps-library-v2/issues/15
|
|
18
|
+
if (!errorInfo) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const muteConsole = true;
|
|
22
|
+
const { traceString, e, alertMe, consoleLog, logErrors } = errorInput;
|
|
23
|
+
let trace = traceString ? traceString.split('|') : [];
|
|
24
|
+
let getParams = JSON.stringify(getUrlVarsAsStrings());
|
|
25
|
+
let parsedMessage = errorInfo.returnMess.split('-- FULL ERROR MESSAGE:');
|
|
26
|
+
let zzzRichText1 = parsedMessage.length > 0 ? parsedMessage[0] : 'No friendly error';
|
|
27
|
+
let zzzRichText2 = parsedMessage.length > 0 ? parsedMessage[1] : errorInfo.returnMess;
|
|
28
|
+
let saveItem = {
|
|
29
|
+
Title: trace[0],
|
|
30
|
+
Result: trace[3] ? trace[3] : null,
|
|
31
|
+
zzzText1: trace[4] ? trace[4] : null,
|
|
32
|
+
zzzText2: trace[5] ? trace[5] : null,
|
|
33
|
+
zzzText3: trace[6] ? trace[6] : null,
|
|
34
|
+
zzzText6: typeof alertMe === 'string' ? alertMe : `${alertMe}`,
|
|
35
|
+
zzzText7: typeof consoleLog === 'string' ? consoleLog : `${consoleLog}`,
|
|
36
|
+
zzzNumber1: trace[7] ? trace[7] : null,
|
|
37
|
+
zzzNumber2: trace[8] ? trace[8] : null,
|
|
38
|
+
getParams: getParams,
|
|
39
|
+
PageLink: getCurrentPageLink(),
|
|
40
|
+
zzzRichText1: zzzRichText1,
|
|
41
|
+
zzzRichText2: zzzRichText2,
|
|
42
|
+
};
|
|
43
|
+
let postAPI = `${AnalyticsWebAbsolute}/_api/web/lists/getbytitle('${ErrorLog}')/items`;
|
|
44
|
+
const initialResult = await doSpJsFetchOrPost(postAPI, 'POST', '', saveItem);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=saveErrorToLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saveErrorToLog.js","sourceRoot":"","s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sItemsReturn } from '../../../components/molecules/process-results/CheckItemsResults';
|
|
2
|
+
export declare const UserGroupSelects: string[];
|
|
3
|
+
export declare const UserGroupExtraSelects: string[];
|
|
4
|
+
export declare function checkCurrentUserInGroup(absoluteWebUrl: string, GroupName: string, LoginName: string, digestValue: string): Promise<IFpsItemsReturn>;
|
|
5
|
+
export declare function getAllUsersInGroup(absoluteWebUrl: string, GroupName: string, digestValue: string): Promise<IFpsItemsReturn>;
|
|
6
|
+
export declare function getGroupMembersAPI(absoluteWebUrl: string, GroupName: string, restFilter: string, digestValue: string, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
|
|
7
|
+
//# sourceMappingURL=getGroupMembersAPI.d.ts.map
|
|
@@ -0,0 +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;AAMrH,eAAO,MAAM,gBAAgB,UAA2E,CAAC;AACzG,eAAO,MAAM,qBAAqB,UAAkH,CAAC;AAGrJ,wBAAsB,uBAAuB,CAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAM,OAAO,CAAC,eAAe,CAAC,CAI7J;AAED,wBAAsB,kBAAkB,CAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAM,OAAO,CAAC,eAAe,CAAC,CAIrI;AAED,wBAAsB,kBAAkB,CAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAyDvN"}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
export const UserGroupSelects = ['Id', 'Email', 'IsSiteAdmin', 'LoginName', 'PrincipalType', 'Title',];
|
|
7
|
+
export const UserGroupExtraSelects = ['IsEmailAuthenticationGuestUser', 'IsHiddenInUI', 'IsShareByEmailGuestUser', 'UserId', 'UserPrincipalName',];
|
|
8
|
+
export async function checkCurrentUserInGroup(absoluteWebUrl, GroupName, LoginName, digestValue) {
|
|
9
|
+
// const results: IFpsItemsReturn = await getGroupMembersAPI( absoluteWebUrl, GroupName, `Title eq '${LoginName}'`, false, true );
|
|
10
|
+
const results = await getGroupMembersAPI(absoluteWebUrl, GroupName, `Title eq '${LoginName}'`, digestValue, false, true);
|
|
11
|
+
return results;
|
|
12
|
+
}
|
|
13
|
+
export async function getAllUsersInGroup(absoluteWebUrl, GroupName, digestValue) {
|
|
14
|
+
// const results: IFpsItemsReturn = await getGroupMembersAPI( absoluteWebUrl, GroupName, `Title eq '${LoginName}'`, false, true );
|
|
15
|
+
const results = await getGroupMembersAPI(absoluteWebUrl, GroupName, ``, digestValue, false, true);
|
|
16
|
+
return results;
|
|
17
|
+
}
|
|
18
|
+
export async function getGroupMembersAPI(absoluteWebUrl, GroupName, restFilter, digestValue, alertMe, consoleLog) {
|
|
19
|
+
const performanceSettings = { label: GroupName, includeMsStr: true, updateMiliseconds: true, op: 'fetch' };
|
|
20
|
+
const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
|
|
21
|
+
if (!absoluteWebUrl) {
|
|
22
|
+
// NO WebURL... Throw Alert
|
|
23
|
+
alert(`getGroupInfoAPI: SourceProps does NOT have an absoluteWebUrl`);
|
|
24
|
+
const results = createErrorFpsListReturn(absoluteWebUrl, '');
|
|
25
|
+
results.status = 'NoWeb';
|
|
26
|
+
return results;
|
|
27
|
+
}
|
|
28
|
+
if (!GroupName) {
|
|
29
|
+
// NO WebURL... Throw Alert
|
|
30
|
+
alert(`${''} SourceProps does NOT have an GroupName`);
|
|
31
|
+
const results = createErrorFpsListReturn(absoluteWebUrl, '');
|
|
32
|
+
results.statusText = 'No GroupName';
|
|
33
|
+
results.status = 'NoGroup';
|
|
34
|
+
return results;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
SAMPLE Full SharePoint Items Rest call:
|
|
38
|
+
|
|
39
|
+
https://example.sharepoint.com/sites/MySite/_api/web/lists/getbytitle('MyList')/items?
|
|
40
|
+
$select=Id,Title,EULAText,ExpandedField1/Id,ExpandedField1/Title,ExpandedField2/Id,ExpandedField2/Title&
|
|
41
|
+
$expand=ExpandedField1,ExpandedField2&
|
|
42
|
+
$filter=Title eq 'SomeTitle'&
|
|
43
|
+
$orderby=Id desc
|
|
44
|
+
|
|
45
|
+
*/
|
|
46
|
+
let fetchAPI = `${absoluteWebUrl}/_api/web/sitegroups/getbyname('${GroupName}')/users?$select=${UserGroupSelects.join(',')}`;
|
|
47
|
+
if (restFilter)
|
|
48
|
+
fetchAPI += `&$filter=${encodeURIComponent(restFilter)}&`;
|
|
49
|
+
const initialResult = await doSpJsFetchOrPost(fetchAPI, 'GET', digestValue, '');
|
|
50
|
+
// Add any required custom logic here
|
|
51
|
+
// if ( resultHubSites.ok ) {
|
|
52
|
+
// resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
|
|
53
|
+
// }
|
|
54
|
+
const result = checkItemsResults(initialResult, `fps-core-v7: getGroupMembersAPI ~ 24`, alertMe, consoleLog);
|
|
55
|
+
result.fpsContentType = ['group'];
|
|
56
|
+
result.unifiedPerformanceOps.fetch = performanceSettings ?
|
|
57
|
+
updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items ? result.items.length : 0 })
|
|
58
|
+
: null; // 2024-09-29: set null as any to pass build error.
|
|
59
|
+
result.fetchOp = result.unifiedPerformanceOps.fetch;
|
|
60
|
+
if (check4This(`fpsShowFetchResults=true`) === true) {
|
|
61
|
+
console.log(`fps-core-v7 COMPLETE: getGroupMembersAPI ~ 53`, result);
|
|
62
|
+
}
|
|
63
|
+
;
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=getGroupMembersAPI.js.map
|
|
@@ -0,0 +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;AAGvH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAG,CAAC;AACzG,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAE,gCAAgC,EAAE,cAAc,EAAE,yBAAyB,EAAE,QAAQ,EAAE,mBAAmB,EAAG,CAAC;AAGrJ,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAE,cAAsB,EAAE,SAAiB,EAAE,SAAiB,EAAE,WAAmB;IAC9H,kIAAkI;IAClI,MAAM,OAAO,GAAoB,MAAM,kBAAkB,CAAE,cAAc,EAAE,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;KAChB;IAED;;;;;;;;;MASE;IAEF,IAAI,QAAQ,GAAW,GAAG,cAAc,mCAAmC,SAAS,oBAAoB,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACrI,IAAK,UAAU;QAAG,QAAQ,IAAG,YAAa,kBAAkB,CAAC,UAAU,CAAE,GAAG,CAAC;IAE7E,MAAM,aAAa,GAAG,MAAM,iBAAiB,CAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,CAAE,CAAC;IAElF,sCAAsC;IACtC,+BAA+B;IAC/B,wEAAwE;IACxE,MAAM;IAEN,MAAM,MAAM,GAAqB,iBAAiB,CAAE,aAAa,EAAE,sCAAsC,EAAE,OAAO,EAAE,UAAU,CAAE,CAAC;IACjI,MAAM,CAAC,cAAc,GAAG,CAAE,OAAO,CAAE,CAAC;IAEpC,MAAM,CAAC,qBAAqB,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,3 @@
|
|
|
1
|
+
import { IFpsItemsReturn } from '../../../components/molecules/process-results/CheckItemsResults';
|
|
2
|
+
export declare function getWebGroupInfoAPI(absoluteWebUrl: string, selects: string[], restFilter: string, digestValue: string, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
|
|
3
|
+
//# sourceMappingURL=getWebGroupInfoAPI.d.ts.map
|
|
@@ -0,0 +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;AAMrH,wBAAsB,kBAAkB,CAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CA2CvN"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { startPerformOpV2, updatePerformanceEndV2 } from '
|
|
3
|
-
import { checkItemsResults } from '
|
|
4
|
-
import { check4This } from '
|
|
5
|
-
import { createErrorFpsListReturn } from '
|
|
6
|
-
export async function
|
|
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
|
+
export async function getWebGroupInfoAPI(absoluteWebUrl, selects, restFilter, digestValue, alertMe, consoleLog) {
|
|
7
7
|
const performanceSettings = { label: `SiteGroups`, includeMsStr: true, updateMiliseconds: true, op: 'fetch' };
|
|
8
|
-
const fetchOp =
|
|
8
|
+
const fetchOp = startPerformOpV2(performanceSettings); // 2024-09-29: set null as any to pass build error.
|
|
9
9
|
if (!absoluteWebUrl) {
|
|
10
10
|
// NO WebURL... Throw Alert
|
|
11
11
|
alert(`getGroupInfoAPI: SourceProps does NOT have an absoluteWebUrl`);
|
|
@@ -23,12 +23,12 @@ export async function fetchWebGroupInfoAPI(absoluteWebUrl, selects, restFilter,
|
|
|
23
23
|
fetchAPI += `$select=${selects.length > 0 ? selects.join(',') : 'Title,Id'}&`;
|
|
24
24
|
if (restFilter)
|
|
25
25
|
fetchAPI += `$filter=${restFilter}`;
|
|
26
|
-
const initialResult = await
|
|
26
|
+
const initialResult = await doSpJsFetchOrPost(fetchAPI, 'GET', digestValue, '');
|
|
27
27
|
// Add any required custom logic here
|
|
28
28
|
// if ( resultHubSites.ok ) {
|
|
29
29
|
// resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
|
|
30
30
|
// }
|
|
31
|
-
const result = checkItemsResults(initialResult, `fps-
|
|
31
|
+
const result = checkItemsResults(initialResult, `fps-core-v7: getGroupInfoAPI ~ 39`, alertMe, consoleLog);
|
|
32
32
|
result.fpsContentType = ['group'];
|
|
33
33
|
if (!result.unifiedPerformanceOps)
|
|
34
34
|
result.unifiedPerformanceOps = {};
|
|
@@ -36,9 +36,9 @@ export async function fetchWebGroupInfoAPI(absoluteWebUrl, selects, restFilter,
|
|
|
36
36
|
updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items ? result.items.length : 0 }) : null;
|
|
37
37
|
result.fetchOp = result.unifiedPerformanceOps.fetch;
|
|
38
38
|
if (check4This(`fpsShowFetchResults=true`) === true) {
|
|
39
|
-
console.log(`fps-
|
|
39
|
+
console.log(`fps-core-v7 COMPLETE: getGroupInfoAPI ~ 47`, result);
|
|
40
40
|
}
|
|
41
41
|
;
|
|
42
42
|
return result;
|
|
43
43
|
}
|
|
44
|
-
//# sourceMappingURL=
|
|
44
|
+
//# sourceMappingURL=getWebGroupInfoAPI.js.map
|
|
@@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AAM,iBAAiB,CAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,CAAE,CAAC;IAElF,sCAAsC;IACtC,+BAA+B;IAC/B,wEAAwE;IACxE,MAAM;IAEN,MAAM,MAAM,GAAqB,iBAAiB,CAAE,aAAgC,EAAE,mCAAmC,EAAE,OAAO,EAAE,UAAU,CAAE,CAAC;IACjJ,MAAM,CAAC,cAAc,GAAG,CAAE,OAAO,CAAE,CAAC;IACpC,IAAK,CAAC,MAAM,CAAC,qBAAqB;QAAG,MAAM,CAAC,qBAAqB,GAAG,EAAE,CAAA;IACtE,MAAM,CAAC,qBAAqB,CAAC,KAAK,GAAG,mBAAmB,CAAC,CAAC;QACxD,sBAAsB,CAAE,EAAE,EAAE,EAAE,OAAO,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,CAAE,CAAC,CAAC,IAAW,CAAC;IAEnK,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC,KAAK,CAAC;IAEpD,IAAK,UAAU,CAAE,0BAA0B,CAAE,KAAK,IAAI,EAAG;QAAE,OAAO,CAAC,GAAG,CAAE,4CAA4C,EAAE,MAAM,CAAE,CAAA;KAAE;IAAA,CAAC;IAEjI,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* used ChatGPT to generate these:
|
|
3
|
+
* IFPSSPHttpClientConfiguration, FPSHttpPostOptions
|
|
4
|
+
*
|
|
5
|
+
* Below is a TypeScript interface that represents the structure of SPHttpClient.configurations.v1.
|
|
6
|
+
* This interface includes common properties you might expect, but keep in mind that it can be adjusted
|
|
7
|
+
* based on the actual implementation details you may encounter in the specific version of SPFx you are using.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export interface IFPS_SPHttpClientConfiguration {
|
|
11
|
+
headers?: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
mode?: 'cors' | 'no-cors' | 'same-origin';
|
|
15
|
+
credentials?: 'include' | 'same-origin' | 'omit';
|
|
16
|
+
cache?: 'default' | 'no-cache' | 'reload' | 'force-cache' | 'only-if-cached';
|
|
17
|
+
redirect?: 'follow' | 'error' | 'manual';
|
|
18
|
+
referrer?: string;
|
|
19
|
+
referrerPolicy?: string;
|
|
20
|
+
integrity?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* This would be the representation of SPHttpClient.configurations.v1
|
|
24
|
+
*
|
|
25
|
+
* The SPHttpClient.configurations.v1 isn't explicitly defined in the interface but rather represents a predefined
|
|
26
|
+
* configuration object in SPFx. However, you can create an interface that resembles the structure of configurations.v1.
|
|
27
|
+
* Here's how you can structure it to include the concept of configurations.v1:
|
|
28
|
+
*/
|
|
29
|
+
export declare const FPS_SPHttpClientConfigurations: {
|
|
30
|
+
v1: IFPS_SPHttpClientConfiguration;
|
|
31
|
+
};
|
|
32
|
+
export declare const FPS_HttpPostOptions: IFPS_SPHttpClientConfiguration;
|
|
33
|
+
//# sourceMappingURL=IFPSSPHttpClientConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IFPSSPHttpClientConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/types/@msft/1.4.1/IFPSSPHttpClientConfiguration.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KAAE,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAAC;IAC1C,WAAW,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC;IACjD,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,gBAAgB,CAAC;IAC7E,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AAEH,eAAO,MAAM,8BAA8B;;CAU1C,CAAC;AAIF,eAAO,MAAM,mBAAmB,EAAE,8BAOjC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* used ChatGPT to generate these:
|
|
3
|
+
* IFPSSPHttpClientConfiguration, FPSHttpPostOptions
|
|
4
|
+
*
|
|
5
|
+
* Below is a TypeScript interface that represents the structure of SPHttpClient.configurations.v1.
|
|
6
|
+
* This interface includes common properties you might expect, but keep in mind that it can be adjusted
|
|
7
|
+
* based on the actual implementation details you may encounter in the specific version of SPFx you are using.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* This would be the representation of SPHttpClient.configurations.v1
|
|
12
|
+
*
|
|
13
|
+
* The SPHttpClient.configurations.v1 isn't explicitly defined in the interface but rather represents a predefined
|
|
14
|
+
* configuration object in SPFx. However, you can create an interface that resembles the structure of configurations.v1.
|
|
15
|
+
* Here's how you can structure it to include the concept of configurations.v1:
|
|
16
|
+
*/
|
|
17
|
+
export const FPS_SPHttpClientConfigurations = {
|
|
18
|
+
v1: {
|
|
19
|
+
headers: {
|
|
20
|
+
'Accept': 'application/json;odata=verbose',
|
|
21
|
+
'Content-Type': 'application/json;odata=verbose',
|
|
22
|
+
},
|
|
23
|
+
mode: 'cors',
|
|
24
|
+
credentials: 'include', // or whatever default you'd like
|
|
25
|
+
// Add other defaults as needed
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
// Example usage
|
|
29
|
+
export const FPS_HttpPostOptions = {
|
|
30
|
+
headers: {
|
|
31
|
+
'Accept': 'application/json;odata=verbose',
|
|
32
|
+
'Content-Type': 'application/json;odata=verbose',
|
|
33
|
+
},
|
|
34
|
+
mode: 'cors',
|
|
35
|
+
credentials: 'include',
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=IFPSSPHttpClientConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IFPSSPHttpClientConfiguration.js","sourceRoot":"","sources":["../../../../src/types/@msft/1.4.1/IFPSSPHttpClientConfiguration.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAcH;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,EAAE,EAAE;QACA,OAAO,EAAE;YACL,QAAQ,EAAE,gCAAgC;YAC1C,cAAc,EAAE,gCAAgC;SACnD;QACD,IAAI,EAAE,MAAe;QACrB,WAAW,EAAE,SAAkB,EAAE,iCAAiC;QAClE,+BAA+B;KACA;CACpC,CAAC;AAEF,gBAAgB;AAEhB,MAAM,CAAC,MAAM,mBAAmB,GAAmC;IACjE,OAAO,EAAE;QACP,QAAQ,EAAE,gCAAgC;QAC1C,cAAc,EAAE,gCAAgC;KACjD;IACD,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,SAAS;CACvB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Obtained via node_modules\@microsoft\sp-http\lib\spHttpClient\SPHttpClient.d.ts in 1.4.1 webpart
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* This interface defines the options for the SPHttpClient operations such as
|
|
6
|
+
* get(), post(), fetch(), etc. It is based on the WHATWG API standard
|
|
7
|
+
* parameters that are documented here:
|
|
8
|
+
* https://fetch.spec.whatwg.org/
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface ISPHttpClientOptions extends IHttpClientOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Configure the SPWeb URL for authentication.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* For a write operation, SPHttpClient will automatically add the
|
|
18
|
+
* "X-RequestDigest" header, which may need to be fetched using a seperate
|
|
19
|
+
* request such as "https://example.com/sites/sample/_api/contextinfo".
|
|
20
|
+
* Typically the SPWeb URL ("https://example.com/sites/sample" in this
|
|
21
|
+
* example) can be guessed by looking for a reserved URL segment such
|
|
22
|
+
* as "_api" in the original REST query, however certain REST endpoints
|
|
23
|
+
* do not contain a reserved URL segment; in this case, the webUrl can
|
|
24
|
+
* be explicitly specified using this option.
|
|
25
|
+
*/
|
|
26
|
+
webUrl?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Options for HttpClient
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* This interface defines the options for the HttpClient operations such as
|
|
33
|
+
* get(), post(), fetch(), etc. It is based on the whatwg API standard
|
|
34
|
+
* parameters that are documented here:
|
|
35
|
+
* https://fetch.spec.whatwg.org/
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export interface IHttpClientOptions extends IRequestInit {
|
|
40
|
+
}
|
|
41
|
+
interface IRequestInit {
|
|
42
|
+
/** A BodyInit object or null to set request's body. */
|
|
43
|
+
body?: BodyInit | null;
|
|
44
|
+
/** A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
45
|
+
cache?: RequestCache;
|
|
46
|
+
/** A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. */
|
|
47
|
+
credentials?: RequestCredentials;
|
|
48
|
+
/** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
49
|
+
headers?: HeadersInit;
|
|
50
|
+
/** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
51
|
+
integrity?: string;
|
|
52
|
+
/** A boolean to set request's keepalive. */
|
|
53
|
+
keepalive?: boolean;
|
|
54
|
+
/** A string to set request's method. */
|
|
55
|
+
method?: string;
|
|
56
|
+
/** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */
|
|
57
|
+
mode?: RequestMode;
|
|
58
|
+
priority?: 'auto' | 'high' | 'low';
|
|
59
|
+
/** A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */
|
|
60
|
+
redirect?: RequestRedirect;
|
|
61
|
+
/** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */
|
|
62
|
+
referrer?: string;
|
|
63
|
+
/** A referrer policy to set request's referrerPolicy. */
|
|
64
|
+
referrerPolicy?: ReferrerPolicy;
|
|
65
|
+
/** An AbortSignal to set request's signal. */
|
|
66
|
+
signal?: AbortSignal | null;
|
|
67
|
+
/** Can only be null. Used to disassociate request from any Window. */
|
|
68
|
+
window?: null;
|
|
69
|
+
}
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=ISPHttpClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISPHttpClient.d.ts","sourceRoot":"","sources":["../../../../src/types/@msft/1.4.1/ISPHttpClient.ts"],"names":[],"mappings":"AACA;;GAEG;AACH;;;;;;;GAOG;AAEH,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;CACvD;AAGD,UAAU,YAAY;IACpB,uDAAuD;IACvD,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,yGAAyG;IACzG,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,+JAA+J;IAC/J,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,oGAAoG;IACpG,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,+FAA+F;IAC/F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8HAA8H;IAC9H,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,QAAQ,CAAC,EAAI,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;IACrC,wLAAwL;IACxL,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,iHAAiH;IACjH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,sEAAsE;IACtE,MAAM,CAAC,EAAE,IAAI,CAAC;CACf"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Obtained via node_modules\@microsoft\sp-http\lib\spHttpClient\SPHttpClient.d.ts in 1.4.1 webpart
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* This interface defines the options for the SPHttpClient operations such as
|
|
6
|
+
* get(), post(), fetch(), etc. It is based on the WHATWG API standard
|
|
7
|
+
* parameters that are documented here:
|
|
8
|
+
* https://fetch.spec.whatwg.org/
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ISPHttpClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISPHttpClient.js","sourceRoot":"","sources":["../../../../src/types/@msft/1.4.1/ISPHttpClient.ts"],"names":[],"mappings":"AACA;;GAEG;AACH;;;;;;;GAOG"}
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IFpsItemsReturn } from '../../process-results/CheckItemsResults';
|
|
2
|
-
export declare function fetchWebGroupInfoAPI(absoluteWebUrl: string, selects: string[], restFilter: string, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
|
|
3
|
-
//# sourceMappingURL=fetchWebGroupInfoAPI.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchWebGroupInfoAPI.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/SpHttp/Groups/fetchWebGroupInfoAPI.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAK7F,wBAAsB,oBAAoB,CAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CA2CpM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchWebGroupInfoAPI.js","sourceRoot":"","sources":["../../../../../src/components/molecules/SpHttp/Groups/fetchWebGroupInfoAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAmB,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAE/F,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAE,cAAsB,EAAE,OAAiB,EAAE,UAAkB,EAAE,OAA4B,EAAE,UAA+B;IAEtK,MAAM,mBAAmB,GAAyB,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;IACpI,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,CAAC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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"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ISourceProps } from '../../source-props/ISourceProps';
|
|
2
|
-
import { IFpsItemsReturn } from '../../process-results/CheckItemsResults';
|
|
3
|
-
export declare function fetchSourceListsAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
|
|
4
|
-
//# sourceMappingURL=fetchSourceListsAPI.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchSourceListsAPI.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/SpHttp/Lists/fetchSourceListsAPI.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAqB,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAO7F,wBAAsB,mBAAmB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAoD/J"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchSourceListsAPI.js","sourceRoot":"","sources":["../../../../../src/components/molecules/SpHttp/Lists/fetchSourceListsAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,GAAG,MAAM,6BAA6B,CAAC;AAEvF,OAAO,EAAE,iBAAiB,EAAmB,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,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