@mikezimm/fps-core-v7 1.0.62 → 1.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/lib/components/molecules/SpHttp/Sp/doSpHttpFetch.d.ts.map +1 -1
  2. package/lib/components/molecules/SpHttp/Sp/doSpHttpFetch.js +10 -0
  3. package/lib/components/molecules/SpHttp/Sp/doSpHttpFetch.js.map +1 -1
  4. package/lib/components/molecules/SpHttp/SpFetchCommon.d.ts.map +1 -1
  5. package/lib/components/molecules/SpHttp/SpFetchCommon.js +6 -0
  6. package/lib/components/molecules/SpHttp/SpFetchCommon.js.map +1 -1
  7. package/lib/components/molecules/process-results/CheckWService/CheckItemsResults.d.ts.map +1 -1
  8. package/lib/components/molecules/process-results/CheckWService/CheckItemsResults.js +11 -0
  9. package/lib/components/molecules/process-results/CheckWService/CheckItemsResults.js.map +1 -1
  10. package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.js +14 -1
  11. package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.js.map +1 -1
  12. package/lib/components/molecules/source-props/createSources/Sites/createNavSource.d.ts +18 -0
  13. package/lib/components/molecules/source-props/createSources/Sites/createNavSource.d.ts.map +1 -0
  14. package/lib/components/molecules/source-props/createSources/Sites/createNavSource.js +50 -0
  15. package/lib/components/molecules/source-props/createSources/Sites/createNavSource.js.map +1 -0
  16. package/lib/logic/Errors/friendly.d.ts.map +1 -1
  17. package/lib/logic/Errors/friendly.js +6 -0
  18. package/lib/logic/Errors/friendly.js.map +1 -1
  19. package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts +2 -0
  20. package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts.map +1 -1
  21. package/lib/restAPIs/lists/items/getSourceItemsAPI.js +2 -0
  22. package/lib/restAPIs/lists/items/getSourceItemsAPI.js.map +1 -1
  23. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.d.ts +28 -0
  24. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.d.ts.map +1 -0
  25. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.js +48 -0
  26. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.js.map +1 -0
  27. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsites.d.ts +27 -0
  28. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsites.d.ts.map +1 -0
  29. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsites.js +94 -0
  30. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsites.js.map +1 -0
  31. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.d.ts +25 -0
  32. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.d.ts.map +1 -0
  33. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.js +79 -0
  34. package/lib/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.js.map +1 -0
  35. package/lib/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.d.ts +9 -0
  36. package/lib/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.d.ts.map +1 -0
  37. package/lib/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.js +41 -0
  38. package/lib/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.js.map +1 -0
  39. package/lib/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.d.ts +10 -0
  40. package/lib/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.d.ts.map +1 -0
  41. package/lib/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.js +48 -0
  42. package/lib/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.js.map +1 -0
  43. package/lib/restAPIs/sites/HubsSubs/functions/processHubSubResults.d.ts +23 -0
  44. package/lib/restAPIs/sites/HubsSubs/functions/processHubSubResults.d.ts.map +1 -0
  45. package/lib/restAPIs/sites/HubsSubs/functions/processHubSubResults.js +103 -0
  46. package/lib/restAPIs/sites/HubsSubs/functions/processHubSubResults.js.map +1 -0
  47. package/lib/restAPIs/sites/HubsSubs/getHubAssocSites.d.ts +33 -0
  48. package/lib/restAPIs/sites/HubsSubs/getHubAssocSites.d.ts.map +1 -0
  49. package/lib/restAPIs/sites/HubsSubs/getHubAssocSites.js +22 -0
  50. package/lib/restAPIs/sites/HubsSubs/getHubAssocSites.js.map +1 -0
  51. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.d.ts +20 -0
  52. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.d.ts.map +1 -0
  53. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.js +27 -0
  54. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.js.map +1 -0
  55. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.d.ts +24 -0
  56. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.d.ts.map +1 -0
  57. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.js +7 -0
  58. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.js.map +1 -0
  59. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.d.ts +19 -0
  60. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.d.ts.map +1 -0
  61. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.js +2 -0
  62. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.js.map +1 -0
  63. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsSearchCleanItem.d.ts +27 -0
  64. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsSearchCleanItem.d.ts.map +1 -0
  65. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsSearchCleanItem.js +2 -0
  66. package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsSearchCleanItem.js.map +1 -0
  67. package/lib/restAPIs/sites/nav/functions/findNavNodes.d.ts +24 -0
  68. package/lib/restAPIs/sites/nav/functions/findNavNodes.d.ts.map +1 -0
  69. package/lib/restAPIs/sites/nav/functions/findNavNodes.js +132 -0
  70. package/lib/restAPIs/sites/nav/functions/findNavNodes.js.map +1 -0
  71. package/lib/restAPIs/sites/nav/getHubSiteDataAPI.d.ts +2 -3
  72. package/lib/restAPIs/sites/nav/getHubSiteDataAPI.d.ts.map +1 -1
  73. package/lib/restAPIs/sites/nav/getHubSiteDataAPI.js +53 -3
  74. package/lib/restAPIs/sites/nav/getHubSiteDataAPI.js.map +1 -1
  75. package/lib/restAPIs/sites/nav/getOrAddWebNavAPI.d.ts +2 -3
  76. package/lib/restAPIs/sites/nav/getOrAddWebNavAPI.d.ts.map +1 -1
  77. package/lib/restAPIs/sites/nav/getOrAddWebNavAPI.js +1 -1
  78. package/lib/restAPIs/sites/nav/getOrAddWebNavAPI.js.map +1 -1
  79. package/lib/types/fps-returns/common/IFPSBaseContentType.d.ts +1 -1
  80. package/lib/types/fps-returns/common/IFPSBaseContentType.d.ts.map +1 -1
  81. package/lib/types/fps-returns/sites/nav/INavErrorObj.d.ts +5 -0
  82. package/lib/types/fps-returns/sites/nav/INavErrorObj.d.ts.map +1 -1
  83. package/lib/types/fps-returns/sites/nav/INavigationLink.d.ts +140 -0
  84. package/lib/types/fps-returns/sites/nav/INavigationLink.d.ts.map +1 -0
  85. package/lib/types/fps-returns/sites/nav/INavigationLink.js.map +1 -0
  86. package/package.json +1 -1
  87. package/lib/restAPIs/sites/nav/INavigationLink.d.ts +0 -30
  88. package/lib/restAPIs/sites/nav/INavigationLink.d.ts.map +0 -1
  89. package/lib/restAPIs/sites/nav/INavigationLink.js.map +0 -1
  90. /package/lib/{restAPIs → types/fps-returns}/sites/nav/INavigationLink.js +0 -0
@@ -0,0 +1,25 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 5 imports on 2024-09-22 14:49:52
3
+ * Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
4
+ * Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
5
+ * Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
6
+ * Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
7
+ * Update:: import { checkItemsResults } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
8
+
9
+ */
10
+ import { IJSFetchReturn } from '../../../../components/molecules/SpHttp/IJSFetchReturn';
11
+ import { IFpsSpHttpServiceMIN } from '../../../../components/molecules/SpHttp/Sp/IFpsSpHttpServiceMIN';
12
+ /**
13
+ * This will fetch Subsites and their site logos, be sure to run EasyIcons after
14
+ * It does two fetches at the same time syncronosly.... needed due to SPO rest limiations.
15
+ * - apiSearchWebs api uses Search to find all subsites of the parent Url in order to get the actual SiteLogs
16
+ * - apiFilteredWebs api gets the actual current subsites the user has access to FOR THE CURRENT WEB.
17
+ * - Technically you could just use Search but that requires a crawl which may result in returning items that have been changed or deleted.
18
+ * Used in Pivot Tiles and Hub Connections.
19
+ *
20
+ * @param webUrl
21
+ * @param departmentId
22
+ * @returns
23
+ */
24
+ export declare function fetchMySubsites(fpsSpService: IFpsSpHttpServiceMIN, webUrl: string): Promise<IJSFetchReturn>;
25
+ //# sourceMappingURL=fetchMySubsites.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchMySubsites.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkBH,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAOxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iEAAiE,CAAC;AAGvG;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,GAAK,OAAO,CAAC,cAAc,CAAC,CAgDpH"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 5 imports on 2024-09-22 14:49:52
3
+ * Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
4
+ * Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
5
+ * Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
6
+ * Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
7
+ * Update:: import { checkItemsResults } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
8
+
9
+ */
10
+ /**
11
+ * CodeAnalizerComment: Updated 8 imports on 2024-09-21 23:07:24
12
+ * Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
13
+ * Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
14
+ * Update:: import { IPerformanceSettings } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/IPerformanceSettings;'
15
+ * Update:: import { startPerformOpV2 } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions;'
16
+ * Update:: import { unifiedPerformanceEnd } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions;'
17
+ * Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
18
+ * Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
19
+ * Update:: import { checkItemsResults } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
20
+
21
+ */
22
+ import { cleanSearchedWebs } from '../functions/cleanSearchedWebs';
23
+ import { doSpHttpFetchOrPostAndCheck } from '../../../../components/molecules/SpHttp/Sp/doSpHttpFetch';
24
+ import { hubSelects } from '../interfaces/IFPSHubSiteDataDocsApi';
25
+ import { startPerformOpV2, unifiedPerformanceEnd } from '../../../../components/molecules/Performance/functions';
26
+ import { checkItemsResults } from '../../../../components/molecules/process-results/CheckWService/CheckItemsResults';
27
+ /**
28
+ * This will fetch Subsites and their site logos, be sure to run EasyIcons after
29
+ * It does two fetches at the same time syncronosly.... needed due to SPO rest limiations.
30
+ * - apiSearchWebs api uses Search to find all subsites of the parent Url in order to get the actual SiteLogs
31
+ * - apiFilteredWebs api gets the actual current subsites the user has access to FOR THE CURRENT WEB.
32
+ * - Technically you could just use Search but that requires a crawl which may result in returning items that have been changed or deleted.
33
+ * Used in Pivot Tiles and Hub Connections.
34
+ *
35
+ * @param webUrl
36
+ * @param departmentId
37
+ * @returns
38
+ */
39
+ export async function fetchMySubsites(fpsSpService, webUrl) {
40
+ let performanceSettings = { label: 'mySubs', updateMiliseconds: true, includeMsStr: true, op: 'fetch' };
41
+ const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
42
+ // const apiSearchWebs: string = `${webUrl}/_api/search/query?querytext='DepartmentId=${departmentId} ParentLink=${webUrl} contentclass:STS_Web'&selectproperties='${hubSelects.join(',')}'&rowlimit=50`;// 9 Works
43
+ const apiSearchWebs = `${webUrl}/_api/search/query?querytext='ParentLink=${webUrl} contentclass:STS_Web'&selectproperties='${hubSelects.join(',')}'&rowlimit=200`; // 9 Works
44
+ const apiFilteredWebs = `${webUrl}/_api/web/getsubwebsfilteredforcurrentuser(nwebtemplatefilter=-1,nconfigurationfilter=0)`; // 12 Works! Finally from chatGPT
45
+ // this api only works for SiteAdmins on the site you are trying to fetch from
46
+ // const apiFilteredWebsOnlyWorksForSCAs: string = `${webUrl}//_api/web/webs?$select=Title`; // 12 Works! Finally from chatGPT
47
+ let [searchedWebs, filteredWebs,] = await Promise.all([
48
+ doSpHttpFetchOrPostAndCheck(apiSearchWebs, 'GET', fpsSpService, '', false, true, 'web', null),
49
+ doSpHttpFetchOrPostAndCheck(apiFilteredWebs, 'GET', fpsSpService, '', false, true, 'web', null),
50
+ ]);
51
+ if (searchedWebs.ok)
52
+ searchedWebs.items = cleanSearchedWebs(searchedWebs.items);
53
+ const resultWebs = [];
54
+ // Search through the fetched webs and try to find SiteLogos from Search
55
+ if (filteredWebs.items)
56
+ filteredWebs.items.map(filteredWeb => {
57
+ const matchedWeb = searchedWebs.items ? searchedWebs.items.filter(cleanedWeb => { return cleanedWeb.ServerRelativeUrl === filteredWeb.ServerRelativeUrl; }) : [];
58
+ if (matchedWeb.length) {
59
+ // Added to support: https://github.com/mikezimm/pivottiles7/issues/289
60
+ const LastItemUserModifiedDate = filteredWeb.LastItemUserModifiedDate ? `${filteredWeb.LastItemUserModifiedDate}` : undefined;
61
+ filteredWeb = { ...filteredWeb, ...matchedWeb[0] };
62
+ filteredWeb.LastItemUserModifiedDate = LastItemUserModifiedDate; // Add this back after merging because matchedWeb does not have it.
63
+ }
64
+ resultWebs.push(filteredWeb);
65
+ });
66
+ searchedWebs.items = resultWebs;
67
+ // Go back and update searchWebs status if filteredWebs is not ok
68
+ if (filteredWebs.ok !== true)
69
+ searchedWebs.ok = filteredWebs.ok;
70
+ if (filteredWebs.ok !== true)
71
+ searchedWebs.status = filteredWebs.status;
72
+ if (filteredWebs.ok !== true)
73
+ searchedWebs.statusText = filteredWebs.statusText;
74
+ let result = unifiedPerformanceEnd(searchedWebs, performanceSettings, fetchOp, 'fetch', 'items');
75
+ result = checkItemsResults(fpsSpService, result, `fps-library-v2: fetchMySubsites ~ 62`, false, true);
76
+ result.fpsContentType = ['web'];
77
+ return result;
78
+ }
79
+ //# sourceMappingURL=fetchMySubsites.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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E,IAAK,YAAY,CAAC,EAAE,KAAK,IAAI;QAAG,YAAY,CAAC,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC;IAElF,IAAI,MAAM,GAAoB,qBAAqB,CAAE,YAA+B,EAAE,mBAAmB,EAAE,OAAyB,EAAE,OAAO,EAAE,OAAO,CAAqB,CAAC;IAE5K,MAAM,GAAG,iBAAiB,CAAE,YAAY,EAAE,MAAyB,EAAE,sCAAsC,EAAE,KAAK,EAAE,IAAI,CAAoB,CAAC;IAC7I,MAAM,CAAC,cAAc,GAAG,CAAE,KAAK,CAAE,CAAC;IAElC,OAAO,MAAM,CAAC;AAEhB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { IFPSWebsWithLogo } from '../interfaces/IFPSHubSiteDataDocsApi';
2
+ /**
3
+ * cleanSearchedWebs will go through results from the Search API for Hubs and Subs and clean up the results.
4
+ * - it also adds some duplicate properties that are already used in other web parts like Pivot Tiles and Hub Connections.
5
+ * @param searchedWebs
6
+ * @returns
7
+ */
8
+ export declare function cleanSearchedWebs(searchedWebs: any[]): IFPSWebsWithLogo[];
9
+ //# sourceMappingURL=cleanSearchedWebs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cleanSearchedWebs.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAc,MAAM,sCAAsC,CAAC;AAGpF;;;;;GAKG;AAGH,wBAAgB,iBAAiB,CAAE,YAAY,EAAE,GAAG,EAAE,GAAI,gBAAgB,EAAE,CAkC3E"}
@@ -0,0 +1,41 @@
1
+ import { CurrentOrigin } from '../../../../components/molecules/source-props/WindowLocationConstants';
2
+ import { hubSelects } from '../interfaces/IFPSHubSiteDataDocsApi';
3
+ // import { check4This } from '@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch';
4
+ /**
5
+ * cleanSearchedWebs will go through results from the Search API for Hubs and Subs and clean up the results.
6
+ * - it also adds some duplicate properties that are already used in other web parts like Pivot Tiles and Hub Connections.
7
+ * @param searchedWebs
8
+ * @returns
9
+ */
10
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
+ export function cleanSearchedWebs(searchedWebs) {
12
+ // get Cleaned Search
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ const cleanWebs = [];
15
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
+ searchedWebs.map((item) => {
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
+ const thisItem = {};
19
+ hubSelects.map((prop, idx2) => {
20
+ if (item.Cells[idx2])
21
+ thisItem[prop] = item.Cells[idx2].Value;
22
+ });
23
+ // commonize some props for easier compatibility with other web parts
24
+ if (!thisItem.imageUrl)
25
+ thisItem.imageUrl = thisItem.SiteLogo ? thisItem.SiteLogo : thisItem.PictureThumbnailURL;
26
+ if (!thisItem.title)
27
+ thisItem.title = thisItem.Title;
28
+ // Added this beause includes ServerRelativeUrl but not Path but searchedWebs include Path and not ServerRelativeUrl
29
+ if (!thisItem.ServerRelativeUrl)
30
+ thisItem.ServerRelativeUrl = thisItem.Path ? thisItem.Path.replace(CurrentOrigin, '') : '';
31
+ if (!thisItem.href)
32
+ thisItem.href = thisItem.ServerRelativeUrl ? thisItem.ServerRelativeUrl : thisItem.Path;
33
+ if (!thisItem.description)
34
+ thisItem.description = thisItem.Description;
35
+ if (!thisItem.sourceType)
36
+ thisItem.sourceType = thisItem.sourceType = `sites`;
37
+ cleanWebs.push(thisItem);
38
+ });
39
+ return cleanWebs;
40
+ }
41
+ //# sourceMappingURL=cleanSearchedWebs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cleanSearchedWebs.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uEAAuE,CAAC;AACtG,OAAO,EAAoB,UAAU,EAAE,MAAM,s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C,WAAW;YAAG,QAAQ,CAAC,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;QACzE,IAAK,CAAC,QAAQ,CAAC,UAAU;YAAG,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,GAAG,OAAO,CAAC;QAEhF,SAAS,CAAC,IAAI,CAAE,QAAQ,CAAE,CAAC;IAE7B,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AAEnB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 2 imports on 2024-09-21 23:07:24
3
+ * Update:: import { CurrentTenant } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/IMinSourceFetchProps;'
4
+ * Update:: import { ISourceProps } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps;'
5
+
6
+ */
7
+ import { ISourceProps } from "../../../../components/molecules/source-props/ISourceProps";
8
+ export declare const HubSubSourceProps: ISourceProps;
9
+ export declare const WebSourceProps: ISourceProps;
10
+ //# sourceMappingURL=createHubSubSourceProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createHubSubSourceProps.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,4DAA4D,CAAC;AAK1F,eAAO,MAAM,iBAAiB,EAAE,YAuC/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,YAAsG,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 2 imports on 2024-09-21 23:07:24
3
+ * Update:: import { CurrentTenant } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/IMinSourceFetchProps;'
4
+ * Update:: import { ISourceProps } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps;'
5
+
6
+ */
7
+ import { CurrentTenant } from "../../../../components/molecules/source-props/WindowLocationConstants";
8
+ import { hubSelects } from "../interfaces/IFPSHubSiteDataDocsApi";
9
+ import { makeid } from "../../../../logic/Strings/guids";
10
+ export const HubSubSourceProps = {
11
+ fpsSpService: null,
12
+ key: 'sites',
13
+ refreshId: makeid(5),
14
+ defType: 'sites',
15
+ fpsContentType: ['site',],
16
+ tenant: CurrentTenant,
17
+ webUrl: ``,
18
+ listTitle: '',
19
+ webRelativeLink: '',
20
+ searchSource: '',
21
+ searchSourceDesc: '',
22
+ // editProps: [ 'Title' , 'Description', 'SiteLogoUrl', 'ServerRelativeUrl' ],
23
+ viewProps: hubSelects,
24
+ columns: hubSelects,
25
+ searchProps: hubSelects,
26
+ selectThese: hubSelects,
27
+ // itemFetchCol: ExtraFetchModernPage,
28
+ // isModern: true,
29
+ // restFilter - see src\components\molecules\SpHttp\HubsSubs\fetches\fetchMyHubsites.ts
30
+ // restFilter: "Id ne 'X' and ContentTypeId ne '0x012000F6C75276DBE501468CA3CC575AD8E159' and Title ne 'Home'",
31
+ // restFilter: "Id ne 'X' and ContentTypeId ne '0x012000F6C75276DBE501468CA3CC575AD8E159'",
32
+ // evalFilter: ``,
33
+ defSearchButtons: ['*', '-',],
34
+ fetchCount: 200,
35
+ orderBy: {
36
+ prop: 'Title',
37
+ order: 'asc',
38
+ asc: true,
39
+ },
40
+ meta0: [],
41
+ meta1: [],
42
+ meta2: [],
43
+ meta3: [],
44
+ metaX: [],
45
+ performanceSettings: { label: 'HubSub', updateMiliseconds: true, includeMsStr: true, op: 'fetch' },
46
+ };
47
+ export const WebSourceProps = { ...HubSubSourceProps, ...{ key: 'webs', defType: 'webs', fpsContentType: ['web'], } };
48
+ //# sourceMappingURL=createHubSubSourceProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createHubSubSourceProps.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uE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AI,EAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 3 imports on 2024-09-22 14:49:52
3
+ * Update:: import { addPopularityToItems } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/markPopular;'
4
+ * Update:: import { addSearchMeta1 } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/addSearchMeta1;'
5
+ * Update:: import { addItemIsA } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/addItemIsA;'
6
+
7
+ */
8
+ import { ISourceProps } from '../../../../components/molecules/source-props/ISourceProps';
9
+ import { ISourceSearch } from '../../../../components/molecules/SearchPage/Interfaces/ISourceSearch';
10
+ import { IStateSourceHubSubs } from '../getHubAssocSites';
11
+ import { IItemIsAKeys } from '../../../../components/molecules/AnyContent/IsA/IFPSItemIsA';
12
+ export declare const NonGroupGroupID: string;
13
+ /**
14
+ * processHubSubResults adds addSearchMeta1, Popularity and IsA keys to sub, hubs
15
+ * @param results
16
+ * @param sourceProps - used in addSearchMeta1
17
+ * @param search - used in addSearchMeta1
18
+ * @param departmentId
19
+ * @param siteIsAKeys
20
+ * @returns
21
+ */
22
+ export declare function processHubSubResults(results: IStateSourceHubSubs, sourceProps: ISourceProps, search: ISourceSearch, departmentId: string, siteIsAKeys?: IItemIsAKeys[]): IStateSourceHubSubs;
23
+ //# sourceMappingURL=processHubSubResults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processHubSubResults.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/processHubSubResults.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqBH,OAAO,EAAE,YAAY,EAAE,MAAM,4DAA4D,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,sEAAsE,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAgE,MAAM,6DAA6D,CAAC;AAIzJ,eAAO,MAAM,eAAe,EAAE,MAA+C,CAAC;AAE9E;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,GAAE,YAAY,EAAO,GAAI,mBAAmB,CAqElM"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 3 imports on 2024-09-22 14:49:52
3
+ * Update:: import { addPopularityToItems } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/markPopular;'
4
+ * Update:: import { addSearchMeta1 } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/addSearchMeta1;'
5
+ * Update:: import { addItemIsA } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/addItemIsA;'
6
+
7
+ */
8
+ /**
9
+ * CodeAnalizerComment: Updated 12 imports on 2024-09-21 23:07:24
10
+ * Update:: import { check4This } to '@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch;'
11
+ * Update:: import { addPopularityToItems } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/markPopular;'
12
+ * Update:: import { ISourceProps } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps;'
13
+ * Update:: import { ISourceSearch } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/Interfaces/ISourceSearch;'
14
+ * Update:: import { addSearchMeta1 } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/addSearchMeta1;'
15
+ * Update:: import { filterObjArrayByUniqueKey } to '@mikezimm/fps-core-v7/lib/logic/Arrays/searching/filterObjArrayByUniqueKey;'
16
+ * Update:: import { addItemIsA } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/addItemIsA;'
17
+ * Update:: import { IItemIsAKeys } to '@mikezimm/fps-core-v7/lib/components/molecules/AnyContent/IsA/IFPSItemIsA;'
18
+ * Update:: import { ItemHasMinimalDownload } to '@mikezimm/fps-core-v7/lib/components/molecules/AnyContent/IsA/IFPSItemIsA;'
19
+ * Update:: import { ItemIsASite } to '@mikezimm/fps-core-v7/lib/components/molecules/AnyContent/IsA/IFPSItemIsA;'
20
+ * Update:: import { ItemIsATeam } to '@mikezimm/fps-core-v7/lib/components/molecules/AnyContent/IsA/IFPSItemIsA;'
21
+ * Update:: import { ItemIsAWeb } to '@mikezimm/fps-core-v7/lib/components/molecules/AnyContent/IsA/IFPSItemIsA;'
22
+
23
+ */
24
+ import { check4This } from '../../../../logic/Links/CheckSearch';
25
+ import { addPopularityToItems } from '../../../../components/molecules/SearchPage/functions/markPopular';
26
+ import { addSearchMeta1 } from '../../../../components/molecules/SearchPage/functions/addSearchMeta1';
27
+ import { filterObjArrayByUniqueKey } from '../../../../logic/Arrays/searching/filterObjArrayByUniqueKey';
28
+ import { addItemIsA } from '../../../../components/molecules/SearchPage/functions/addItemIsA';
29
+ import { ItemHasMinimalDownload, ItemIsASite, ItemIsATeam, ItemIsAWeb } from '../../../../components/molecules/AnyContent/IsA/IFPSItemIsA';
30
+ // import { createErrorFPSTileItem } from '../../../FPSTiles/functions/ErrorMessages';
31
+ export const NonGroupGroupID = `00000000-0000-0000-0000-000000000000`;
32
+ /**
33
+ * processHubSubResults adds addSearchMeta1, Popularity and IsA keys to sub, hubs
34
+ * @param results
35
+ * @param sourceProps - used in addSearchMeta1
36
+ * @param search - used in addSearchMeta1
37
+ * @param departmentId
38
+ * @param siteIsAKeys
39
+ * @returns
40
+ */
41
+ export function processHubSubResults(results, sourceProps, search, departmentId, siteIsAKeys = []) {
42
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
+ // let finalItems: any[] = results.items as any[];
44
+ if (results.status !== 'Success') {
45
+ results.itemsY = results.items;
46
+ // finalItems.push( createErrorTile(props.fetchInfo.hubs.hubsCategory, 'HubSiteFunctions: DID NOT FIND ANY ASSOCIATED SITES!', results.errorInfo.friendly, props ));
47
+ }
48
+ else {
49
+ results.itemsY = filterObjArrayByUniqueKey(results.items, 'ServerRelativeUrl');
50
+ results.itemsY = addSearchMeta1(results.itemsY, sourceProps, search);
51
+ results.itemsY = addPopularityToItems(results.itemsY, 0.2);
52
+ const doIsASite = siteIsAKeys.indexOf('STSSite') > -1 ? true : false;
53
+ const doIsAWeb = siteIsAKeys.indexOf('STSWeb') > -1 ? true : false;
54
+ const doIsAGroup = siteIsAKeys.indexOf('MSTeam') > -1 ? true : false;
55
+ results.itemsY = results.itemsY.map(item => {
56
+ // Add Group/Teams icon https://github.com/fps-solutions/HubCon/issues/13
57
+ const url = item.ServerRelativeUrl;
58
+ const IsASite = url && url.replace('/sites/', '').indexOf('/') > 0 ? false : true;
59
+ if (doIsASite === true && IsASite === true)
60
+ item = addItemIsA(item, ItemIsASite);
61
+ // Opting to NOT id IsASite or IsAWeb because in most cases, this may be obvious.
62
+ if (doIsAWeb === true && IsASite === false)
63
+ item = addItemIsA(item, ItemIsAWeb);
64
+ // Added from PivotTiles processWebsResults
65
+ if (item.EnableMinimalDownload === true) {
66
+ item = addItemIsA(item, ItemHasMinimalDownload);
67
+ }
68
+ // Adds only for Top Level Sites, Not Subs and if it is a group
69
+ if (doIsAGroup === true && IsASite === true && item[`GroupId`] && item[`GroupId`] !== NonGroupGroupID)
70
+ item = addItemIsA(item, ItemIsATeam);
71
+ return item;
72
+ });
73
+ /**
74
+ * 2024-12-31: Had this line before but was giving warning: "'a.Title' is possibly 'undefined'.ts(18048)" in this line?
75
+ * results.itemsY.sort((a, b) => a.Title.localeCompare(b.Title));
76
+ */
77
+ results.itemsY.sort((a, b) => a.Title.localeCompare(b.Title));
78
+ // Move current hub to top of the list: https://github.com/fps-solutions/HubCon/issues/9
79
+ if (departmentId) {
80
+ const originalSites = results.itemsY;
81
+ const CurrentHubSite = [];
82
+ const AssocHubSites = [];
83
+ originalSites.map(item => {
84
+ // Must add the { } because it comes with it in the object
85
+ if (item[`SiteId`] === `${departmentId}`) {
86
+ CurrentHubSite.push(item);
87
+ }
88
+ else {
89
+ AssocHubSites.push(item);
90
+ }
91
+ });
92
+ results.itemsY = [...CurrentHubSite, ...AssocHubSites];
93
+ }
94
+ // results.itemsY = addSearchMeta1(results.items, sourceProps, search);
95
+ // results.itemsY = addPopularityToItems(results.items, 0.2);
96
+ // results.itemsY.sort((a, b) => a.Title.localeCompare(b.Title));
97
+ }
98
+ if (check4This('fpsShowFetchResults=true') === true) {
99
+ console.log(`processHubResults: ~ 54`, results);
100
+ }
101
+ return results;
102
+ }
103
+ //# sourceMappingURL=processHubSubResults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processHubSubResults.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/processHubSubResults.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mEAAmE,CAAC;AAGzG,OAAO,EAAE,cAAc,EAAE,MAAM,sEAAsE,CAAC;AAEtG,OAAO,EAAE,yBAAyB,EAAE,MAAM,8DAA8D,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,kEAAkE,CAAC;AAC9F,OAAO,EAAgB,sBAAsB,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAC;AAEzJ,sFAAsF;AAEtF,MAAM,CAAC,MAAM,eAAe,GAAW,sCAAsC,CAAC;AAE9E;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAE,OAA4B,EAAE,WAAyB,EAAE,MAAqB,EAAE,YAAoB,EAAE,cAA8B,EAAE;IAC1K,8DAA8D;IAC9D,kDAAkD;IAElD,IAAK,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE;QACjC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAE/B,oKAAoK;KACrK;SAAM;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CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;KAAE;IACzG,OAAO,OAAO,CAAC;AAEjB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 2 imports on 2024-09-22 14:49:52
3
+ * Update:: import { IStateSource } to '@mikezimm/fps-core-v7/lib/components/molecules/state-source/IStateSource;'
4
+ * Update:: import { IAnySourceItem } to '@mikezimm/fps-core-v7/lib/components/molecules/AnyContent/IAnyContent;'
5
+
6
+ */
7
+ /**
8
+ * CodeAnalizerComment: Updated 3 imports on 2024-09-21 23:07:24
9
+ * Update:: import { IStateSource } to '@mikezimm/fps-core-v7/lib/components/molecules/state-source/IStateSource;'
10
+ * Update:: import { IAnySourceItem } to '@mikezimm/fps-core-v7/lib/components/molecules/AnyContent/IAnyContent;'
11
+ * Update:: import { ISourceProps } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps;'
12
+
13
+ */
14
+ import { IStateSource } from '../../../components/molecules/state-source/IStateSource';
15
+ import { IAnySourceItem } from '../../../components/molecules/AnyContent/IAnyContent';
16
+ import { IFetchHubDepth } from './fetches/fetchMyHubsites';
17
+ import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
18
+ /**
19
+ * This just makes itemsY required since it is the return value (for initial build)
20
+ */
21
+ export interface IStateSourceHubSubs extends IStateSource {
22
+ itemsY: IAnySourceItem[];
23
+ allHubs?: IAnySourceItem[];
24
+ }
25
+ /**
26
+ * This MAY NOT BE NEEDED. but IStateSourceHubSubs should be moved to fetchMyHubsites?
27
+ * @param departmentId
28
+ * @param sourceProps
29
+ * @param depth: IFetchHubDepth 'site' or 'web'
30
+ * @returns
31
+ */
32
+ export declare function getHubAssocSites(departmentId: string, sourceProps: ISourceProps, depth?: IFetchHubDepth): Promise<IStateSource>;
33
+ //# sourceMappingURL=getHubAssocSites.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getHubAssocSites.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/sites/HubsSubs/getHubAssocSites.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;GAMG;AAcH,OAAO,EAAE,YAAY,EAAE,MAAM,yDAAyD,CAAC;AACvF,OAAO,EAAE,cAAc,EAAG,MAAM,sDAAsD,CAAC;AACvF,OAAO,EAAE,cAAc,EAAmB,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,yDAAyD,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,GAAE,cAAuB,GAAI,OAAO,CAAC,YAAY,CAAC,CAW/I"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 2 imports on 2024-09-22 14:49:52
3
+ * Update:: import { IStateSource } to '@mikezimm/fps-core-v7/lib/components/molecules/state-source/IStateSource;'
4
+ * Update:: import { IAnySourceItem } to '@mikezimm/fps-core-v7/lib/components/molecules/AnyContent/IAnyContent;'
5
+
6
+ */
7
+ import { fetchMyHubsites } from './fetches/fetchMyHubsites';
8
+ /**
9
+ * This MAY NOT BE NEEDED. but IStateSourceHubSubs should be moved to fetchMyHubsites?
10
+ * @param departmentId
11
+ * @param sourceProps
12
+ * @param depth: IFetchHubDepth 'site' or 'web'
13
+ * @returns
14
+ */
15
+ export async function getHubAssocSites(departmentId, sourceProps, depth = 'site') {
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ let results = await fetchMyHubsites(sourceProps.fpsSpService, sourceProps.absoluteWebUrl, depth, departmentId, 'HubAndAssoc');
18
+ return results;
19
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
+ // return { ...EmptyStateSource as any, ...{ status: 'Unknown' } }
21
+ }
22
+ //# sourceMappingURL=getHubAssocSites.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getHubAssocSites.js","sourceRoot":"","sources":["../../../../src/restAPIs/sites/HubsSubs/getHubAssocSites.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwBH,OAAO,EAAkB,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAW5E;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAE,YAAoB,EAAE,WAAyB,EAAE,QAAwB,MAAM;IAErH,8DAA8D;IAC9D,IAAI,OAAO,GAAwB,MAAM,eAAe,CAAE,WAAW,CAAC,YAAY,EAAE,WAAW,CAAC,cAAwB,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,CAAS,CAAC;IAEtK,OAAO,OAAO,CAAC;IAEf,8DAA8D;IAC9D,kEAAkE;AAGpE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { IFPSSubsFilteredItem } from "./IFPSSubsFilteredItem";
2
+ import { IFPSSubsSearchCleanItem } from "./IFPSSubsSearchCleanItem";
3
+ /**
4
+ * hubSelects are common select paramters used when using search api on Subsites and a hub's Associated sites
5
+ */
6
+ export declare const hubSelects: string[];
7
+ export interface IFPSWebsWithLogo extends IFPSSubsFilteredItem, IFPSSubsSearchCleanItem {
8
+ }
9
+ /**
10
+ * Generated from
11
+ * https://learn.microsoft.com/en-us/sharepoint/dev/features/hub-site/rest-hubsitedata-method
12
+ * https://contoso.sharepoint.com/sites/marketing/_api/web/HubSiteData(true)
13
+ */
14
+ /**
15
+ * 2024-12-31: DEPRECATED... use
16
+ *
17
+ * import { IHubSiteDataAPIReturn } from '@mikezimm/fps-core-v7/lib/types/fps-returns/sites/nav/INavigationLink';
18
+ *
19
+ */
20
+ //# sourceMappingURL=IFPSHubSiteDataDocsApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IFPSHubSiteDataDocsApi.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,UAAU,UAG4B,CAAC;AAEpD,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB,EAAE,uBAAuB;CAAI;AAE3F;;;;GAIG;AAEH;;;;;GAKG"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * hubSelects are common select paramters used when using search api on Subsites and a hub's Associated sites
3
+ */
4
+ export const hubSelects = ['GroupId', 'Title', 'SiteId', 'WebId', 'DepartmentId', 'Path', 'Description',
5
+ 'PictureThumbnailURL', 'SiteLogoUrl', 'SiteLogo', 'WebTemplate',
6
+ 'ViewLastMonths3', 'ViewsLifeTime', 'ViewsRecent', 'contentclass', 'ParentLink',
7
+ 'Created', 'Modified', 'LastItemUserModifiedDate'];
8
+ /**
9
+ * Generated from
10
+ * https://learn.microsoft.com/en-us/sharepoint/dev/features/hub-site/rest-hubsitedata-method
11
+ * https://contoso.sharepoint.com/sites/marketing/_api/web/HubSiteData(true)
12
+ */
13
+ /**
14
+ * 2024-12-31: DEPRECATED... use
15
+ *
16
+ * import { IHubSiteDataAPIReturn } from '@mikezimm/fps-core-v7/lib/types/fps-returns/sites/nav/INavigationLink';
17
+ *
18
+ */
19
+ // export interface IFPSHubSiteDataDocsApiD {
20
+ // themeKey: string | null;
21
+ // name: string;
22
+ // url: string;
23
+ // logoUrl: string;
24
+ // usesMetadataNavigation: boolean;
25
+ // navigation: IFPSHubNavigationItem[];
26
+ // }
27
+ //# sourceMappingURL=IFPSHubSiteDataDocsApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IFPSHubSiteDataDocsApi.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa;IACxG,qBAAqB,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa;IAC/D,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY;IAC/E,SAAS,EAAE,UAAU,EAAE,0BAA0B,CAAE,CAAC;AAIpD;;;;GAIG;AAEH;;;;;GAKG;AACH,6CAA6C;AAC7C,6BAA6B;AAC7B,kBAAkB;AAClB,iBAAiB;AACjB,qBAAqB;AACrB,qCAAqC;AACrC,yCAAyC;AACzC,IAAI"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * This is the return interface for the value array when fetching this api
3
+ * https://learn.microsoft.com/en-us/sharepoint/dev/features/hub-site/rest-hubsites-method
4
+ * https://contoso.sharepoint.com/_api/HubSites
5
+ */
6
+ export interface IFPSHubSitesApi {
7
+ "@odata.context": string;
8
+ value: IFPSHubSiteApi[];
9
+ }
10
+ export interface IFPSHubSiteApi {
11
+ "@odata.type": string;
12
+ "@odata.id": string;
13
+ "@odata.etag": string;
14
+ "@odata.editLink": string;
15
+ Description: string | undefined;
16
+ ID: string;
17
+ LogoUrl: string;
18
+ SiteId: string;
19
+ SiteUrl: string;
20
+ Targets: any[] | undefined;
21
+ TenantInstanceId: string;
22
+ Title: string;
23
+ }
24
+ //# sourceMappingURL=IFPSHubSitesApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IFPSHubSitesApi.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,eAAe;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This is the return interface for the value array when fetching this api
3
+ * https://learn.microsoft.com/en-us/sharepoint/dev/features/hub-site/rest-hubsites-method
4
+ * https://contoso.sharepoint.com/_api/HubSites
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=IFPSHubSitesApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IFPSHubSitesApi.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * IFPSSubsFilteredItem is used in IFPSWebsWithLogo which is in turn used by fetchMySubsites
3
+ * const apiSearchWebs: string = `${webUrl}/_api/search/query?querytext='ParentLink=${webUrl} contentclass:STS_Web'&selectproperties='${hubSelects.join(',')}'&rowlimit=50`;// 9 Works
4
+ const apiFilteredWebs: string = `${webUrl}/_api/web/getsubwebsfilteredforcurrentuser(nwebtemplatefilter=-1,nconfigurationfilter=0)`; // 12 Works! Finally from chatGPT
5
+ */
6
+ export interface IFPSSubsFilteredItem {
7
+ Configuration: number;
8
+ Created: string;
9
+ Description: string;
10
+ Id: string;
11
+ Language: number;
12
+ LastItemModifiedDate: string;
13
+ LastItemUserModifiedDate: string;
14
+ ServerRelativeUrl: string;
15
+ Title: string;
16
+ WebTemplate: string;
17
+ WebTemplateId: number;
18
+ }
19
+ //# sourceMappingURL=IFPSSubsFilteredItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IFPSSubsFilteredItem.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,wBAAwB,EAAE,MAAM,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IFPSSubsFilteredItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IFPSSubsFilteredItem.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.ts"],"names":[],"mappings":""}