From b806f6bf39902b572482ce799f9a9b4ff46c51dc Mon Sep 17 00:00:00 2001 From: Bert Jansen Date: Tue, 10 Jan 2023 16:01:38 +0100 Subject: [PATCH] Added support for adding, updating and removing audiences on navigation nodes #1065 --- src/sdk/CHANGELOG.md | 1 + ...ingAudienceTargeting-0-00000.response.json | 1 + ...ingAudienceTargeting-0-00001.response.json | 1 + ...ingAudienceTargeting-0-00002.response.json | 1 + ...ingAudienceTargeting-0-00003.response.json | 1 + ...ingAudienceTargeting-0-00004.response.json | 1 + ...ingAudienceTargeting-0-00005.response.json | 1 + ...ingAudienceTargeting-0-00006.response.json | 1 + .../AddQuickLaunchItems-0-00000.response.json | 2 +- .../AddQuickLaunchItems-0-00001.response.json | 2 +- .../AddQuickLaunchItems-0-00002.response.json | 2 +- .../AddQuickLaunchItems-0-00003.response.json | 2 +- .../AddQuickLaunchItems-0-00004.response.json | 2 +- .../AddQuickLaunchItems-0-00005.response.json | 2 +- .../AddQuickLaunchItems-0-00006.response.json | 2 +- .../AddQuickLaunchItems-0-00007.response.json | 2 +- .../AddQuickLaunchItems-0-00008.response.json | 2 +- .../AddQuickLaunchItems-0-00009.response.json | 2 +- .../AddQuickLaunchItems-0-00010.response.json | 2 +- .../AddQuickLaunchItems-0-00011.response.json | 2 +- .../AddQuickLaunchItems-0-00012.response.json | 2 +- .../AddQuickLaunchItems-0-00013.response.json | 2 +- .../AddQuickLaunchItems-0-00014.response.json | 2 +- ...UpdateNavigationNode-0-00000.response.json | 2 +- ...UpdateNavigationNode-0-00001.response.json | 2 +- ...UpdateNavigationNode-0-00002.response.json | 2 +- ...UpdateNavigationNode-0-00003.response.json | 2 +- ...UpdateNavigationNode-0-00004.response.json | 2 +- ...UpdateNavigationNode-0-00005.response.json | 2 +- ...ingAudienceTargeting-0-00000.response.json | 1 + ...ingAudienceTargeting-0-00001.response.json | 1 + ...ingAudienceTargeting-0-00002.response.json | 1 + ...ingAudienceTargeting-0-00003.response.json | 1 + ...ingAudienceTargeting-0-00004.response.json | 1 + ...ingAudienceTargeting-0-00005.response.json | 1 + ...ingAudienceTargeting-0-00006.response.json | 1 + ...ingAudienceTargeting-0-00007.response.json | 1 + ...ingAudienceTargeting-0-00008.response.json | 1 + ...ingAudienceTargeting-0-00009.response.json | 1 + ...ingAudienceTargeting-0-00010.response.json | 1 + .../SharePoint/NavigationTests.cs | 84 ++++++++++++ .../Settings/Internal/NavigationNode.cs | 124 +++++++++++++++--- .../Settings/Public/INavigationNode.cs | 4 +- .../Public/Options/NavigationNodeOptions.cs | 10 +- 44 files changed, 238 insertions(+), 45 deletions(-) create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00000.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00001.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00002.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00003.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00004.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00005.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00006.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00000.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00001.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00002.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00003.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00004.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00005.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00006.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00007.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00008.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00009.response.json create mode 100644 src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00010.response.json diff --git a/src/sdk/CHANGELOG.md b/src/sdk/CHANGELOG.md index 0a93b65472..23040b7b88 100644 --- a/src/sdk/CHANGELOG.md +++ b/src/sdk/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Option to get a file by link (any fully qualified link to a file, including sharing links) using the `GetFileByLink` methods on `IWeb` #1054 [jansenbe - Bert Jansen] - Configure whether the web templates dialog shows up or not via the `WebTemplatesGalleryFirstRunEnabled` property on `IWeb` #1057 [jansenbe - Bert Jansen] - Added `EnableAudienceTargeting` methods on `IList` [jansenbe - Bert Jansen] +- Added support for adding, updating and removing audiences on navigation nodes #1065 [jansenbe - Bert Jansen] ### Changed diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00000.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00000.response.json new file mode 100644 index 0000000000..ef4fcc604d --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00000.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e4e58aa0-c0d0-5000-f4a9-afcf5e88671c","SPClientServiceRequestDuration":"75","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022RegionalSettings\u0022:{\u0022TimeZone\u0022:{\u0022Description\u0022:\u0022(UTC-08:00) Pacific Time (US and Canada)\u0022,\u0022Id\u0022:13,\u0022Information\u0022:{\u0022Bias\u0022:480,\u0022DaylightBias\u0022:-60,\u0022StandardBias\u0022:0}},\u0022AdjustHijriDays\u0022:0,\u0022AlternateCalendarType\u0022:0,\u0022AM\u0022:\u0022AM\u0022,\u0022CalendarType\u0022:1,\u0022Collation\u0022:25,\u0022CollationLCID\u0022:2070,\u0022DateFormat\u0022:0,\u0022DateSeparator\u0022:\u0022/\u0022,\u0022DecimalSeparator\u0022:\u0022.\u0022,\u0022DigitGrouping\u0022:\u00223;0\u0022,\u0022FirstDayOfWeek\u0022:0,\u0022FirstWeekOfYear\u0022:0,\u0022IsEastAsia\u0022:false,\u0022IsRightToLeft\u0022:false,\u0022IsUIRightToLeft\u0022:false,\u0022ListSeparator\u0022:\u0022,\u0022,\u0022LocaleId\u0022:1033,\u0022NegativeSign\u0022:\u0022-\u0022,\u0022NegNumberMode\u0022:1,\u0022PM\u0022:\u0022PM\u0022,\u0022PositiveSign\u0022:\u0022\u0022,\u0022ShowWeeks\u0022:false,\u0022ThousandSeparator\u0022:\u0022,\u0022,\u0022Time24\u0022:false,\u0022TimeMarkerPosition\u0022:0,\u0022TimeSeparator\u0022:\u0022:\u0022,\u0022WorkDayEndHour\u0022:1020,\u0022WorkDays\u0022:62,\u0022WorkDayStartHour\u0022:480},\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022Url\u0022:\u0022https://bertonline.sharepoint.com/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00001.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00001.response.json new file mode 100644 index 0000000000..847161eb8e --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00001.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e4e58aa0-b0dd-5000-f4a9-a09b3f3cf8fb","SPClientServiceRequestDuration":"10","X-SharePointHealthScore":"2","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022GroupId\u0022:\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022,\u0022Id\u0022:\u0022f92f9e40-1110-43ef-aa0e-0822e13fb7ba\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00002.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00002.response.json new file mode 100644 index 0000000000..dc6127464d --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00002.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e4e58aa0-80e2-5000-f4a9-ad24862bccc7","SPClientServiceRequestDuration":"11","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022NavAudienceTargetingEnabled\u0022:false}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00003.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00003.response.json new file mode 100644 index 0000000000..683e3129f5 --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00003.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":204,"Headers":{"SPRequestGuid":"e4e58aa0-00ea-5000-f4a9-a36a46fe0f0c","SPClientServiceRequestDuration":"15","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00004.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00004.response.json new file mode 100644 index 0000000000..80428cebb5 --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00004.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"e4e58aa0-00f0-5000-f4a9-a20024148a9e","SPClientServiceRequestDuration":"66","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:[\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022],\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3535,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Parent Node\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00005.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00005.response.json new file mode 100644 index 0000000000..123333ea35 --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00005.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e4e58aa0-d0f8-5000-f4a9-a01ce0d0c0f0","SPClientServiceRequestDuration":"28","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00006.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00006.response.json new file mode 100644 index 0000000000..b5e18b9e3b --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItemUsingAudienceTargeting-0-00006.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":204,"Headers":{"SPRequestGuid":"e4e58aa0-80fe-5000-f4a9-a8bddb84daaf","SPClientServiceRequestDuration":"14","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00000.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00000.response.json index 0ddd2096ba..0fe92f8fbd 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00000.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00000.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"6f6c30a0-f07c-3000-f132-8e12b820c993","SPClientServiceRequestDuration":"26","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022RegionalSettings\u0022:{\u0022TimeZone\u0022:{\u0022Description\u0022:\u0022(UTC-08:00) Pacific Time (US and Canada)\u0022,\u0022Id\u0022:13,\u0022Information\u0022:{\u0022Bias\u0022:480,\u0022DaylightBias\u0022:-60,\u0022StandardBias\u0022:0}},\u0022AdjustHijriDays\u0022:0,\u0022AlternateCalendarType\u0022:0,\u0022AM\u0022:\u0022AM\u0022,\u0022CalendarType\u0022:1,\u0022Collation\u0022:25,\u0022CollationLCID\u0022:2070,\u0022DateFormat\u0022:0,\u0022DateSeparator\u0022:\u0022/\u0022,\u0022DecimalSeparator\u0022:\u0022.\u0022,\u0022DigitGrouping\u0022:\u00223;0\u0022,\u0022FirstDayOfWeek\u0022:0,\u0022FirstWeekOfYear\u0022:0,\u0022IsEastAsia\u0022:false,\u0022IsRightToLeft\u0022:false,\u0022IsUIRightToLeft\u0022:false,\u0022ListSeparator\u0022:\u0022,\u0022,\u0022LocaleId\u0022:1033,\u0022NegativeSign\u0022:\u0022-\u0022,\u0022NegNumberMode\u0022:1,\u0022PM\u0022:\u0022PM\u0022,\u0022PositiveSign\u0022:\u0022\u0022,\u0022ShowWeeks\u0022:false,\u0022ThousandSeparator\u0022:\u0022,\u0022,\u0022Time24\u0022:false,\u0022TimeMarkerPosition\u0022:0,\u0022TimeSeparator\u0022:\u0022:\u0022,\u0022WorkDayEndHour\u0022:1020,\u0022WorkDays\u0022:62,\u0022WorkDayStartHour\u0022:480},\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022Url\u0022:\u0022https://bertonline.sharepoint.com/sites/prov-2\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"ffe28aa0-20ef-5000-f4a9-a5abacf43f91","SPClientServiceRequestDuration":"8","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022RegionalSettings\u0022:{\u0022TimeZone\u0022:{\u0022Description\u0022:\u0022(UTC-08:00) Pacific Time (US and Canada)\u0022,\u0022Id\u0022:13,\u0022Information\u0022:{\u0022Bias\u0022:480,\u0022DaylightBias\u0022:-60,\u0022StandardBias\u0022:0}},\u0022AdjustHijriDays\u0022:0,\u0022AlternateCalendarType\u0022:0,\u0022AM\u0022:\u0022AM\u0022,\u0022CalendarType\u0022:1,\u0022Collation\u0022:25,\u0022CollationLCID\u0022:2070,\u0022DateFormat\u0022:0,\u0022DateSeparator\u0022:\u0022/\u0022,\u0022DecimalSeparator\u0022:\u0022.\u0022,\u0022DigitGrouping\u0022:\u00223;0\u0022,\u0022FirstDayOfWeek\u0022:0,\u0022FirstWeekOfYear\u0022:0,\u0022IsEastAsia\u0022:false,\u0022IsRightToLeft\u0022:false,\u0022IsUIRightToLeft\u0022:false,\u0022ListSeparator\u0022:\u0022,\u0022,\u0022LocaleId\u0022:1033,\u0022NegativeSign\u0022:\u0022-\u0022,\u0022NegNumberMode\u0022:1,\u0022PM\u0022:\u0022PM\u0022,\u0022PositiveSign\u0022:\u0022\u0022,\u0022ShowWeeks\u0022:false,\u0022ThousandSeparator\u0022:\u0022,\u0022,\u0022Time24\u0022:false,\u0022TimeMarkerPosition\u0022:0,\u0022TimeSeparator\u0022:\u0022:\u0022,\u0022WorkDayEndHour\u0022:1020,\u0022WorkDays\u0022:62,\u0022WorkDayStartHour\u0022:480},\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022Url\u0022:\u0022https://bertonline.sharepoint.com/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00001.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00001.response.json index 42a2cf100d..3efef6f585 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00001.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00001.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"6f6c30a0-2082-3000-e36d-78b2df439aa4","SPClientServiceRequestDuration":"8","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022GroupId\u0022:\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022,\u0022Id\u0022:\u0022f92f9e40-1110-43ef-aa0e-0822e13fb7ba\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"ffe28aa0-d0fc-5000-f4a9-a5ff85f44964","SPClientServiceRequestDuration":"8","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022GroupId\u0022:\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022,\u0022Id\u0022:\u0022f92f9e40-1110-43ef-aa0e-0822e13fb7ba\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00002.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00002.response.json index 64bf4d3ccb..6a3fd3e395 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00002.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00002.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"6f6c30a0-2086-3000-fd80-a9ae42dc8a7f","SPClientServiceRequestDuration":"36","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3213,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Parent Node\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"01e38aa0-e072-5000-f4a9-ae41b637e948","SPClientServiceRequestDuration":"68","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3524,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Parent Node\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00003.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00003.response.json index 9e58093043..4acc198ac3 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00003.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00003.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"6f6c30a0-908b-3000-f132-866c1072d342","SPClientServiceRequestDuration":"35","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3214,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 0\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"03e38aa0-e0d3-5000-f4a9-a3128b081f36","SPClientServiceRequestDuration":"78","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3525,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 0\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00004.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00004.response.json index 41942326df..eb520e651e 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00004.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00004.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"6f6c30a0-2091-3000-f132-87dbbd6bb391","SPClientServiceRequestDuration":"33","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3215,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 1\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"03e38aa0-80e1-5000-f4a9-accc39fb66b0","SPClientServiceRequestDuration":"70","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3526,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 1\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00005.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00005.response.json index 9ba67cc041..53ecbf6dfe 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00005.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00005.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"6f6c30a0-f096-3000-e1e0-ec28d2700d3c","SPClientServiceRequestDuration":"32","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3216,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 2\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"03e38aa0-a0ec-5000-f4a9-acd7f545e372","SPClientServiceRequestDuration":"127","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3527,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 2\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00006.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00006.response.json index 6b51aefde2..c981a0b908 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00006.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00006.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"6f6c30a0-309c-3000-f132-84cd18eee33f","SPClientServiceRequestDuration":"51","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3217,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 3\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"03e38aa0-60fa-5000-f4a9-a639670f95d2","SPClientServiceRequestDuration":"65","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3528,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 3\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00007.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00007.response.json index baed75a8d9..7d5b467509 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00007.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00007.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"6f6c30a0-50a2-3000-e36d-7803d24908b2","SPClientServiceRequestDuration":"42","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3218,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 4\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"04e38aa0-7004-5000-f4a9-a562aea92975","SPClientServiceRequestDuration":"125","X-SharePointHealthScore":"2","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3529,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 4\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00008.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00008.response.json index c124f368b4..0bc39e4452 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00008.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00008.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"6f6c30a0-50a8-3000-fd80-abd5c8a05406","SPClientServiceRequestDuration":"11","X-SharePointHealthScore":"2","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022value\u0022:[{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3214,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 0\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022},{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3215,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 1\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022},{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3216,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 2\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022},{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3217,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 3\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022},{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3218,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 4\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}]}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"04e38aa0-f012-5000-f4a9-a09a239c4f36","SPClientServiceRequestDuration":"16","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022value\u0022:[{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3525,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 0\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022},{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3526,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 1\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022},{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3527,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 2\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022},{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3528,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 3\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022},{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3529,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Sub node 4\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}]}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00009.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00009.response.json index 9264665e4d..8eb18957e2 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00009.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00009.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"6f6c30a0-d0ab-3000-f132-8728d82aad30","SPClientServiceRequestDuration":"24","X-SharePointHealthScore":"2","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"05e38aa0-00a6-5000-f4a9-a416852fc2b6","SPClientServiceRequestDuration":"30","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00010.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00010.response.json index 5ab13cbee3..74520ac60d 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00010.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00010.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"6f6c30a0-60b0-3000-f132-8ebd70310bc5","SPClientServiceRequestDuration":"20","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"05e38aa0-f0ad-5000-f4a9-a32a989d92ab","SPClientServiceRequestDuration":"24","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00011.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00011.response.json index 97d04431ef..c75367ce00 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00011.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00011.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"6f6c30a0-30b4-3000-e1e0-e6bd75f204f1","SPClientServiceRequestDuration":"22","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"05e38aa0-d0b6-5000-f4a9-a1c7ea27ed1c","SPClientServiceRequestDuration":"35","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00012.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00012.response.json index 648b1ba24e..587b71c313 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00012.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00012.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"6f6c30a0-80b9-3000-f132-8f1fdbff47ac","SPClientServiceRequestDuration":"33","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"05e38aa0-b0be-5000-f4a9-a052180bd79b","SPClientServiceRequestDuration":"124","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00013.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00013.response.json index c220275832..bf56d1bf76 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00013.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00013.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"6f6c30a0-b0be-3000-e36d-7578c82ea4c0","SPClientServiceRequestDuration":"23","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"05e38aa0-c0cc-5000-f4a9-a5206aeeb10f","SPClientServiceRequestDuration":"22","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00014.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00014.response.json index 5146ebf404..b4d6f74c86 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00014.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/AddQuickLaunchItems-0-00014.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"6f6c30a0-b0c2-3000-fd80-a135f2a5d219","SPClientServiceRequestDuration":"42","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"05e38aa0-80d4-5000-f4a9-ab5a1f877900","SPClientServiceRequestDuration":"38","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00000.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00000.response.json index 4e5e7ac0c7..4aeb1fd9a3 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00000.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00000.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"706c30a0-60f3-3000-fd80-ae4c7d654f46","SPClientServiceRequestDuration":"11","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022RegionalSettings\u0022:{\u0022TimeZone\u0022:{\u0022Description\u0022:\u0022(UTC-08:00) Pacific Time (US and Canada)\u0022,\u0022Id\u0022:13,\u0022Information\u0022:{\u0022Bias\u0022:480,\u0022DaylightBias\u0022:-60,\u0022StandardBias\u0022:0}},\u0022AdjustHijriDays\u0022:0,\u0022AlternateCalendarType\u0022:0,\u0022AM\u0022:\u0022AM\u0022,\u0022CalendarType\u0022:1,\u0022Collation\u0022:25,\u0022CollationLCID\u0022:2070,\u0022DateFormat\u0022:0,\u0022DateSeparator\u0022:\u0022/\u0022,\u0022DecimalSeparator\u0022:\u0022.\u0022,\u0022DigitGrouping\u0022:\u00223;0\u0022,\u0022FirstDayOfWeek\u0022:0,\u0022FirstWeekOfYear\u0022:0,\u0022IsEastAsia\u0022:false,\u0022IsRightToLeft\u0022:false,\u0022IsUIRightToLeft\u0022:false,\u0022ListSeparator\u0022:\u0022,\u0022,\u0022LocaleId\u0022:1033,\u0022NegativeSign\u0022:\u0022-\u0022,\u0022NegNumberMode\u0022:1,\u0022PM\u0022:\u0022PM\u0022,\u0022PositiveSign\u0022:\u0022\u0022,\u0022ShowWeeks\u0022:false,\u0022ThousandSeparator\u0022:\u0022,\u0022,\u0022Time24\u0022:false,\u0022TimeMarkerPosition\u0022:0,\u0022TimeSeparator\u0022:\u0022:\u0022,\u0022WorkDayEndHour\u0022:1020,\u0022WorkDays\u0022:62,\u0022WorkDayStartHour\u0022:480},\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022Url\u0022:\u0022https://bertonline.sharepoint.com/sites/prov-2\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"f1e58aa0-5011-5000-f4a9-ac26d09eed27","SPClientServiceRequestDuration":"8","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022RegionalSettings\u0022:{\u0022TimeZone\u0022:{\u0022Description\u0022:\u0022(UTC-08:00) Pacific Time (US and Canada)\u0022,\u0022Id\u0022:13,\u0022Information\u0022:{\u0022Bias\u0022:480,\u0022DaylightBias\u0022:-60,\u0022StandardBias\u0022:0}},\u0022AdjustHijriDays\u0022:0,\u0022AlternateCalendarType\u0022:0,\u0022AM\u0022:\u0022AM\u0022,\u0022CalendarType\u0022:1,\u0022Collation\u0022:25,\u0022CollationLCID\u0022:2070,\u0022DateFormat\u0022:0,\u0022DateSeparator\u0022:\u0022/\u0022,\u0022DecimalSeparator\u0022:\u0022.\u0022,\u0022DigitGrouping\u0022:\u00223;0\u0022,\u0022FirstDayOfWeek\u0022:0,\u0022FirstWeekOfYear\u0022:0,\u0022IsEastAsia\u0022:false,\u0022IsRightToLeft\u0022:false,\u0022IsUIRightToLeft\u0022:false,\u0022ListSeparator\u0022:\u0022,\u0022,\u0022LocaleId\u0022:1033,\u0022NegativeSign\u0022:\u0022-\u0022,\u0022NegNumberMode\u0022:1,\u0022PM\u0022:\u0022PM\u0022,\u0022PositiveSign\u0022:\u0022\u0022,\u0022ShowWeeks\u0022:false,\u0022ThousandSeparator\u0022:\u0022,\u0022,\u0022Time24\u0022:false,\u0022TimeMarkerPosition\u0022:0,\u0022TimeSeparator\u0022:\u0022:\u0022,\u0022WorkDayEndHour\u0022:1020,\u0022WorkDays\u0022:62,\u0022WorkDayStartHour\u0022:480},\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022Url\u0022:\u0022https://bertonline.sharepoint.com/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00001.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00001.response.json index ce1892aa90..3ab03c43b6 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00001.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00001.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"706c30a0-d0f7-3000-f132-8754ae7bf632","SPClientServiceRequestDuration":"8","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022GroupId\u0022:\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022,\u0022Id\u0022:\u0022f92f9e40-1110-43ef-aa0e-0822e13fb7ba\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"f1e58aa0-9021-5000-f4a9-af8e2367ae69","SPClientServiceRequestDuration":"7","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022GroupId\u0022:\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022,\u0022Id\u0022:\u0022f92f9e40-1110-43ef-aa0e-0822e13fb7ba\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00002.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00002.response.json index 0b639cb3ca..8cc116a84a 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00002.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00002.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"706c30a0-70fc-3000-f132-880ec963821a","SPClientServiceRequestDuration":"36","X-SharePointHealthScore":"2","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3243,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:true,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Test node\u0022,\u0022Url\u0022:\u0022https://google.be\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"f1e58aa0-402a-5000-f4a9-a3a0400f6466","SPClientServiceRequestDuration":"60","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3537,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:true,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Test node\u0022,\u0022Url\u0022:\u0022https://google.be\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00003.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00003.response.json index 08e97d1748..17d2724d7a 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00003.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00003.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":204,"Headers":{"SPRequestGuid":"716c30a0-8006-3000-f132-848f61b7ebf6","SPClientServiceRequestDuration":"63","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":204,"Headers":{"SPRequestGuid":"f1e58aa0-4039-5000-f4a9-a2ffe2954b9c","SPClientServiceRequestDuration":"53","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00004.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00004.response.json index 7a81640955..9f2c6e9d87 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00004.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00004.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"716c30a0-f00d-3000-e1e0-e264776f8816","SPClientServiceRequestDuration":"12","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3243,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:true,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Test node - Title Changed\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"f1e58aa0-7044-5000-f4a9-acb44c9079bd","SPClientServiceRequestDuration":"12","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3537,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:true,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Test node - Title Changed\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00005.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00005.response.json index 68e6479805..5248d41eeb 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00005.response.json +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateNavigationNode-0-00005.response.json @@ -1 +1 @@ -{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"716c30a0-9011-3000-e36d-797083b8c076","SPClientServiceRequestDuration":"17","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"f5e58aa0-20de-5000-f4a9-a50c39b9bd05","SPClientServiceRequestDuration":"20","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00000.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00000.response.json new file mode 100644 index 0000000000..059c7a68fb --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00000.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e9e58aa0-6040-5000-f4a9-a938fea980b6","SPClientServiceRequestDuration":"7","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022RegionalSettings\u0022:{\u0022TimeZone\u0022:{\u0022Description\u0022:\u0022(UTC-08:00) Pacific Time (US and Canada)\u0022,\u0022Id\u0022:13,\u0022Information\u0022:{\u0022Bias\u0022:480,\u0022DaylightBias\u0022:-60,\u0022StandardBias\u0022:0}},\u0022AdjustHijriDays\u0022:0,\u0022AlternateCalendarType\u0022:0,\u0022AM\u0022:\u0022AM\u0022,\u0022CalendarType\u0022:1,\u0022Collation\u0022:25,\u0022CollationLCID\u0022:2070,\u0022DateFormat\u0022:0,\u0022DateSeparator\u0022:\u0022/\u0022,\u0022DecimalSeparator\u0022:\u0022.\u0022,\u0022DigitGrouping\u0022:\u00223;0\u0022,\u0022FirstDayOfWeek\u0022:0,\u0022FirstWeekOfYear\u0022:0,\u0022IsEastAsia\u0022:false,\u0022IsRightToLeft\u0022:false,\u0022IsUIRightToLeft\u0022:false,\u0022ListSeparator\u0022:\u0022,\u0022,\u0022LocaleId\u0022:1033,\u0022NegativeSign\u0022:\u0022-\u0022,\u0022NegNumberMode\u0022:1,\u0022PM\u0022:\u0022PM\u0022,\u0022PositiveSign\u0022:\u0022\u0022,\u0022ShowWeeks\u0022:false,\u0022ThousandSeparator\u0022:\u0022,\u0022,\u0022Time24\u0022:false,\u0022TimeMarkerPosition\u0022:0,\u0022TimeSeparator\u0022:\u0022:\u0022,\u0022WorkDayEndHour\u0022:1020,\u0022WorkDays\u0022:62,\u0022WorkDayStartHour\u0022:480},\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022Url\u0022:\u0022https://bertonline.sharepoint.com/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00001.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00001.response.json new file mode 100644 index 0000000000..51d8bb7dba --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00001.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e9e58aa0-3049-5000-f4a9-adf0cbd16aaa","SPClientServiceRequestDuration":"8","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022GroupId\u0022:\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022,\u0022Id\u0022:\u0022f92f9e40-1110-43ef-aa0e-0822e13fb7ba\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00002.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00002.response.json new file mode 100644 index 0000000000..30ef0e516a --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00002.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e9e58aa0-104e-5000-f4a9-a72a68c06df3","SPClientServiceRequestDuration":"8","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022NavAudienceTargetingEnabled\u0022:false}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00003.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00003.response.json new file mode 100644 index 0000000000..fecaae2c0f --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00003.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":204,"Headers":{"SPRequestGuid":"e9e58aa0-3055-5000-f4a9-ac1e6c31027c","SPClientServiceRequestDuration":"19","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00004.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00004.response.json new file mode 100644 index 0000000000..b7233d80d9 --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00004.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":201,"Headers":{"SPRequestGuid":"e9e58aa0-d05a-5000-f4a9-a0f3eeb8fdda","SPClientServiceRequestDuration":"52","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3536,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Parent Node\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00005.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00005.response.json new file mode 100644 index 0000000000..8b8a221503 --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00005.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e9e58aa0-9062-5000-f4a9-abaef3f59f01","SPClientServiceRequestDuration":"15","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:null,\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3536,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Parent Node\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00006.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00006.response.json new file mode 100644 index 0000000000..28ea1d1626 --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00006.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":204,"Headers":{"SPRequestGuid":"e9e58aa0-b067-5000-f4a9-ab7da67d61e0","SPClientServiceRequestDuration":"74","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00007.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00007.response.json new file mode 100644 index 0000000000..819055813c --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00007.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e9e58aa0-4070-5000-f4a9-af8c5cac2b09","SPClientServiceRequestDuration":"14","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022AudienceIds\u0022:[\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022],\u0022CurrentLCID\u0022:1033,\u0022Id\u0022:3536,\u0022IsDocLib\u0022:true,\u0022IsExternal\u0022:false,\u0022IsVisible\u0022:true,\u0022ListTemplateType\u0022:0,\u0022Title\u0022:\u0022Parent Node\u0022,\u0022Url\u0022:\u0022/sites/prov-2\u0022}"} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00008.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00008.response.json new file mode 100644 index 0000000000..96d0feb7d0 --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00008.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":204,"Headers":{"SPRequestGuid":"e9e58aa0-2074-5000-f4a9-a406cdc1a211","SPClientServiceRequestDuration":"35","X-SharePointHealthScore":"2","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00009.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00009.response.json new file mode 100644 index 0000000000..270561e056 --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00009.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"e9e58aa0-5079-5000-f4a9-aa1247f8b882","SPClientServiceRequestDuration":"18","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00010.response.json b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00010.response.json new file mode 100644 index 0000000000..aa7dbdd72a --- /dev/null +++ b/src/sdk/PnP.Core.Test/SharePoint/MockData/NavigationTests/UpdateQuickLaunchItemUsingAudienceTargeting-0-00010.response.json @@ -0,0 +1 @@ +{"IsSuccessStatusCode":true,"StatusCode":204,"Headers":{"SPRequestGuid":"e9e58aa0-f07e-5000-f4a9-a117e3b80a38","SPClientServiceRequestDuration":"17","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":""} \ No newline at end of file diff --git a/src/sdk/PnP.Core.Test/SharePoint/NavigationTests.cs b/src/sdk/PnP.Core.Test/SharePoint/NavigationTests.cs index ee53835fe0..74b8487f90 100644 --- a/src/sdk/PnP.Core.Test/SharePoint/NavigationTests.cs +++ b/src/sdk/PnP.Core.Test/SharePoint/NavigationTests.cs @@ -327,5 +327,89 @@ public async Task MoveNavigationNodes() await secondNode.DeleteAsync(); } } + + [TestMethod] + public async Task AddQuickLaunchItemUsingAudienceTargeting() + { + //TestCommon.Instance.Mocking = false; + using (var context = await TestCommon.Instance.GetContextAsync(TestCommon.TestSite)) + { + INavigationNode parentNode = null; + try + { + // Ensure audience targeting is enabled for navigation nodes + context.Web.EnsureProperties(w => w.NavAudienceTargetingEnabled); + context.Web.NavAudienceTargetingEnabled = true; + context.Web.Update(); + + parentNode = await context.Web.Navigation.QuickLaunch.AddAsync( + new NavigationNodeOptions + { + Title = "Parent Node", + Url = context.Uri.AbsoluteUri, + AudienceIds = new System.Collections.Generic.List { context.Site.GroupId } + }); + } + finally + { + if (parentNode != null) + { + await parentNode.DeleteAsync(); + } + + context.Web.NavAudienceTargetingEnabled = false; + context.Web.Update(); + } + } + } + + [TestMethod] + public async Task UpdateQuickLaunchItemUsingAudienceTargeting() + { + //TestCommon.Instance.Mocking = false; + using (var context = await TestCommon.Instance.GetContextAsync(TestCommon.TestSite)) + { + INavigationNode parentNode = null; + try + { + // Ensure audience targeting is enabled for navigation nodes + context.Web.EnsureProperties(w => w.NavAudienceTargetingEnabled); + context.Web.NavAudienceTargetingEnabled = true; + context.Web.Update(); + + // Create the node without audience targeting + parentNode = await context.Web.Navigation.QuickLaunch.AddAsync( + new NavigationNodeOptions + { + Title = "Parent Node", + Url = context.Uri.AbsoluteUri, + //AudienceIds = new System.Collections.Generic.List { context.Site.GroupId } + }); + + // Load the created node again + parentNode = context.Web.Navigation.QuickLaunch.GetById(parentNode.Id); + + // Update the node adding an audience + parentNode.AudienceIds = new System.Collections.Generic.List { context.Site.GroupId }; + parentNode.Update(); + + parentNode = context.Web.Navigation.QuickLaunch.GetById(parentNode.Id); + + // Remove the audience again + parentNode.AudienceIds.Clear(); + parentNode.Update(); + } + finally + { + if (parentNode != null) + { + await parentNode.DeleteAsync(); + } + + context.Web.NavAudienceTargetingEnabled = false; + context.Web.Update(); + } + } + } } } diff --git a/src/sdk/PnP.Core/Model/SharePoint/Settings/Internal/NavigationNode.cs b/src/sdk/PnP.Core/Model/SharePoint/Settings/Internal/NavigationNode.cs index badd2cdca3..c7387b9b4d 100644 --- a/src/sdk/PnP.Core/Model/SharePoint/Settings/Internal/NavigationNode.cs +++ b/src/sdk/PnP.Core/Model/SharePoint/Settings/Internal/NavigationNode.cs @@ -22,45 +22,127 @@ internal sealed class NavigationNode : BaseDataModel, INavigati #region Construction public NavigationNode() { - + // Handler to construct the Add request for this list #pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously AddApiCallHandler = async (additionalInformation) => #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { var navigationNodeOptions = (NavigationNodeOptions)additionalInformation[NavigationNodeOptionsAdditionalInformationKey]; - - var apiUrl = string.Empty; - if (navigationNodeOptions != null && navigationNodeOptions.ParentNode != null) + + string apiUrl = BuildNavigationApiUrl(additionalInformation, navigationNodeOptions); + + // Build body + ExpandoObject navigationNodeCreationInformation; + if (navigationNodeOptions.AudienceIds != null && navigationNodeOptions.AudienceIds.Count > 0) { - apiUrl += $"{getNodeUri.Replace("{Id}", navigationNodeOptions.ParentNode.Id.ToString())}/Children"; + navigationNodeCreationInformation = new + { + __metadata = new { type = NavigationConstants.NodeMetadataType }, + navigationNodeOptions.Title, + navigationNodeOptions.Url, + AudienceIds = new + { + __metadata = new { type = "Collection(Edm.Guid)" }, + results = navigationNodeOptions.AudienceIds.ToArray() + }, + }.AsExpando(); } else { - apiUrl = baseUri; - var navigationType = (NavigationType)additionalInformation[NavigationTypeKey]; - if (navigationType == NavigationType.QuickLaunch) - { - apiUrl += NavigationConstants.QuickLaunchUri; - } - else if (navigationType == NavigationType.TopNavigationBar) + navigationNodeCreationInformation = new { - apiUrl += NavigationConstants.TopNavigationBarUri; - } + __metadata = new { type = NavigationConstants.NodeMetadataType }, + navigationNodeOptions.Title, + navigationNodeOptions.Url, + }.AsExpando(); } - // Build body - var navigationNodeCreationInformation = new + string body = JsonSerializer.Serialize(navigationNodeCreationInformation, typeof(ExpandoObject), PnPConstants.JsonSerializer_IgnoreNullValues); + + return new ApiCall(apiUrl, ApiType.SPORest, body); + }; + } + + private static string BuildNavigationApiUrl(Dictionary additionalInformation, NavigationNodeOptions navigationNodeOptions) + { + var apiUrl = string.Empty; + if (navigationNodeOptions != null && navigationNodeOptions.ParentNode != null) + { + apiUrl += $"{getNodeUri.Replace("{Id}", navigationNodeOptions.ParentNode.Id.ToString())}/Children"; + } + else + { + apiUrl = baseUri; + var navigationType = (NavigationType)additionalInformation[NavigationTypeKey]; + if (navigationType == NavigationType.QuickLaunch) + { + apiUrl += NavigationConstants.QuickLaunchUri; + } + else if (navigationType == NavigationType.TopNavigationBar) + { + apiUrl += NavigationConstants.TopNavigationBarUri; + } + } + + return apiUrl; + } + #endregion + + #region Override update payload generation + internal override async Task BaseUpdate(Func fromJsonCasting = null, Action postMappingJson = null) + { + var api = BuildUpdateApiCall(); + + await RawRequestAsync(api, new HttpMethod("PATCH"), "Update").ConfigureAwait(false); + } + + internal override async Task BaseBatchUpdateAsync(Batch batch, Func fromJsonCasting = null, Action postMappingJson = null) + { + var api = BuildUpdateApiCall(); + + // Add the request to the batch + await RawRequestBatchAsync(batch, api, new HttpMethod("PATCH"), "UpdateBatch").ConfigureAwait(false); + } + + private ApiCall BuildUpdateApiCall() + { + ExpandoObject body; + + if (AudienceIds != null && AudienceIds.Count > 0) + { + body = new + { + __metadata = new { type = NavigationConstants.NodeMetadataType }, + Title, + Url, + IsVisible, + AudienceIds = new + { + __metadata = new { type = "Collection(Edm.Guid)" }, + results = AudienceIds.ToArray() + }, + }.AsExpando(); + } + else + { + body = new { __metadata = new { type = NavigationConstants.NodeMetadataType }, - navigationNodeOptions.Title, - navigationNodeOptions.Url + Title, + Url, + IsVisible, + AudienceIds = new + { + __metadata = new { type = "Collection(Edm.Guid)" }, + results = new List().ToArray() + }, }.AsExpando(); + } - string body = JsonSerializer.Serialize(navigationNodeCreationInformation, typeof(ExpandoObject), PnPConstants.JsonSerializer_IgnoreNullValues); + string bodyString = JsonSerializer.Serialize(body, typeof(ExpandoObject), PnPConstants.JsonSerializer_IgnoreNullValues); - return new ApiCall(apiUrl, ApiType.SPORest, body); - }; + return new ApiCall($"{getNodeUri}", ApiType.SPORest, bodyString); } #endregion diff --git a/src/sdk/PnP.Core/Model/SharePoint/Settings/Public/INavigationNode.cs b/src/sdk/PnP.Core/Model/SharePoint/Settings/Public/INavigationNode.cs index 6bc7ed722c..b4ca315cef 100644 --- a/src/sdk/PnP.Core/Model/SharePoint/Settings/Public/INavigationNode.cs +++ b/src/sdk/PnP.Core/Model/SharePoint/Settings/Public/INavigationNode.cs @@ -52,9 +52,9 @@ public interface INavigationNode : IDataModel, IDataModelGet - /// + /// Define the up to 1O audiences for this navigation node. Note that Web.NavAudienceTargetingEnabled has to be set to true first. /// - public List AudienceIds { get; } + public List AudienceIds { get; set; } /// /// A special property used to add an asterisk to a $select statement diff --git a/src/sdk/PnP.Core/Model/SharePoint/Settings/Public/Options/NavigationNodeOptions.cs b/src/sdk/PnP.Core/Model/SharePoint/Settings/Public/Options/NavigationNodeOptions.cs index c5ce77aa35..fca764d77a 100644 --- a/src/sdk/PnP.Core/Model/SharePoint/Settings/Public/Options/NavigationNodeOptions.cs +++ b/src/sdk/PnP.Core/Model/SharePoint/Settings/Public/Options/NavigationNodeOptions.cs @@ -1,4 +1,7 @@ -namespace PnP.Core.Model.SharePoint +using System; +using System.Collections.Generic; + +namespace PnP.Core.Model.SharePoint { /// /// Options to set when creating a new navigation node @@ -15,6 +18,11 @@ public class NavigationNodeOptions /// public string Url { get; set; } + /// + /// Audiences for this navigation item (max 10). Note that Web.NavAudienceTargetingEnabled has to be set to true first. + /// + public List AudienceIds { get; set; } + /// /// Defines the parent node of the navigation node ///