diff --git a/src/pkg/path/categorytype_string.go b/src/pkg/path/categorytype_string.go index b62b6fc78..626cc4e31 100644 --- a/src/pkg/path/categorytype_string.go +++ b/src/pkg/path/categorytype_string.go @@ -15,12 +15,13 @@ func _() { _ = x[FilesCategory-4] _ = x[ListsCategory-5] _ = x[LibrariesCategory-6] - _ = x[DetailsCategory-7] + _ = x[PagesCategory-7] + _ = x[DetailsCategory-8] } -const _CategoryType_name = "UnknownCategoryemailcontactseventsfileslistslibrariesdetails" +const _CategoryType_name = "UnknownCategoryemailcontactseventsfileslistslibrariespagesdetails" -var _CategoryType_index = [...]uint8{0, 15, 20, 28, 34, 39, 44, 53, 60} +var _CategoryType_index = [...]uint8{0, 15, 20, 28, 34, 39, 44, 53, 58, 65} func (i CategoryType) String() string { if i < 0 || i >= CategoryType(len(_CategoryType_index)-1) { diff --git a/src/pkg/path/resource_path.go b/src/pkg/path/resource_path.go index ec76083bb..c66cd300e 100644 --- a/src/pkg/path/resource_path.go +++ b/src/pkg/path/resource_path.go @@ -65,6 +65,7 @@ const ( FilesCategory // files ListsCategory // lists LibrariesCategory // libraries + PagesCategory // pages DetailsCategory // details ) @@ -82,6 +83,8 @@ func ToCategoryType(category string) CategoryType { return LibrariesCategory case ListsCategory.String(): return ListsCategory + case PagesCategory.String(): + return PagesCategory case DetailsCategory.String(): return DetailsCategory default: @@ -103,6 +106,7 @@ var serviceCategories = map[ServiceType]map[CategoryType]struct{}{ SharePointService: { LibrariesCategory: {}, ListsCategory: {}, + PagesCategory: {}, }, } diff --git a/src/pkg/path/resource_path_test.go b/src/pkg/path/resource_path_test.go index 4ccfd03f8..c3655d19c 100644 --- a/src/pkg/path/resource_path_test.go +++ b/src/pkg/path/resource_path_test.go @@ -116,6 +116,13 @@ var ( return pb.ToDataLayerSharePointPath(tenant, site, path.ListsCategory, isItem) }, }, + { + service: path.SharePointService, + category: path.PagesCategory, + pathFunc: func(pb *path.Builder, tenant, site string, isItem bool) (path.Path, error) { + return pb.ToDataLayerSharePointPath(tenant, site, path.PagesCategory, isItem) + }, + }, } ) @@ -300,6 +307,13 @@ func (suite *DataLayerResourcePath) TestToServiceCategoryMetadataPath() { expectedService: path.SharePointMetadataService, check: assert.NoError, }, + { + name: "Passes", + service: path.SharePointService, + category: path.PagesCategory, + expectedService: path.SharePointMetadataService, + check: assert.NoError, + }, } for _, test := range table {