@mikezimm/fps-core-v7 1.0.45 → 1.0.47

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 (132) hide show
  1. package/lib/banner/components/ItemPicker/functions/fetchFileList.d.ts.map +1 -1
  2. package/lib/banner/components/ItemPicker/functions/fetchFileList.js.map +1 -1
  3. package/lib/banner/components/ItemPicker/functions/fetchListList.d.ts.map +1 -1
  4. package/lib/banner/components/ItemPicker/functions/fetchListList.js.map +1 -1
  5. package/lib/components/atoms/easy-pages/interfaces/IEasyPagesPageHookProps.d.ts +1 -1
  6. package/lib/components/atoms/easy-pages/interfaces/IEasyPagesPageHookProps.d.ts.map +1 -1
  7. package/lib/components/molecules/AnyContent/IFPSFileObject.d.ts +10 -0
  8. package/lib/components/molecules/AnyContent/IFPSFileObject.d.ts.map +1 -1
  9. package/lib/components/molecules/AnyContent/IFPSFileObject.js +10 -0
  10. package/lib/components/molecules/AnyContent/IFPSFileObject.js.map +1 -1
  11. package/lib/components/molecules/SpHttp/IJSFetchReturn.d.ts +2 -1
  12. package/lib/components/molecules/SpHttp/IJSFetchReturn.d.ts.map +1 -1
  13. package/lib/components/molecules/SpHttp/IJSFetchReturn.js.map +1 -1
  14. package/lib/components/molecules/SpHttp/SpFetchCommon.d.ts.map +1 -1
  15. package/lib/components/molecules/SpHttp/SpFetchCommon.js +19 -2
  16. package/lib/components/molecules/SpHttp/SpFetchCommon.js.map +1 -1
  17. package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.d.ts.map +1 -1
  18. package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js +5 -1
  19. package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js.map +1 -1
  20. package/lib/components/molecules/SpHttp/doSpJsFetch copy.d.ts +1 -0
  21. package/lib/components/molecules/SpHttp/doSpJsFetch copy.d.ts.map +1 -0
  22. package/lib/components/molecules/SpHttp/doSpJsFetch copy.js +163 -0
  23. package/lib/components/molecules/SpHttp/doSpJsFetch copy.js.map +1 -0
  24. package/lib/components/molecules/SpHttp/doSpJsFetch.d.ts +36 -17
  25. package/lib/components/molecules/SpHttp/doSpJsFetch.d.ts.map +1 -1
  26. package/lib/components/molecules/SpHttp/doSpJsFetch.js +235 -58
  27. package/lib/components/molecules/SpHttp/doSpJsFetch.js.map +1 -1
  28. package/lib/components/molecules/SpHttp/doSpJsFileFetch.d.ts +3 -1
  29. package/lib/components/molecules/SpHttp/doSpJsFileFetch.d.ts.map +1 -1
  30. package/lib/components/molecules/SpHttp/doSpJsFileFetch.js +7 -8
  31. package/lib/components/molecules/SpHttp/doSpJsFileFetch.js.map +1 -1
  32. package/lib/components/molecules/SpHttp/headerInitUtilities.d.ts +21 -0
  33. package/lib/components/molecules/SpHttp/headerInitUtilities.d.ts.map +1 -0
  34. package/lib/components/molecules/SpHttp/headerInitUtilities.js +45 -0
  35. package/lib/components/molecules/SpHttp/headerInitUtilities.js.map +1 -0
  36. package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.d.ts.map +1 -1
  37. package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.js +8 -4
  38. package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.js.map +1 -1
  39. package/lib/components/molecules/process-results/CheckAnyResults.js +1 -1
  40. package/lib/components/molecules/process-results/CheckAnyResults.js.map +1 -1
  41. package/lib/components/molecules/process-results/CheckFpsTypesResults.d.ts +1 -0
  42. package/lib/components/molecules/process-results/CheckFpsTypesResults.d.ts.map +1 -0
  43. package/lib/components/molecules/process-results/CheckFpsTypesResults.js +45 -0
  44. package/lib/components/molecules/process-results/CheckFpsTypesResults.js.map +1 -0
  45. package/lib/components/molecules/process-results/CheckItemsResults.d.ts +1 -13
  46. package/lib/components/molecules/process-results/CheckItemsResults.d.ts.map +1 -1
  47. package/lib/components/molecules/process-results/CheckItemsResults.js +6 -5
  48. package/lib/components/molecules/process-results/CheckItemsResults.js.map +1 -1
  49. package/lib/components/molecules/process-results/IFpsItemsReturn.d.ts +14 -0
  50. package/lib/components/molecules/process-results/IFpsItemsReturn.d.ts.map +1 -0
  51. package/lib/components/molecules/process-results/IFpsItemsReturn.js +2 -0
  52. package/lib/components/molecules/process-results/IFpsItemsReturn.js.map +1 -0
  53. package/lib/components/molecules/process-results/Logging.d.ts +0 -2
  54. package/lib/components/molecules/process-results/Logging.d.ts.map +1 -1
  55. package/lib/components/molecules/process-results/Logging.js +47 -49
  56. package/lib/components/molecules/process-results/Logging.js.map +1 -1
  57. package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts +1 -1
  58. package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts.map +1 -1
  59. package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.d.ts +1 -1
  60. package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.d.ts.map +1 -1
  61. package/lib/components/molecules/process-results/createErrorFpsFileReturn.js +1 -1
  62. package/lib/components/molecules/process-results/createErrorFpsFileReturn.js.map +1 -1
  63. package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.d.ts +1 -1
  64. package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.d.ts.map +1 -1
  65. package/lib/components/molecules/state-source/IStateSource.d.ts +1 -1
  66. package/lib/components/molecules/state-source/IStateSource.d.ts.map +1 -1
  67. package/lib/restAPIs/lists/files/getFileEmbedUrl.d.ts +2 -3
  68. package/lib/restAPIs/lists/files/getFileEmbedUrl.d.ts.map +1 -1
  69. package/lib/restAPIs/lists/files/getFileEmbedUrl.js +10 -12
  70. package/lib/restAPIs/lists/files/getFileEmbedUrl.js.map +1 -1
  71. package/lib/restAPIs/lists/files/postSourceFilesAPI.d.ts +1 -1
  72. package/lib/restAPIs/lists/files/postSourceFilesAPI.d.ts.map +1 -1
  73. package/lib/restAPIs/lists/files/postSourceFilesAPI.js.map +1 -1
  74. package/lib/restAPIs/lists/items/getOnlySharedItems.d.ts +19 -0
  75. package/lib/restAPIs/lists/items/getOnlySharedItems.d.ts.map +1 -0
  76. package/lib/restAPIs/lists/items/getOnlySharedItems.js +89 -0
  77. package/lib/restAPIs/lists/items/getOnlySharedItems.js.map +1 -0
  78. package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts +1 -1
  79. package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts.map +1 -1
  80. package/lib/restAPIs/lists/items/getSourceItemsAPI.js +6 -4
  81. package/lib/restAPIs/lists/items/getSourceItemsAPI.js.map +1 -1
  82. package/lib/restAPIs/lists/items/postSourceItemsAPI.d.ts +1 -1
  83. package/lib/restAPIs/lists/items/postSourceItemsAPI.d.ts.map +1 -1
  84. package/lib/restAPIs/lists/items/postSourceItemsAPI.js +4 -5
  85. package/lib/restAPIs/lists/items/postSourceItemsAPI.js.map +1 -1
  86. package/lib/restAPIs/lists/items/updateAnyItemAPI.d.ts +19 -0
  87. package/lib/restAPIs/lists/items/updateAnyItemAPI.d.ts.map +1 -0
  88. package/lib/restAPIs/lists/items/updateAnyItemAPI.js +71 -0
  89. package/lib/restAPIs/lists/items/updateAnyItemAPI.js.map +1 -0
  90. package/lib/restAPIs/lists/items/updateCommandItemAPI.d.ts +44 -0
  91. package/lib/restAPIs/lists/items/updateCommandItemAPI.d.ts.map +1 -0
  92. package/lib/restAPIs/lists/items/updateCommandItemAPI.js +75 -0
  93. package/lib/restAPIs/lists/items/updateCommandItemAPI.js.map +1 -0
  94. package/lib/restAPIs/lists/lists/getSourceListsAPI.d.ts +2 -2
  95. package/lib/restAPIs/lists/lists/getSourceListsAPI.d.ts.map +1 -1
  96. package/lib/restAPIs/lists/lists/getSourceListsAPI.js +10 -13
  97. package/lib/restAPIs/lists/lists/getSourceListsAPI.js.map +1 -1
  98. package/lib/restAPIs/logging/saveErrorToLog.d.ts +2 -0
  99. package/lib/restAPIs/logging/saveErrorToLog.d.ts.map +1 -1
  100. package/lib/restAPIs/logging/saveErrorToLog.js +18 -9
  101. package/lib/restAPIs/logging/saveErrorToLog.js.map +1 -1
  102. package/lib/restAPIs/logging/saveErrorToLogOriginal.d.ts +1 -0
  103. package/lib/restAPIs/logging/saveErrorToLogOriginal.d.ts.map +1 -0
  104. package/lib/restAPIs/logging/saveErrorToLogOriginal.js +45 -0
  105. package/lib/restAPIs/logging/saveErrorToLogOriginal.js.map +1 -0
  106. package/lib/restAPIs/sites/groups/getGroupMembersAPI.js +4 -4
  107. package/lib/restAPIs/sites/groups/getGroupMembersAPI.js.map +1 -1
  108. package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js +5 -5
  109. package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js.map +1 -1
  110. package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js +4 -4
  111. package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js.map +1 -1
  112. package/lib/restAPIs/sites/sites/getSiteAPI.d.ts +1 -1
  113. package/lib/restAPIs/sites/sites/getSiteAPI.d.ts.map +1 -1
  114. package/lib/restAPIs/sites/sites/getSiteAPI.js +13 -12
  115. package/lib/restAPIs/sites/sites/getSiteAPI.js.map +1 -1
  116. package/lib/restAPIs/sites/users/getSiteUsersAPI.js +4 -4
  117. package/lib/restAPIs/sites/users/getSiteUsersAPI.js.map +1 -1
  118. package/lib/types/fps-returns/common/IFPSBaseContentType.d.ts +8 -0
  119. package/lib/types/fps-returns/common/IFPSBaseContentType.d.ts.map +1 -1
  120. package/lib/types/fps-returns/common/IFpsErrorObject.d.ts +5 -2
  121. package/lib/types/fps-returns/common/IFpsErrorObject.d.ts.map +1 -1
  122. package/lib/types/fps-returns/sites/IFpsSiteReturn.d.ts +1 -1
  123. package/lib/types/fps-returns/sites/IFpsSiteReturn.d.ts.map +1 -1
  124. package/lib/types/fps-returns/sites/groups/IGroupReturns.d.ts +1 -1
  125. package/lib/types/fps-returns/sites/groups/IGroupReturns.d.ts.map +1 -1
  126. package/lib/types/fps-returns/sites/update/IFPSItemUpdateResultObj.d.ts +2 -1
  127. package/lib/types/fps-returns/sites/update/IFPSItemUpdateResultObj.d.ts.map +1 -1
  128. package/lib/types/fps-returns/sites/users/IFpsUsersReturn.d.ts +1 -1
  129. package/lib/types/fps-returns/sites/users/IFpsUsersReturn.d.ts.map +1 -1
  130. package/lib/types/fps-returns/sites/users/ISiteUserResults.d.ts +1 -1
  131. package/lib/types/fps-returns/sites/users/ISiteUserResults.d.ts.map +1 -1
  132. package/package.json +1 -1
@@ -0,0 +1,89 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 2 imports on 2024-09-22 14:49:52
3
+ * Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
4
+ * Update:: import { processSharedItems } to '@mikezimm/fps-core-v7/lib/components/atoms/SharedItems/processSharedItems;'
5
+
6
+ */
7
+ import { processSharedItems } from "../../../components/atoms/SharedItems/processSharedItems";
8
+ import { filterSharedItems, SharedWithExpand, SharedWithItemsSelect } from "../../../components/molecules/AnyContent/IFPSFileObject";
9
+ import { CurrentTenant } from "../../../components/molecules/source-props/WindowLocationConstants";
10
+ import { makeid } from "../../../logic/Strings/guids";
11
+ import { getSourceItemsAPI } from "./getSourceItemsAPI";
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
+ /**
14
+ * 2024-12-15: Migrated from fps-library-v2: src\components\atoms\SharedItems\getOnlySharedItems.ts
15
+ * As of now, not tested, but might be used for PivotTiles where it was originally based from
16
+ *
17
+ * @param doThis
18
+ * @param webURL
19
+ * @param listTitle
20
+ * @param addTheseItemsToState
21
+ * @returns
22
+ */
23
+ export async function getOnlySharedItems(doThis, webURL, listTitle, addTheseItemsToState) {
24
+ const SourceProps = {
25
+ tenant: CurrentTenant,
26
+ refreshId: makeid(5),
27
+ webUrl: webURL,
28
+ listTitle: listTitle,
29
+ fetchCount: null,
30
+ selectThese: SharedWithItemsSelect,
31
+ expandThese: SharedWithExpand,
32
+ restFilter: filterSharedItems,
33
+ orderBy: {
34
+ prop: 'Id',
35
+ order: 'desc',
36
+ asc: false,
37
+ },
38
+ };
39
+ const getItems = await getSourceItemsAPI(SourceProps, false, true);
40
+ // let items: IItemWithSharingInfo[] = getItems.items;
41
+ getItems.items = processSharedItems(getItems.items);
42
+ // if ( doThis.tab8 === sharedHistory.tab8 ) {
43
+ // elements = buildSharingRows( items, width );
44
+ // } else {
45
+ // elements = buildWasSharedRows( items, width );
46
+ // }
47
+ // try {
48
+ // const getItems: IFpsItemsReturn = await getSourceItems( SourceProps as ISourceProps, false, true );
49
+ // if ( doThis.tab8 === sharedHistory.tab8 ) {
50
+ // try {
51
+ // items = await thisListObject.items.select(thisSelect).expand(thisExpand).filter('SharedWithUsersId ne null').get();
52
+ // items = processSharedItems( items );
53
+ // elements = buildSharingRows( items, width );
54
+ // } catch( e ) {
55
+ // const helpfulErrorEnd = [ webURL, listTitle, null, null ].join('|');
56
+ // errMessage = getHelpfullErrorV2(e, false, true, [ BaseErrorTrace , 'Failed', 'Sharing ~ 303', helpfulErrorEnd ].join('|') ).friendly;
57
+ // }
58
+ // } else {
59
+ // try {
60
+ // items = await thisListObject.items.select(thisSelect).expand(thisExpand).filter('SharedWithUsersId ne null').get();
61
+ // items = processSharedItems( items );
62
+ // elements = buildWasSharedRows( items, width );
63
+ // } catch( e ) {
64
+ // const helpfulErrorEnd = [ webURL, listTitle, null, null ].join('|');
65
+ // errMessage = getHelpfullErrorV2(e, false, true, [ BaseErrorTrace , 'Failed', 'Sharing ~ 303', helpfulErrorEnd ].join('|') ).friendly;
66
+ // }
67
+ // }
68
+ // items = processSharedItems( items );
69
+ // elements = buildSharingRows( items, width );
70
+ // } catch (e) {
71
+ // const helpfulErrorEnd = [ webURL, listTitle, null, null ].join('|');
72
+ // errMessage = getHelpfullErrorV2(e, false, true, [ BaseErrorTrace , 'Failed', 'Sharing ~ 254', helpfulErrorEnd ].join('|') ).friendly;
73
+ // }
74
+ // const thisSet : IMySharingInfoSet = {
75
+ // items: items,
76
+ // elements: elements,
77
+ // isLoaded: isLoaded,
78
+ // errMessage: getItems.status === 'Success' ? '' : getItems.errorInfo.friendly,
79
+ // };
80
+ // const mySharing : IMySharingInfo = {
81
+ // history: doThis.tab8 === sharedHistory.tab8 ? thisSet : null ,
82
+ // details: doThis.tab8 === sharedDetails.tab8 ? thisSet : null ,
83
+ // };
84
+ if (addTheseItemsToState)
85
+ addTheseItemsToState(getItems, doThis);
86
+ // console.log('mySharing:', mySharing );
87
+ return getItems;
88
+ }
89
+ //# sourceMappingURL=getOnlySharedItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOnlySharedItems.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getOnlySharedItems.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAIrI,OAAO,EAAE,aAAa,EAAE,MAAM,oEAAoE,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,8DAA8D;AAC9D;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAE,MAAc,EAAE,MAAc,EAAE,SAAiB,EAAE,oBAAyB;IAEpH,MAAM,WAAW,GAAyB;QACxC,MAAM,EAAE,aAAa;QACrB,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;QACpB,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,IAAyB;QACrC,WAAW,EAAE,qBAAqB;QAClC,WAAW,EAAE,gBAAgB;QAC7B,UAAU,EAAE,iBAAiB;QAC7B,OAAO,EAAE;YACP,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,MAAM;YACb,GAAG,EAAE,KAAK;SACX;KACF,CAAA;IAED,MAAM,QAAQ,GAAoB,MAAM,iBAAiB,CAAE,WAA2B,EAAE,KAAK,EAAE,IAAI,CAAE,CAAC;IAEtG,sDAAsD;IACtD,QAAQ,CAAC,KAAK,GAAG,kBAAkB,CAAE,QAAQ,CAAC,KAA+B,CAAE,CAAC;IAEhF,8CAA8C;IAC9C,iDAAiD;IACjD,WAAW;IACX,mDAAmD;IACnD,IAAI;IAGJ,QAAQ;IAER,wGAAwG;IAGxG,gDAAgD;IAG5C,QAAQ;IACR,wHAAwH;IACxH,yCAAyC;IACzC,iDAAiD;IACjD,iBAAiB;IACjB,yEAAyE;IACzE,0IAA0I;IAC1I,IAAI;IAEN,WAAW;IAET,QAAQ;IACR,wHAAwH;IACxH,yCAAyC;IACzC,mDAAmD;IACnD,iBAAiB;IACjB,yEAAyE;IACzE,0IAA0I;IAC1I,IAAI;IACN,IAAI;IAEN,yCAAyC;IACzC,iDAAiD;IAGjD,gBAAgB;IAChB,uEAAuE;IACvE,4IAA4I;IAE5I,IAAI;IAEJ,wCAAwC;IACxC,kBAAkB;IAClB,wBAAwB;IACxB,wBAAwB;IACxB,kFAAkF;IAClF,KAAK;IAEL,uCAAuC;IACvC,mEAAmE;IACnE,mEAAmE;IACnE,KAAK;IAEL,IAAK,oBAAoB;QAAG,oBAAoB,CAAE,QAAQ,EAAE,MAAM,CAAE,CAAC;IACrE,yCAAyC;IACzC,OAAO,QAAQ,CAAE;AACnB,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * 2024-09-29: Migrated from src\pnpjs\SourceItems\getSourceItems.ts
3
3
  */
4
4
  import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
5
- import { IFpsItemsReturn } from '../../../components/molecules/process-results/CheckItemsResults';
5
+ import { IFpsItemsReturn } from '../../../components/molecules/process-results/IFpsItemsReturn';
6
6
  export declare const UniquePermsFilter = "HasUniqueRoleAssignments eq true";
7
7
  export declare const UniquePermsHiddenFilter: string;
8
8
  export declare function getSourceItemsUniquePermissionsAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
@@ -1 +1 @@
1
- {"version":3,"file":"getSourceItemsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAE,eAAe,EAAE,MAAM,iEAAiE,CAAC;AAOlG,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AACpE,eAAO,MAAM,uBAAuB,QAAgD,CAAC;AAErF,wBAAsB,kCAAkC,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAM9K;AACD;;;;;;;;;;GAUG;AAEH,wBAAsB,iBAAiB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CA8D7J"}
1
+ {"version":3,"file":"getSourceItemsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAE,eAAe,EAAE,MAAM,+DAA+D,CAAC;AAQhG,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AACpE,eAAO,MAAM,uBAAuB,QAAgD,CAAC;AAErF,wBAAsB,kCAAkC,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAM9K;AAED;;;;;;;;;;GAUG;AAEH,wBAAsB,iBAAiB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAmE7J"}
@@ -7,6 +7,7 @@ import { doSpJsFetchOrPostAndCheck } from "../../../components/molecules/SpHttp/
7
7
  import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
8
8
  import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
9
9
  import { getTodayRestFilter } from './getTodayRestFilter';
10
+ import { addFPSDigestToSourceProps } from '../../../components/molecules/SpHttp/digestValues/fromUrl/addFPSDigestToSourceProps';
10
11
  export const UniquePermsFilter = 'HasUniqueRoleAssignments eq true';
11
12
  export const UniquePermsHiddenFilter = `${UniquePermsFilter} and Hidden eq false`;
12
13
  export async function getSourceItemsUniquePermissionsAPI(sourceProps, alertMe, consoleLog) {
@@ -44,6 +45,8 @@ export async function getSourceItemsAPI(sourceProps, alertMe, consoleLog) {
44
45
  alert(`${''} ${SourcePropsNoListTitle}`);
45
46
  return createErrorFpsListReturn(useUrl, listTitle);
46
47
  }
48
+ // Added just so it's always here for cases like getOnlySharedItems
49
+ sourceProps = await addFPSDigestToSourceProps(sourceProps);
47
50
  /**
48
51
  SAMPLE Full SharePoint Items Rest call:
49
52
 
@@ -73,16 +76,15 @@ export async function getSourceItemsAPI(sourceProps, alertMe, consoleLog) {
73
76
  fetchAPI += `$top=${fetchCount}&`;
74
77
  if (skip)
75
78
  fetchAPI += `$skip=${skip}&`;
76
- const result = await doSpJsFetchOrPostAndCheck(fetchAPI, 'GET', sourceProps.digestValue ? sourceProps.digestValue : '', '', alertMe, consoleLog, null);
79
+ const result = await doSpJsFetchOrPostAndCheck(fetchAPI, 'GET', sourceProps.digestValue ? sourceProps.digestValue : '', '', alertMe, consoleLog, 'item', null);
77
80
  // Add any required custom logic here
78
81
  // if ( resultHubSites.ok ) {
79
82
  // resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
80
83
  // }
81
84
  result.unifiedPerformanceOps.fetch.label = `fetch${listTitle}`;
82
- result.fpsContentType = !sourceProps.fpsContentType ? ['item'] : sourceProps.fpsContentType;
85
+ // result.fpsContentType = !sourceProps.fpsContentType ? [ 'item' ] : sourceProps.fpsContentType;
83
86
  // 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
84
- if (result.fpsContentType.indexOf('item') < 0)
85
- result.fpsContentType.push('item');
87
+ // if ( result.fpsContentType.indexOf( 'item' ) < 0 ) result.fpsContentType.push( 'item' );
86
88
  if (check4This(`fpsShowFetchResults=true`) === true) {
87
89
  console.log(`fps-core-v7 COMPLETE: getSourceItemsAPI ~ 90`, result);
88
90
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getSourceItemsAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,EAAgB,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC,CAAC,iBAAiB;AAEtJ,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,kCAAkC,CAAC;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAI,iBAAkB,uBAAuB,CAAC;AAErF,MAAM,CAAC,KAAK,UAAU,kCAAkC,CAAE,WAAyB,EAAE,OAA4B,EAAE,UAA+B;IAChJ,MAAM,cAAc,GAAiB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAE,WA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AAEN,wBAAwB;AACxB,kCAAkC;AAClC,wEAAwE;AACxE,2DAA2D;AAC3D,MAAM;AAEN,QAAQ;AACR,8CAA8C;AAE9C,6FAA6F;AAC7F,mHAAmH;AACnH,iDAAiD;AACjD,wCAAwC;AACxC,2BAA2B;AAE3B,OAAO;AAEP,kGAAkG;AAClG,kGAAkG;AAElG,yEAAyE;AACzE,iFAAiF;AAEjF,mCAAmC;AACnC,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAE/E,kGAAkG;AAClG,8DAA8D;AAC9D,+CAA+C;AAE/C,wIAAwI;AAExI,2CAA2C;AAC3C,oCAAoC;AACpC,6EAA6E;AAC7E,WAAW;AAEX,qIAAqI;AACrI,mGAAmG;AAEnG,oGAAoG;AACpG,8FAA8F;AAE9F,+DAA+D;AAC/D,0KAA0K;AAC1K,2EAA2E;AAE3E,yDAAyD;AAEzD,wIAAwI;AAExI,mBAAmB;AAEnB,IAAI"}
@@ -1,4 +1,4 @@
1
1
  import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
2
- import { IFpsItemsReturn } from '../../../components/molecules/process-results/CheckItemsResults';
2
+ import { IFpsItemsReturn } from '../../../components/molecules/process-results/IFpsItemsReturn';
3
3
  export declare function postSourceItemsAPI(sourceProps: ISourceProps, saveItem: any, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
4
4
  //# sourceMappingURL=postSourceItemsAPI.d.ts.map
@@ -1 +1 @@
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,EAAE,eAAe,EAAE,MAAM,iEAAiE,CAAC;AAMlG,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,CA+C9K"}
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,EAAE,eAAe,EAAE,MAAM,+DAA+D,CAAC;AAMhG,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,CA+C9K"}
@@ -25,17 +25,16 @@ export async function postSourceItemsAPI(sourceProps, saveItem, alertMe, console
25
25
  alert(`${''} ${SourcePropsNoListTitle}`);
26
26
  return createErrorFpsListReturn(useUrl, listTitle);
27
27
  }
28
- const result = await doSpJsFetchOrPostAndCheck(postAPI, 'POST', sourceProps.digestValue ? sourceProps.digestValue : '', '', alertMe, consoleLog, saveItem);
28
+ const result = await doSpJsFetchOrPostAndCheck(postAPI, 'POST', sourceProps.digestValue ? sourceProps.digestValue : '', '', alertMe, consoleLog, 'item', saveItem);
29
29
  // Add any required custom logic here
30
30
  // if ( resultHubSites.ok ) {
31
31
  // resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
32
32
  // }
33
- result.fpsContentType = !sourceProps.fpsContentType ? ['item'] : sourceProps.fpsContentType;
33
+ // result.fpsContentType = !sourceProps.fpsContentType ? [ 'item' ] : sourceProps.fpsContentType;
34
34
  // 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
35
- if (result.fpsContentType.indexOf('item') < 0)
36
- result.fpsContentType.push('item');
35
+ // if ( result.fpsContentType.indexOf( 'item' ) < 0 ) result.fpsContentType.push( 'item' );
37
36
  result.unifiedPerformanceOps.fetch.label = `save ${listTitle}`;
38
- result.unifiedPerformanceOps.fetch.c = 1;
37
+ // result.unifiedPerformanceOps.fetch.c = 1;
39
38
  result.saveOp = result.unifiedPerformanceOps.fetch;
40
39
  if (check4This(`fpsShowFetchResults=true`) === true) {
41
40
  console.log(`fps-core-v7 COMPLETE: postSourceItems ~ 56`, result);
@@ -1 +1 @@
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;AAEtJ,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,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,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;IAED,IAAK,CAAC,SAAS,EAAG;QAChB,2BAA2B;QAC3B,IAAK,OAAO,KAAK,IAAI;YAAG,KAAK,CAAC,GAAG,EAAE,IAAI,sBAAsB,EAAE,CAAC,CAAC;QACjE,OAAO,wB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,QAAQ,SAAS,EAAE,CAAC;IAC/D,4CAA4C;IAC5C,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,KAAK,CAAC;IAEnD,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,19 @@
1
+ import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
2
+ import { IFpsItemsReturn } from '../../../components/molecules/process-results/IFpsItemsReturn';
3
+ /**
4
+ * 2024-12-09: Migrated from fps-Pnp2...
5
+ * Currently untested, but use this fetch:
6
+ * import { updateAnyItemAPI } from '@mikezimm/fps-core-v7/lib/restAPIS/lists/items/updateAnyItemAPI';
7
+ *
8
+ * 2024-12-09: Created this in order to update any list type items.
9
+ * For instance, use by updateCommandItems to update simple list items in SPO
10
+ *
11
+ * @param sourceProps
12
+ * @param saveItem
13
+ * @param itemId
14
+ * @param alertMe
15
+ * @param consoleLog
16
+ * @returns
17
+ */
18
+ export declare function updateAnyItemAPI(sourceProps: ISourceProps, saveItem: any, itemId: number, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
19
+ //# sourceMappingURL=updateAnyItemAPI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateAnyItemAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/updateAnyItemAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAE,eAAe,EAAE,MAAM,+DAA+D,CAAC;AAMhG;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAoE3L"}
@@ -0,0 +1,71 @@
1
+ import { SourcePropsNoListTitle, SourcePropsNoWebUrl } from '../../../components/molecules/source-props/ISourceProps'; ///ISourceProps';
2
+ import { check4This } from "../../../logic/Links/CheckSearch";
3
+ import { doSpJsFetchOrPostAndCheck } from "../../../components/molecules/SpHttp/doSpJsFetch";
4
+ import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
5
+ import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
6
+ /**
7
+ * 2024-12-09: Migrated from fps-Pnp2...
8
+ * Currently untested, but use this fetch:
9
+ * import { updateAnyItemAPI } from '@mikezimm/fps-core-v7/lib/restAPIS/lists/items/updateAnyItemAPI';
10
+ *
11
+ * 2024-12-09: Created this in order to update any list type items.
12
+ * For instance, use by updateCommandItems to update simple list items in SPO
13
+ *
14
+ * @param sourceProps
15
+ * @param saveItem
16
+ * @param itemId
17
+ * @param alertMe
18
+ * @param consoleLog
19
+ * @returns
20
+ */
21
+ export async function updateAnyItemAPI(sourceProps, saveItem, itemId, alertMe, consoleLog) {
22
+ const { listTitle, } = sourceProps;
23
+ // 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
24
+ const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
25
+ /**
26
+ SAMPLE Full SharePoint Items Rest call:
27
+ https://example.sharepoint.com/sites/MySite/_api/web/lists/getbytitle('MyList')/items
28
+
29
+ */
30
+ if (!useUrl) {
31
+ // NO WebURL... Throw Alert
32
+ if (alertMe === true)
33
+ alert(`${listTitle} ${SourcePropsNoWebUrl}`);
34
+ return createErrorFpsListReturn(useUrl, listTitle);
35
+ }
36
+ if (!listTitle) {
37
+ // NO WebURL... Throw Alert
38
+ if (alertMe === true)
39
+ alert(`${''} ${SourcePropsNoListTitle}`);
40
+ return createErrorFpsListReturn(useUrl, listTitle);
41
+ }
42
+ let postAPI = `${useUrl}/_api/web/lists/getbytitle('${listTitle}')/items(${itemId})`;
43
+ /**
44
+ * Use 'MERGE' for updating items
45
+ */
46
+ /**
47
+ *
48
+ *
49
+ * COMPARE THIS TO ORIGINAL LOGIC FOR updating command items
50
+ *
51
+ *
52
+ *
53
+ */
54
+ const result = await doSpJsFetchOrPostAndCheck(postAPI, 'MERGE', sourceProps.digestValue ? sourceProps.digestValue : '', '', alertMe, consoleLog, 'item', saveItem);
55
+ // Add any required custom logic here
56
+ // if ( resultHubSites.ok ) {
57
+ // resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
58
+ // }
59
+ // result.fpsContentType = !sourceProps.fpsContentType ? [ 'item' ] : sourceProps.fpsContentType;
60
+ // 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
61
+ // if ( result.fpsContentType.indexOf( 'item' ) < 0 ) result.fpsContentType.push( 'item' );
62
+ result.unifiedPerformanceOps.fetch.label = `update ${listTitle}`;
63
+ // result.unifiedPerformanceOps.fetch.c = 1;
64
+ result.saveOp = result.unifiedPerformanceOps.fetch;
65
+ if (check4This(`fpsShowFetchResults=true`) === true) {
66
+ console.log(`fps-core-v7 COMPLETE: postSourceItems ~ 56`, result);
67
+ }
68
+ ;
69
+ return result;
70
+ }
71
+ //# sourceMappingURL=updateAnyItemAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateAnyItemAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/updateAnyItemAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC,CAAC,iBAAiB;AAEtJ,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6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AE,CAAC;IACjE,4CAA4C;IAC5C,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,KAAK,CAAC;IAEnD,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,44 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 3 imports on 2024-09-22 14:49:52
3
+ * Update:: import { IFPSItemUpdateResultObj } to '@mikezimm/fps-core-v7/lib/types/fps-returns/sites/update/IFPSItemUpdateResultObj;'
4
+ * Update:: import { CommandUpdateFailedMessage } to '@mikezimm/fps-core-v7/lib/components/webparts/Drilldown/QuickCommands/IQuickCommands;'
5
+ * Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
6
+
7
+ */
8
+ import { IFpsErrorObject } from '../../../types/fps-returns/common/IFpsErrorObject';
9
+ import { IMinUpdateProps } from '../../../types/fps-returns/sites/update/IMinUpdateProps';
10
+ import { IJsxElement } from '../../../types/react/IFPSJSX_Element';
11
+ /**
12
+ * updateCommandItems calls the Pnp function to get the results which returns the raw error.
13
+ * This function then will convert the error into the helpful error and return the standard IItemsError object.
14
+ *
15
+ * @param sourceProps
16
+ * @param alertMe
17
+ * @param consoleLog
18
+ * @returns
19
+ */
20
+ export interface IUpdateCommandItemProps extends IMinUpdateProps {
21
+ alertMe: string;
22
+ consoleLog: string;
23
+ }
24
+ export interface IUpdateCommandItemReturn extends IFpsErrorObject {
25
+ response: any;
26
+ statusElement?: IJsxElement;
27
+ webUrl: string;
28
+ listTitle: string;
29
+ Id: number;
30
+ originalItem?: any;
31
+ updateObject?: any;
32
+ idx?: number;
33
+ copyFileLeafRef?: string;
34
+ }
35
+ /**
36
+ * 2024-12-09: Migrated from fps-library-v2...
37
+ * Currently untested, but use this fetch:
38
+ * import { IUpdateCommandItemProps, IUpdateCommandItemReturn, updateCommandItemAPI, } from '@mikezimm/fps-core-v7/lib/restAPIS/lists/items/updateCommandItemAPI';
39
+ *
40
+ * @param commandItem
41
+ * @returns
42
+ */
43
+ export declare function updateCommandItemAPI(commandItem: IUpdateCommandItemProps): Promise<IUpdateCommandItemReturn>;
44
+ //# sourceMappingURL=updateCommandItemAPI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateCommandItemAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/updateCommandItemAPI.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqBH,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,yDAAyD,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAInE;;;;;;;;GAQG;AAEH,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAyB,SAAQ,eAAe;IAC/D,QAAQ,EAAE,GAAG,CAAC;IACd,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAE,WAAW,EAAE,uBAAuB,GAAM,OAAO,CAAC,wBAAwB,CAAC,CAiDtH"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * CodeAnalizerComment: Updated 3 imports on 2024-09-22 14:49:52
3
+ * Update:: import { IFPSItemUpdateResultObj } to '@mikezimm/fps-core-v7/lib/types/fps-returns/sites/update/IFPSItemUpdateResultObj;'
4
+ * Update:: import { CommandUpdateFailedMessage } to '@mikezimm/fps-core-v7/lib/components/webparts/Drilldown/QuickCommands/IQuickCommands;'
5
+ * Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
6
+
7
+ */
8
+ /**
9
+ * CodeAnalizerComment: Updated 8 imports on 2024-09-21 23:07:24
10
+ * Update:: import { convertHelpfullError } to '@mikezimm/fps-core-v7/lib/logic/Errors/friendly;'
11
+ * Update:: import { IFPSItemUpdateResultObj } to '@mikezimm/fps-core-v7/lib/types/fps-returns/sites/update/IFPSItemUpdateResultObj;'
12
+ * Update:: import { IMinUpdateProps } to '@mikezimm/fps-core-v7/lib/types/fps-returns/sites/update/IMinUpdateProps;'
13
+ * Update:: import { saveErrorToLog } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/Logging;'
14
+ * Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
15
+ * Update:: import { startPerformOpV2 } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions;'
16
+ * Update:: import { updatePerformanceEndV2 } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions;'
17
+ * Update:: import { IStartPerformOp } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/IPerformanceSettings;'
18
+
19
+ */
20
+ import { startPerformOpV2, updatePerformanceEndV2 } from '../../../components/molecules/Performance/functions';
21
+ import { CommandUpdateFailedMessage } from '../../../components/webparts/Drilldown/QuickCommands/IQuickCommands';
22
+ import { saveErrorToLog } from '../../logging/saveErrorToLog';
23
+ import { updateAnyItemAPI } from './updateAnyItemAPI';
24
+ /**
25
+ * 2024-12-09: Migrated from fps-library-v2...
26
+ * Currently untested, but use this fetch:
27
+ * import { IUpdateCommandItemProps, IUpdateCommandItemReturn, updateCommandItemAPI, } from '@mikezimm/fps-core-v7/lib/restAPIS/lists/items/updateCommandItemAPI';
28
+ *
29
+ * @param commandItem
30
+ * @returns
31
+ */
32
+ export async function updateCommandItemAPI(commandItem) {
33
+ /**
34
+ * 2024-12-14: REMOVE THIS after testing since
35
+ * updateAnyItemAPI calls doSpJsFetchOrPostAndCheck which includes performance out of the box
36
+ */
37
+ const performanceSettings = {
38
+ label: `updateItem ~ saveOp`,
39
+ includeMsStr: true,
40
+ };
41
+ const saveOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
42
+ const { itemUpdate, Id, alertMe, consoleLog } = commandItem;
43
+ const finalResult = await updateAnyItemAPI(commandItem, itemUpdate, Id, false, false);
44
+ finalResult.webUrl = commandItem.webUrl;
45
+ finalResult.listTitle = commandItem.listTitle;
46
+ finalResult.Id = commandItem.Id;
47
+ if (finalResult.status === 'Success') {
48
+ if (alertMe) {
49
+ alert('Success!\n' + alertMe);
50
+ }
51
+ if (consoleLog) {
52
+ console.log(consoleLog, finalResult);
53
+ }
54
+ }
55
+ else if (finalResult.status === 'Error') {
56
+ // 2024-12-09: This saveErrorToLog may be executed twice because checkItemsResults executes the save if it's not a standard error from FPSResultCommonErrors
57
+ saveErrorToLog(finalResult.errorInfo, finalResult.errorInput);
58
+ let errMessage = `${CommandUpdateFailedMessage} - ${finalResult.errorInfo ? finalResult.errorInfo.friendly : ''}`;
59
+ if (alertMe) {
60
+ alert(`${CommandUpdateFailedMessage}\n${alertMe}\n${errMessage}`);
61
+ }
62
+ console.log(`${CommandUpdateFailedMessage}\n${consoleLog}\n${errMessage}`);
63
+ }
64
+ else {
65
+ alert(`updateCommandItems ~ 50 - result.status = ${finalResult.status}`);
66
+ }
67
+ // https://github.com/fps-solutions/Rtf-Fixer/issues/30
68
+ if (!finalResult.unifiedPerformanceOps)
69
+ finalResult.unifiedPerformanceOps = {};
70
+ finalResult.unifiedPerformanceOps.save = updatePerformanceEndV2({ op: saveOp, updateMiliseconds: true, count: 1 });
71
+ // If performance is removed from here (cause it's done in the fetch op, keep this to bring it back up to saveOp)
72
+ finalResult.saveOp = finalResult.unifiedPerformanceOps.save;
73
+ return finalResult;
74
+ }
75
+ //# sourceMappingURL=updateCommandItemAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateCommandItemAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/updateCommandItemAPI.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAI/G,OAAO,EAAE,0BAA0B,EAAE,MAAM,qEAAqE,CAAC;AAKjH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA6BtD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAE,WAAoC;IAE9E;;;OAGG;IACH,MAAM,mBAAmB,GAAoB;QAC3C,KAAK,EAAE,qBAAqB;QAC5B,YAAY,EAAE,IAAI;KACZ,CAAC;IACT,MAAM,MAAM,GAAG,mBAAmB,CAAC,CAAC,CAAC,gBAAgB,CAAE,mBAAmB,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAEpF,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC;IAC5D,MAAM,WAAW,GAA6B,MAAM,gBAAgB,CAAE,WAAsC,EAAE,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAyC,CAAC;IAEpL,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IACxC,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;IAC9C,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,CAAC;IAEhC,IAAK,WAAW,CAAC,MAAM,KAAK,SAAS,EAAG;QACtC,IAAI,OAAO,EAAE;YAAE,KAAK,CAAC,YAAY,GAAG,OAAO,CAAC,CAAC;SAAE;QAC/C,IAAI,UAAU,EAAE;YAAE,OAAO,CAAC,GAAG,CAAE,UAAU,EAAE,WAAW,CAAE,CAAC;SAAE;KAE5D;SAAM,IAAK,WAAW,CAAC,MAAM,KAAK,OAAO,EAAG;QAE3C,6JAA6J;QAC7J,cAAc,CAAE,WAAW,CAAC,SAA4B,EAAG,WAAW,CAAC,UAA4B,CAAE,CAAC;QAEtG,IAAI,UAAU,GAAG,GAAG,0BAA0B,MAAM,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAG,EAAE,CAAC;QAEnH,IAAI,OAAO,EAAE;YACX,KAAK,CAAC,GAAG,0BAA0B,KAAK,OAAO,KAAK,UAAU,EAAE,CAAC,CAAC;SACnE;QACD,OAAO,CAAC,GAAG,CAAC,GAAG,0BAA0B,KAAK,UAAU,KAAK,UAAU,EAAE,CAAC,CAAC;KAE5E;SAAM;QACL,KAAK,CAAG,6CAA8C,WAAW,CAAC,MAAO,EAAE,CAAC,CAAC;KAC9E;IAED,uDAAuD;IACvD,IAAK,CAAC,WAAW,CAAC,qBAAqB;QAAG,WAAW,CAAC,qBAAqB,GAAG,EAAE,CAAC;IACjF,WAAW,CAAC,qBAAqB,CAAC,IAAI,GAAG,sBAAsB,CAAE,EAAE,EAAE,EAAE,MAAwB,EAAE,iBAAiB,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,CAAmB,CAAC;IAGxJ,iHAAiH;IACjH,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,qBAAqB,CAAC,IAAI,CAAC;IAE5D,OAAO,WAAW,CAAC;AAErB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
2
- import { IFpsItemsReturn } from '../../../components/molecules/process-results/CheckItemsResults';
3
- export declare function fetchSourceListsAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
2
+ import { IFpsItemsReturn } from '../../../components/molecules/process-results/IFpsItemsReturn';
3
+ export declare function fetchSourceListsAPID(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
4
4
  export declare function getSourceListsAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
5
5
  //# sourceMappingURL=getSourceListsAPI.d.ts.map
@@ -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;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"}
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;AAEpI,OAAO,EAAE,eAAe,EAAE,MAAM,+DAA+D,CAAC;AAQhG,wBAAsB,oBAAoB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAGhK;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"}
@@ -1,19 +1,17 @@
1
- import { doSpJsFetchOrPost } from '../../../components/molecules/SpHttp/doSpJsFetch';
2
- import { startPerformOpV2, unifiedPerformanceEnd, } from '../../../components/molecules/Performance/functions';
1
+ import { doSpJsFetchOrPostAndCheck } from '../../../components/molecules/SpHttp/doSpJsFetch';
3
2
  import { SourcePropsNoListTitle, SourcePropsNoWebUrl } from '../../../components/molecules/source-props/ISourceProps';
4
- import { checkItemsResults } from '../../../components/molecules/process-results/CheckItemsResults';
5
3
  import { check4This } from '../../../logic/Links/CheckSearch';
6
4
  import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
7
5
  import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
8
- // Renamed from fetch to get
9
- export async function fetchSourceListsAPI(sourceProps, alertMe, consoleLog) {
6
+ // Renamed from fetch to get - just for backwards compatibility
7
+ export async function fetchSourceListsAPID(sourceProps, alertMe, consoleLog) {
10
8
  const results = await getSourceListsAPI(sourceProps, alertMe, consoleLog);
11
9
  return results;
12
10
  }
13
11
  export async function getSourceListsAPI(sourceProps, alertMe, consoleLog) {
14
- const { performanceSettings } = sourceProps;
12
+ // const { performanceSettings } = sourceProps;
15
13
  // 2024-09-15: Change to null as any to pass linting when migrating from fps-library-v2
16
- const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
14
+ // const fetchOp = performanceSettings ? startPerformOpV2( performanceSettings ) : null as any;
17
15
  const { listTitle, orderBy, restFilter, selectThese, } = sourceProps;
18
16
  // 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
19
17
  const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
@@ -40,20 +38,19 @@ export async function getSourceListsAPI(sourceProps, alertMe, consoleLog) {
40
38
  const orderBys = [];
41
39
  if (orderBy)
42
40
  orderBys.push(`${orderBy.prop} ${orderBy.order}`);
43
- const initialResult = await doSpJsFetchOrPost(fetchAPI, 'GET', sourceProps.digestValue ? sourceProps.digestValue : '', '', null);
41
+ const result = await doSpJsFetchOrPostAndCheck(fetchAPI, 'GET', sourceProps.digestValue ? sourceProps.digestValue : '', '', alertMe, consoleLog, 'list', null);
44
42
  // Add any required custom logic here
45
43
  // if ( resultHubSites.ok ) {
46
44
  // resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
47
45
  // }
48
- let result = checkItemsResults(initialResult, `fps-core-v7: fetchSourceListsAPI ~ 43`, alertMe, consoleLog);
49
- result.fpsContentType = !sourceProps.fpsContentType ? ['list'] : sourceProps.fpsContentType;
46
+ // let result : IFpsItemsReturn = checkItemsResults( initialResult, `fps-core-v7: fetchSourceListsAPI ~ 43`, alertMe, consoleLog );
47
+ // result.fpsContentType = !sourceProps.fpsContentType ? [ 'list' ] : sourceProps.fpsContentType;
50
48
  // 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
51
- if (result.fpsContentType.indexOf('list') < 0)
52
- result.fpsContentType.push('list');
49
+ // if ( result.fpsContentType.indexOf( 'list' ) < 0 ) result.fpsContentType.push( 'list' );
53
50
  // result.unifiedPerformanceOps.fetch = performanceSettings ?
54
51
  // updatePerformanceEndV2( { op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items.length }) : null;
55
52
  // result.fetchOp = result.unifiedPerformanceOps.fetch;
56
- result = unifiedPerformanceEnd(result, performanceSettings, fetchOp, 'fetch', 'list');
53
+ // result = unifiedPerformanceEnd( result, performanceSettings as any, fetchOp, 'fetch', 'list' ) as IFpsItemsReturn;
57
54
  if (check4This(`fpsShowFetchResults=true`) === true) {
58
55
  console.log(`fps-core-v7 COMPLETE: fetchSourceListsAPI ~ 52`, result);
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4F;IAE5F,6DAA6D;IAC7D,4IAA4I;IAE5I,uDAAuD;IAEvD,sHAAsH;IAEtH,IAAK,UAAU,CAAE,0BAA0B,CAAE,KAAK,IAAI,EAAG;QAAE,OAAO,CAAC,GAAG,CAAE,gDAAgD,EAAE,MAAM,CAAE,CAAA;KAAE;IAAA,CAAC;IAErI,OAAO,MAAM,CAAC;AAEhB,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import { IHelpfullInput, IHelpfullOutput } from "../../logic/Errors/friendly";
2
2
  /**
3
+ * 2024-12-09: Migrated this function from it's original location here: \components\molecules\process-results\Logging.ts
3
4
  *
4
5
  * @param errorInfo
5
6
  * @param errorInput
7
+ * @returns
6
8
  */
7
9
  export declare function saveErrorToLog(errorInfo: IHelpfullOutput, errorInput: IHelpfullInput): Promise<void>;
8
10
  //# sourceMappingURL=saveErrorToLog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"saveErrorToLog.d.ts","sourceRoot":"","sources":["../../../src/restAPIs/logging/saveErrorToLog.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAI9E;;;;GAIG;AAEH,wBAAsB,cAAc,CAAC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,GAAI,OAAO,CAAC,IAAI,CAAC,CA4C3G"}
1
+ {"version":3,"file":"saveErrorToLog.d.ts","sourceRoot":"","sources":["../../../src/restAPIs/logging/saveErrorToLog.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAI9E;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,GAAI,OAAO,CAAC,IAAI,CAAC,CAyD3G"}
@@ -1,14 +1,14 @@
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
1
  import { getThisFPSDigestValueFromUrl } from "../../components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl";
5
2
  import { doSpJsFetchOrPost } from "../../components/molecules/SpHttp/doSpJsFetch";
3
+ import { createMinHeaders } from "../../components/molecules/SpHttp/headerInitUtilities";
6
4
  import { getCurrentPageLink, getUrlVarsAsStrings } from "../../logic/Links/UrlFunctions";
7
- import { AnalyticsWebAbsolute, ErrorLog } from "./interfaces/constants";
5
+ import { SecureCDNalyticsWebAbsolute } from "../../restAPIs/logging/interfaces/constants";
8
6
  /**
7
+ * 2024-12-09: Migrated this function from it's original location here: \components\molecules\process-results\Logging.ts
9
8
  *
10
9
  * @param errorInfo
11
10
  * @param errorInput
11
+ * @returns
12
12
  */
13
13
  export async function saveErrorToLog(errorInfo, errorInput) {
14
14
  //Return if you are not supposed to log an error
@@ -19,14 +19,15 @@ export async function saveErrorToLog(errorInfo, errorInput) {
19
19
  if (!errorInfo) {
20
20
  return;
21
21
  }
22
- const muteConsole = true;
23
- const { traceString, e, alertMe, consoleLog, logErrors } = errorInput;
22
+ const { traceString, alertMe, consoleLog, } = errorInput;
24
23
  let trace = traceString ? traceString.split('|') : [];
25
24
  let getParams = JSON.stringify(getUrlVarsAsStrings());
26
25
  let parsedMessage = errorInfo.returnMess.split('-- FULL ERROR MESSAGE:');
27
26
  let zzzRichText1 = parsedMessage.length > 0 ? parsedMessage[0] : 'No friendly error';
28
27
  let zzzRichText2 = parsedMessage.length > 0 ? parsedMessage[1] : errorInfo.returnMess;
29
28
  let saveItem = {
29
+ // https://github.com/fps-solutions/HubCon/issues/103
30
+ __metadata: { type: `` },
30
31
  Title: trace[0],
31
32
  Result: trace[3] ? trace[3] : null,
32
33
  zzzText1: trace[4] ? trace[4] : null,
@@ -41,8 +42,16 @@ export async function saveErrorToLog(errorInfo, errorInput) {
41
42
  zzzRichText1: zzzRichText1,
42
43
  zzzRichText2: zzzRichText2,
43
44
  };
44
- let postAPI = `${AnalyticsWebAbsolute}/_api/web/lists/getbytitle('${ErrorLog}')/items`;
45
- const digestValue = await getThisFPSDigestValueFromUrl(AnalyticsWebAbsolute);
46
- const initialResult = await doSpJsFetchOrPost(postAPI, 'POST', digestValue, '', saveItem);
45
+ let absoluteWebUrl = trace[1] ? trace[1] : `${SecureCDNalyticsWebAbsolute}`;
46
+ let list = trace[2] ? trace[2] : 'GeneralErrorLog';
47
+ // https://github.com/fps-solutions/HubCon/issues/103
48
+ // Required for non-PnpJS POST operations
49
+ saveItem.__metadata = { type: `SP.Data.${list}ListItem` };
50
+ // https://github.com/fps-solutions/HubCon/issues/103
51
+ const formDigestValue = await getThisFPSDigestValueFromUrl(absoluteWebUrl);
52
+ let postAPI = `${absoluteWebUrl}/_api/web/lists/getbytitle('${list}')/items`;
53
+ doSpJsFetchOrPost(postAPI, 'POST', createMinHeaders(formDigestValue, ''), saveItem);
54
+ // const TEMPAlert = `saveErrorToLog Alert:\n\nerrorInfo\n${JSON.stringify(errorInfo)}\n\nerrorInput:\n\nerrorInput\n${errorInput}`
55
+ // alert(TEMPAlert);
47
56
  }
48
57
  //# sourceMappingURL=saveErrorToLog.js.map