@mikezimm/fps-core-v7 1.0.44 → 1.0.46

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 (136) 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/banner/components/SingleHelpPage/interfaces/ITrickRow.d.ts.map +1 -1
  6. package/lib/banner/components/SingleHelpPage/interfaces/ITrickRow.js +1 -0
  7. package/lib/banner/components/SingleHelpPage/interfaces/ITrickRow.js.map +1 -1
  8. package/lib/components/atoms/easy-pages/interfaces/IEasyPagesPageHookProps.d.ts +1 -1
  9. package/lib/components/atoms/easy-pages/interfaces/IEasyPagesPageHookProps.d.ts.map +1 -1
  10. package/lib/components/molecules/SpHttp/IJSFetchReturn.d.ts +4 -3
  11. package/lib/components/molecules/SpHttp/IJSFetchReturn.d.ts.map +1 -1
  12. package/lib/components/molecules/SpHttp/IJSFetchReturn.js +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/doSpJsFetch copy.d.ts +1 -0
  18. package/lib/components/molecules/SpHttp/doSpJsFetch copy.d.ts.map +1 -0
  19. package/lib/components/molecules/SpHttp/doSpJsFetch copy.js +163 -0
  20. package/lib/components/molecules/SpHttp/doSpJsFetch copy.js.map +1 -0
  21. package/lib/components/molecules/SpHttp/doSpJsFetch.d.ts +61 -2
  22. package/lib/components/molecules/SpHttp/doSpJsFetch.d.ts.map +1 -1
  23. package/lib/components/molecules/SpHttp/doSpJsFetch.js +271 -39
  24. package/lib/components/molecules/SpHttp/doSpJsFetch.js.map +1 -1
  25. package/lib/components/molecules/SpHttp/doSpJsFileFetch.d.ts +3 -1
  26. package/lib/components/molecules/SpHttp/doSpJsFileFetch.d.ts.map +1 -1
  27. package/lib/components/molecules/SpHttp/doSpJsFileFetch.js +7 -8
  28. package/lib/components/molecules/SpHttp/doSpJsFileFetch.js.map +1 -1
  29. package/lib/components/molecules/SpHttp/headerInitUtilities.d.ts +21 -0
  30. package/lib/components/molecules/SpHttp/headerInitUtilities.d.ts.map +1 -0
  31. package/lib/components/molecules/SpHttp/headerInitUtilities.js +45 -0
  32. package/lib/components/molecules/SpHttp/headerInitUtilities.js.map +1 -0
  33. package/lib/components/molecules/process-results/CheckAnyResults.js +1 -1
  34. package/lib/components/molecules/process-results/CheckAnyResults.js.map +1 -1
  35. package/lib/components/molecules/process-results/CheckFpsTypesResults.d.ts +1 -0
  36. package/lib/components/molecules/process-results/CheckFpsTypesResults.d.ts.map +1 -0
  37. package/lib/components/molecules/process-results/CheckFpsTypesResults.js +45 -0
  38. package/lib/components/molecules/process-results/CheckFpsTypesResults.js.map +1 -0
  39. package/lib/components/molecules/process-results/CheckItemsResults.d.ts +1 -10
  40. package/lib/components/molecules/process-results/CheckItemsResults.d.ts.map +1 -1
  41. package/lib/components/molecules/process-results/CheckItemsResults.js +7 -6
  42. package/lib/components/molecules/process-results/CheckItemsResults.js.map +1 -1
  43. package/lib/components/molecules/process-results/IFpsItemsReturn.d.ts +14 -0
  44. package/lib/components/molecules/process-results/IFpsItemsReturn.d.ts.map +1 -0
  45. package/lib/components/molecules/process-results/IFpsItemsReturn.js +2 -0
  46. package/lib/components/molecules/process-results/IFpsItemsReturn.js.map +1 -0
  47. package/lib/components/molecules/process-results/Logging.d.ts +0 -2
  48. package/lib/components/molecules/process-results/Logging.d.ts.map +1 -1
  49. package/lib/components/molecules/process-results/Logging.js +47 -49
  50. package/lib/components/molecules/process-results/Logging.js.map +1 -1
  51. package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts +1 -1
  52. package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts.map +1 -1
  53. package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.d.ts +1 -1
  54. package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.d.ts.map +1 -1
  55. package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.js +3 -1
  56. package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.js.map +1 -1
  57. package/lib/components/molecules/process-results/createErrorFpsFileReturn.js +1 -1
  58. package/lib/components/molecules/process-results/createErrorFpsFileReturn.js.map +1 -1
  59. package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.d.ts +1 -1
  60. package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.d.ts.map +1 -1
  61. package/lib/components/molecules/state-source/IStateSource.d.ts +1 -1
  62. package/lib/components/molecules/state-source/IStateSource.d.ts.map +1 -1
  63. package/lib/components/molecules/state-source/IStateSource.js +3 -1
  64. package/lib/components/molecules/state-source/IStateSource.js.map +1 -1
  65. package/lib/restAPIs/lists/files/getFileEmbedUrl.d.ts +2 -3
  66. package/lib/restAPIs/lists/files/getFileEmbedUrl.d.ts.map +1 -1
  67. package/lib/restAPIs/lists/files/getFileEmbedUrl.js +10 -11
  68. package/lib/restAPIs/lists/files/getFileEmbedUrl.js.map +1 -1
  69. package/lib/restAPIs/lists/files/postSourceFilesAPI.d.ts +1 -1
  70. package/lib/restAPIs/lists/files/postSourceFilesAPI.d.ts.map +1 -1
  71. package/lib/restAPIs/lists/files/postSourceFilesAPI.js.map +1 -1
  72. package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts +1 -1
  73. package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts.map +1 -1
  74. package/lib/restAPIs/lists/items/getSourceItemsAPI.js +57 -14
  75. package/lib/restAPIs/lists/items/getSourceItemsAPI.js.map +1 -1
  76. package/lib/restAPIs/lists/items/postSourceItemsAPI.d.ts +1 -1
  77. package/lib/restAPIs/lists/items/postSourceItemsAPI.d.ts.map +1 -1
  78. package/lib/restAPIs/lists/items/postSourceItemsAPI.js +7 -14
  79. package/lib/restAPIs/lists/items/postSourceItemsAPI.js.map +1 -1
  80. package/lib/restAPIs/lists/items/updateAnyItemAPI.d.ts +19 -0
  81. package/lib/restAPIs/lists/items/updateAnyItemAPI.d.ts.map +1 -0
  82. package/lib/restAPIs/lists/items/updateAnyItemAPI.js +71 -0
  83. package/lib/restAPIs/lists/items/updateAnyItemAPI.js.map +1 -0
  84. package/lib/restAPIs/lists/items/updateCommandItemAPI.d.ts +44 -0
  85. package/lib/restAPIs/lists/items/updateCommandItemAPI.d.ts.map +1 -0
  86. package/lib/restAPIs/lists/items/updateCommandItemAPI.js +75 -0
  87. package/lib/restAPIs/lists/items/updateCommandItemAPI.js.map +1 -0
  88. package/lib/restAPIs/lists/lists/getSourceListsAPI.d.ts +2 -2
  89. package/lib/restAPIs/lists/lists/getSourceListsAPI.d.ts.map +1 -1
  90. package/lib/restAPIs/lists/lists/getSourceListsAPI.js +10 -13
  91. package/lib/restAPIs/lists/lists/getSourceListsAPI.js.map +1 -1
  92. package/lib/restAPIs/logging/saveErrorToLog.d.ts +2 -0
  93. package/lib/restAPIs/logging/saveErrorToLog.d.ts.map +1 -1
  94. package/lib/restAPIs/logging/saveErrorToLog.js +18 -9
  95. package/lib/restAPIs/logging/saveErrorToLog.js.map +1 -1
  96. package/lib/restAPIs/logging/saveErrorToLogOriginal.d.ts +1 -0
  97. package/lib/restAPIs/logging/saveErrorToLogOriginal.d.ts.map +1 -0
  98. package/lib/restAPIs/logging/saveErrorToLogOriginal.js +45 -0
  99. package/lib/restAPIs/logging/saveErrorToLogOriginal.js.map +1 -0
  100. package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts +3 -0
  101. package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts.map +1 -1
  102. package/lib/restAPIs/sites/groups/getGroupMembersAPI.js +61 -14
  103. package/lib/restAPIs/sites/groups/getGroupMembersAPI.js.map +1 -1
  104. package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.d.ts.map +1 -1
  105. package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js +44 -17
  106. package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js.map +1 -1
  107. package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts.map +1 -1
  108. package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js +8 -12
  109. package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js.map +1 -1
  110. package/lib/restAPIs/sites/groups/getWebGroupInfoBatchAPI.js +1 -1
  111. package/lib/restAPIs/sites/groups/getWebGroupInfoBatchAPI.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 +20 -23
  115. package/lib/restAPIs/sites/sites/getSiteAPI.js.map +1 -1
  116. package/lib/restAPIs/sites/users/getSiteUsersAPI.d.ts.map +1 -1
  117. package/lib/restAPIs/sites/users/getSiteUsersAPI.js +7 -13
  118. package/lib/restAPIs/sites/users/getSiteUsersAPI.js.map +1 -1
  119. package/lib/restAPIs/sites/users/getSiteUsersBatchAPI.d.ts.map +1 -1
  120. package/lib/restAPIs/sites/users/getSiteUsersBatchAPI.js +5 -11
  121. package/lib/restAPIs/sites/users/getSiteUsersBatchAPI.js.map +1 -1
  122. package/lib/types/fps-returns/common/IFPSBaseContentType.d.ts +8 -0
  123. package/lib/types/fps-returns/common/IFPSBaseContentType.d.ts.map +1 -1
  124. package/lib/types/fps-returns/common/IFpsErrorObject.d.ts +8 -2
  125. package/lib/types/fps-returns/common/IFpsErrorObject.d.ts.map +1 -1
  126. package/lib/types/fps-returns/sites/IFpsSiteReturn.d.ts +1 -1
  127. package/lib/types/fps-returns/sites/IFpsSiteReturn.d.ts.map +1 -1
  128. package/lib/types/fps-returns/sites/groups/IGroupReturns.d.ts +1 -1
  129. package/lib/types/fps-returns/sites/groups/IGroupReturns.d.ts.map +1 -1
  130. package/lib/types/fps-returns/sites/update/IFPSItemUpdateResultObj.d.ts +2 -1
  131. package/lib/types/fps-returns/sites/update/IFPSItemUpdateResultObj.d.ts.map +1 -1
  132. package/lib/types/fps-returns/sites/users/IFpsUsersReturn.d.ts +1 -1
  133. package/lib/types/fps-returns/sites/users/IFpsUsersReturn.d.ts.map +1 -1
  134. package/lib/types/fps-returns/sites/users/ISiteUserResults.d.ts +1 -1
  135. package/lib/types/fps-returns/sites/users/ISiteUserResults.d.ts.map +1 -1
  136. package/package.json +1 -1
@@ -2,10 +2,8 @@
2
2
  * 2024-09-29: Migrated from src\pnpjs\SourceItems\getSourceItems.ts
3
3
  */
4
4
  import { SourcePropsNoListTitle, SourcePropsNoWebUrl } from '../../../components/molecules/source-props/ISourceProps'; ///ISourceProps';
5
- import { checkItemsResults } from '../../../components/molecules/process-results/CheckItemsResults';
6
- import { startPerformOpV2, updatePerformanceEndV2 } from "../../../components/molecules/Performance/functions";
7
5
  import { check4This } from "../../../logic/Links/CheckSearch";
8
- import { doSpJsFetchOrPost } from "../../../components/molecules/SpHttp/doSpJsFetch";
6
+ import { doSpJsFetchOrPostAndCheck } from "../../../components/molecules/SpHttp/doSpJsFetch";
9
7
  import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
10
8
  import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
11
9
  import { getTodayRestFilter } from './getTodayRestFilter';
@@ -30,8 +28,6 @@ export async function getSourceItemsUniquePermissionsAPI(sourceProps, alertMe, c
30
28
  * @returns
31
29
  */
32
30
  export async function getSourceItemsAPI(sourceProps, alertMe, consoleLog) {
33
- const { performanceSettings } = sourceProps;
34
- const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
35
31
  const { listTitle, orderBy, orderBy2, fetchCount, restFilter, selectThese, expandThese, skip } = sourceProps;
36
32
  // 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
37
33
  const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
@@ -77,24 +73,71 @@ export async function getSourceItemsAPI(sourceProps, alertMe, consoleLog) {
77
73
  fetchAPI += `$top=${fetchCount}&`;
78
74
  if (skip)
79
75
  fetchAPI += `$skip=${skip}&`;
80
- const initialResult = await doSpJsFetchOrPost(fetchAPI, 'GET', sourceProps.digestValue ? sourceProps.digestValue : '', '', null);
76
+ const result = await doSpJsFetchOrPostAndCheck(fetchAPI, 'GET', sourceProps.digestValue ? sourceProps.digestValue : '', '', alertMe, consoleLog, 'item', null);
81
77
  // Add any required custom logic here
82
78
  // if ( resultHubSites.ok ) {
83
79
  // resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
84
80
  // }
85
- const result = checkItemsResults(initialResult, `fps-core-v7: getSourceItemsAPI ~ 79`, alertMe, consoleLog);
86
- result.fpsContentType = !sourceProps.fpsContentType ? ['item'] : sourceProps.fpsContentType;
81
+ result.unifiedPerformanceOps.fetch.label = `fetch${listTitle}`;
82
+ // result.fpsContentType = !sourceProps.fpsContentType ? [ 'item' ] : sourceProps.fpsContentType;
87
83
  // 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
88
- if (result.fpsContentType.indexOf('item') < 0)
89
- result.fpsContentType.push('item');
90
- result.unifiedPerformanceOps.fetch = performanceSettings ?
91
- updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items ? result.items.length : 0 })
92
- : null; // 2024-09-29: set null as any to pass build error.
93
- result.fetchOp = result.unifiedPerformanceOps.fetch;
84
+ // if ( result.fpsContentType.indexOf( 'item' ) < 0 ) result.fpsContentType.push( 'item' );
94
85
  if (check4This(`fpsShowFetchResults=true`) === true) {
95
86
  console.log(`fps-core-v7 COMPLETE: getSourceItemsAPI ~ 90`, result);
96
87
  }
97
88
  ;
98
89
  return result;
99
90
  }
91
+ // export async function getSourceItemsAPI( sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined, ): Promise<IFpsItemsReturn> {
92
+ // const { performanceSettings } = sourceProps;
93
+ // const fetchOp = performanceSettings ? startPerformOpV2( performanceSettings ) : null;
94
+ // const { listTitle, orderBy, orderBy2, fetchCount, restFilter, selectThese, expandThese, skip } = sourceProps;
95
+ // // 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
96
+ // const useUrl: string = getAbsoluteWebUrlFromSourceProps( sourceProps );
97
+ // let fetchAPI: string = `${useUrl}/_api/web/lists/getbytitle('${listTitle}')/items?`;
98
+ // if ( !useUrl ) {
99
+ // // NO WebURL... Throw Alert
100
+ // if ( alertMe === true ) alert(`${listTitle} ${SourcePropsNoWebUrl}`);
101
+ // return createErrorFpsListReturn( useUrl, listTitle);
102
+ // }
103
+ // if ( !listTitle ) {
104
+ // // NO WebURL... Throw Alert
105
+ // if ( alertMe === true ) alert(`${''} ${SourcePropsNoListTitle}`);
106
+ // return createErrorFpsListReturn( useUrl, listTitle);
107
+ // }
108
+ // /**
109
+ // SAMPLE Full SharePoint Items Rest call:
110
+ // https://example.sharepoint.com/sites/MySite/_api/web/lists/getbytitle('MyList')/items?
111
+ // $select=Id,Title,EULAText,ExpandedField1/Id,ExpandedField1/Title,ExpandedField2/Id,ExpandedField2/Title&
112
+ // $expand=ExpandedField1,ExpandedField2&
113
+ // $filter=Title eq 'SomeTitle'&
114
+ // $orderby=Id desc
115
+ // */
116
+ // if ( selectThese && selectThese.length > 0 ) fetchAPI+= `$select=${ selectThese.join(',')}&`;
117
+ // if ( expandThese && expandThese.length > 0 ) fetchAPI+= `$expand=${ expandThese.join(',')}&`;
118
+ // // 2024-12-05: Added getTodayRestFilter from fps-Pnp2 fetchAnyItems
119
+ // if ( restFilter ) fetchAPI+= `$filter=${ getTodayRestFilter(restFilter) }&`;
120
+ // const orderBys: string[] = [];
121
+ // if ( orderBy ) orderBys.push( `${ orderBy.prop } ${ orderBy.order }` ) ;
122
+ // if ( orderBy2 ) orderBys.push( `${ orderBy2.prop } ${ orderBy2.order }` );
123
+ // if ( orderBys.length > 0 ) fetchAPI+= `$orderby=${ orderBys.join(',') }&`;
124
+ // // 2024-12-05: changed to fetchCount > 0 because it was doing top=null which caused an error
125
+ // if ( fetchCount > 0 ) fetchAPI+= `$top=${ fetchCount }&`;
126
+ // if ( skip ) fetchAPI+= `$skip=${ skip }&`;
127
+ // const initialResult = await doSpJsFetchOrPost( fetchAPI, 'GET', sourceProps.digestValue ? sourceProps.digestValue : '', '', null );
128
+ // // Add any required custom logic here
129
+ // // if ( resultHubSites.ok ) {
130
+ // // resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
131
+ // // }
132
+ // const result : IFpsItemsReturn = checkItemsResults( initialResult, `fps-core-v7: getSourceItemsAPI ~ 79`, alertMe, consoleLog );
133
+ // result.fpsContentType = !sourceProps.fpsContentType ? [ 'item' ] : sourceProps.fpsContentType;
134
+ // // 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
135
+ // if ( result.fpsContentType.indexOf( 'item' ) < 0 ) result.fpsContentType.push( 'item' );
136
+ // result.unifiedPerformanceOps.fetch = performanceSettings ?
137
+ // updatePerformanceEndV2( { op: fetchOp as IPerformanceOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items ? result.items.length : 0 })
138
+ // : null as any; // 2024-09-29: set null as any to pass build error.
139
+ // result.fetchOp = result.unifiedPerformanceOps.fetch;
140
+ // if ( check4This( `fpsShowFetchResults=true` ) === true ) { console.log( `fps-core-v7 COMPLETE: getSourceItemsAPI ~ 90`, result ) };
141
+ // return result;
142
+ // }
100
143
  //# sourceMappingURL=getSourceItemsAPI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSourceItemsAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsAPI.ts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Q,SAAS,EAAE,CAAC;IAC/D,iGAAiG;IAEjG,+FAA+F;IAC/F,4FAA4F;IAE5F,IAAK,UAAU,CAAE,0BAA0B,CAAE,KAAK,IAAI,EAAG;QAAE,OAAO,CAAC,GAAG,CAAE,8CAA8C,EAAE,MAAM,CAAE,CAAA;KAAE;IAAA,CAAC;IAEnI,OAAO,MAAM,CAAC;AAEhB,CAAC;AAED,oKAAoK;AAEpK,iDAAiD;AACjD,0FAA0F;AAE1F,kHAAkH;AAElH,2IAA2I;AAC3I,4EAA4E;AAC5E,yFAAyF;AAEzF,qBAAqB;AACrB,kCAAkC;AAClC,4EAA4E;AAC5E,2DAA2D;AAC3D,MAAM;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,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;AAQrH,wBAAsB,kBAAkB,CAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAG,GAAG,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAsD9K"}
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"}
@@ -1,13 +1,9 @@
1
1
  import { SourcePropsNoListTitle, SourcePropsNoWebUrl } from '../../../components/molecules/source-props/ISourceProps'; ///ISourceProps';
2
- import { checkItemsResults } from '../../../components/molecules/process-results/CheckItemsResults';
3
- import { startPerformOpV2, updatePerformanceEndV2 } from "../../../components/molecules/Performance/functions";
4
2
  import { check4This } from "../../../logic/Links/CheckSearch";
5
- import { doSpJsFetchOrPost } from "../../../components/molecules/SpHttp/doSpJsFetch";
3
+ import { doSpJsFetchOrPostAndCheck } from "../../../components/molecules/SpHttp/doSpJsFetch";
6
4
  import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
7
5
  import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
8
6
  export async function postSourceItemsAPI(sourceProps, saveItem, alertMe, consoleLog) {
9
- const { performanceSettings } = sourceProps;
10
- const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
11
7
  const { listTitle, } = sourceProps;
12
8
  // 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
13
9
  const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
@@ -29,20 +25,17 @@ export async function postSourceItemsAPI(sourceProps, saveItem, alertMe, console
29
25
  alert(`${''} ${SourcePropsNoListTitle}`);
30
26
  return createErrorFpsListReturn(useUrl, listTitle);
31
27
  }
32
- const initialResult = await doSpJsFetchOrPost(postAPI, 'POST', sourceProps.digestValue ? sourceProps.digestValue : '', '', saveItem);
28
+ const result = await doSpJsFetchOrPostAndCheck(postAPI, 'POST', sourceProps.digestValue ? sourceProps.digestValue : '', '', alertMe, consoleLog, 'item', saveItem);
33
29
  // Add any required custom logic here
34
30
  // if ( resultHubSites.ok ) {
35
31
  // resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
36
32
  // }
37
- const result = checkItemsResults(initialResult, `fps-core-v7: postSourceItems ~ 46`, alertMe, consoleLog);
38
- result.fpsContentType = !sourceProps.fpsContentType ? ['item'] : sourceProps.fpsContentType;
33
+ // result.fpsContentType = !sourceProps.fpsContentType ? [ 'item' ] : sourceProps.fpsContentType;
39
34
  // 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
40
- if (result.fpsContentType.indexOf('item') < 0)
41
- result.fpsContentType.push('item');
42
- result.unifiedPerformanceOps.save = performanceSettings ?
43
- updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: 1 })
44
- : null; // 2024-09-29: set null as any to pass build error.
45
- result.fetchOp = result.unifiedPerformanceOps.fetch;
35
+ // if ( result.fpsContentType.indexOf( 'item' ) < 0 ) result.fpsContentType.push( 'item' );
36
+ result.unifiedPerformanceOps.fetch.label = `save ${listTitle}`;
37
+ // result.unifiedPerformanceOps.fetch.c = 1;
38
+ result.saveOp = result.unifiedPerformanceOps.fetch;
46
39
  if (check4This(`fpsShowFetchResults=true`) === true) {
47
40
  console.log(`fps-core-v7 COMPLETE: postSourceItems ~ 56`, result);
48
41
  }
@@ -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;AACtJ,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAErF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;AAE5G,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAE,WAAyB,EAAE,QAAc,EAAE,OAA4B,EAAE,UAA+B;IAEhJ,MAAM,EAAE,mBAAmB,EAAE,GAAG,WAAW,CAAC;IAC5C,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,CAAC,gBAAgB,CAAE,mBAAmB,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAErF,MAAM,EAAE,SAAS,GAAG,GAAG,WAAW,CAAC;IAEnC,sIAAsI;IACtI,MAAM,MAAM,GAAW,gCAAgC,CAAE,WAAW,CAAE,CAAC;IAEvE;;;;MAIE;IAEA,IA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AAC,SAAS,EAAG;QAChB,2BAA2B;QAC3B,IAAK,OAAO,KAAK,IAAI;YAAG,KAAK,CAAC,GAAG,EAAE,IAAI,sBAAsB,EAAE,CAAC,CAAC;QACjE,OAAO,wBAAwB,CAAE,MAAM,EAAE,SAAS,CAAE,CAAC;KACtD;IAGD,MAAM,MAAM,GAAG,MAAM,yBAAyB,CAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAE,CAAC;IAErK,sCAAsC;IACtC,+BAA+B;IAC/B,wEAAwE;IACxE,MAAM;IAEN,iGAAiG;IAEjG,+FAA+F;IAC/F,4FAA4F;IAC5F,MAAM,CAAC,qBAAqB,CAAC,KAAK,CAAC,KAAK,GAAG,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,6EAA6E,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;AAE5G;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAE,WAAyB,EAAE,QAAa,EAAE,MAAc,EAAE,OAA4B,EAAE,UAA+B;IAE7J,MAAM,EAAE,SAAS,GAAG,GAAG,WAAW,CAAC;IAEnC,sIAAsI;IACtI,MAAM,MAAM,GAAW,gCAAgC,CAAE,WAAW,CAAE,CAAC;IAEvE;;;;MAIE;IAEF,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,wBAAwB,CAAE,MAAM,EAAE,SAAS,CAAE,CAAC;KACtD;IAED,IAAI,OAAO,GAAW,GAAG,MAAM,+BAA+B,SAAS,YAAY,MAAM,GAAG,CAAC;IAC7F;;OAEG;IAOH;;;;;;;OAOG;IAOH,MAAM,MAAM,GAAG,MAAM,yBAAyB,CAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAE,CAAC;IAEtK,sCAAsC;IACtC,+BAA+B;IAC/B,wEAAwE;IACxE,MAAM;IAEN,iGAAiG;IAEjG,+FAA+F;IAC/F,4FAA4F;IAC5F,MAAM,CAAC,qBAAqB,CAAC,KAAK,CAAC,KAAK,GAAG,UAAU,SAAS,EAAE,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,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,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);
59
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getSourceListsAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/lists/getSourceListsAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,GAAG,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAgB,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;AAI5G,4BAA4B;AAC5B,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAE,WAAyB,EAAE,OAA4B,EAAE,UAA+B;IACjI,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAE,WAAW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AW,GAAG,CAAC;IACnJ,IAAK,UAAU;QAAG,QAAQ,IAAG,WAAY,UAAW,GAAG,CAAC;IAExD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,IAAK,OAAO;QAAG,QAAQ,CAAC,IAAI,CAAE,GAAI,OAAO,CAAC,IAAK,IAAK,OAAO,CAAC,KAAM,EAAE,CAAE,CAAE;IAExE,MAAM,MAAM,GAAG,MAAM,yBAAyB,CAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAE,CAAC;IAEjK,sCAAsC;IACtC,+BAA+B;IAC/B,wEAAwE;IACxE,MAAM;IAEN,mIAAmI;IACnI,iGAAiG;IAEjG,+FAA+F;IAC/F,4FAA4F;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
@@ -1 +1 @@
1
- {"version":3,"file":"saveErrorToLog.js","sourceRoot":"","sources":["../../../src/restAPIs/logging/saveErrorToLog.ts"],"names":[],"mappings":"AACA,qGAAqG;AACrG,gHAAgH;AAChH,gGAAgG;AAEhG,OAAO,EAAE,4BAA4B,EAAE,MAAM,qFAAqF,CAAC;AACnI,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExE;;;;GAIG;AAEH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,SAA0B,EAAE,UAA0B;IAEzF,gDAAgD;IAChD,IAAK,UAAU,CAAC,SAAS,KAAK,IAAI,EAAG;QAAE,OAAQ;KAAE;IAEjD,uDAAuD;IACvD,IAAK,CAAC,SAAS,EAAG;QAAE,OAAQ;KAAE;IAE9B,MAAM,WAAW,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC;IAEtE,IAAI,KAAK,GAAa,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEhE,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,CAAC,CAAC;IACtD,IAAI,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACzE,IAAI,YAAY,GAAG,aAAa,CAAC,MAAM,GAAG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