CLI: Restore: SharePoint Pages (#2228)
## Description Changes connect SharePoint Pages to restore CLI. <!-- Insert PR description--> ## Does this PR need a docs update or release note? - [x] ⛔ No Arguments are hidden ## Type of change <!--- Please check the type of change your PR introduces: ---> - [x] 🌻 Feature ## Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * related to #2318 * closes #2070 * closes #2168<issue> * closes #2218 ## Test Plan <!-- How will this be tested prior to merging.--> - [x] ⚡ Unit test
This commit is contained in:
parent
89fb764526
commit
67634cbbc1
@ -141,12 +141,12 @@ func addSharePointCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
|
|
||||||
fs.StringSliceVar(
|
fs.StringSliceVar(
|
||||||
&pageFolders,
|
&pageFolders,
|
||||||
utils.PageFN, nil,
|
utils.PageFolderFN, nil,
|
||||||
"Select backup data by site ID; accepts '"+utils.Wildcard+"' to select all sites.")
|
"Select backup data by folder name; accepts '"+utils.Wildcard+"' to select all folders.")
|
||||||
|
|
||||||
fs.StringSliceVar(
|
fs.StringSliceVar(
|
||||||
&page,
|
&page,
|
||||||
utils.PageItemFN, nil,
|
utils.PagesFN, nil,
|
||||||
"Select backup data by file name; accepts '"+utils.Wildcard+"' to select all pages within the site.",
|
"Select backup data by file name; accepts '"+utils.Wildcard+"' to select all pages within the site.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,8 @@ import (
|
|||||||
var (
|
var (
|
||||||
listItems []string
|
listItems []string
|
||||||
listPaths []string
|
listPaths []string
|
||||||
|
pageFolders []string
|
||||||
|
pages []string
|
||||||
libraryItems []string
|
libraryItems []string
|
||||||
libraryPaths []string
|
libraryPaths []string
|
||||||
site []string
|
site []string
|
||||||
@ -76,6 +78,18 @@ func addSharePointCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
utils.ListItemFN, nil,
|
utils.ListItemFN, nil,
|
||||||
"Restore list items by ID")
|
"Restore list items by ID")
|
||||||
|
|
||||||
|
fs.StringSliceVar(
|
||||||
|
&pageFolders,
|
||||||
|
utils.PageFolderFN, nil,
|
||||||
|
"Restore Site pages by page folder name",
|
||||||
|
)
|
||||||
|
|
||||||
|
fs.StringSliceVar(
|
||||||
|
&pages,
|
||||||
|
utils.PagesFN, nil,
|
||||||
|
"Restore site pages by file name(s)",
|
||||||
|
)
|
||||||
|
|
||||||
// sharepoint info flags
|
// sharepoint info flags
|
||||||
|
|
||||||
// fs.StringVar(
|
// fs.StringVar(
|
||||||
@ -131,6 +145,8 @@ func restoreSharePointCmd(cmd *cobra.Command, args []string) error {
|
|||||||
ListPaths: listPaths,
|
ListPaths: listPaths,
|
||||||
LibraryItems: libraryItems,
|
LibraryItems: libraryItems,
|
||||||
LibraryPaths: libraryPaths,
|
LibraryPaths: libraryPaths,
|
||||||
|
PageFolders: pageFolders,
|
||||||
|
Pages: pages,
|
||||||
Sites: site,
|
Sites: site,
|
||||||
WebURLs: weburl,
|
WebURLs: weburl,
|
||||||
// FileCreatedAfter: fileCreatedAfter,
|
// FileCreatedAfter: fileCreatedAfter,
|
||||||
|
|||||||
@ -11,8 +11,8 @@ const (
|
|||||||
LibraryFN = "library"
|
LibraryFN = "library"
|
||||||
ListItemFN = "list-item"
|
ListItemFN = "list-item"
|
||||||
ListFN = "list"
|
ListFN = "list"
|
||||||
PageFN = "page"
|
PageFolderFN = "page-folders"
|
||||||
PageItemFN = "page-item"
|
PagesFN = "pages"
|
||||||
WebURLFN = "web-url"
|
WebURLFN = "web-url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -13,8 +13,14 @@ import (
|
|||||||
|
|
||||||
// BetaClient the main entry point of the SDK, exposes the configuration and the fluent API.
|
// BetaClient the main entry point of the SDK, exposes the configuration and the fluent API.
|
||||||
// Minimal Beta Connector:
|
// Minimal Beta Connector:
|
||||||
// Details on how the Code was generated is present in `kioter-lock.json`.
|
// Details on how the Code was generated is within `kioter-lock.json`.
|
||||||
// NOTE: kiota gen file is altered to indicate what files are included in the created
|
//
|
||||||
|
// Beta files use an adapter that allows for ASync() request. This feature
|
||||||
|
// is disabled within the nested directories. Generic Kiota adapters do not support.
|
||||||
|
//
|
||||||
|
// Supported betasdk models are located within the models subdirectory
|
||||||
|
// Supported Call source are located within the sites subdirectory
|
||||||
|
// Specifics on `betaClient.SitesById(siteID).Pages` are located: sites/site_item_request_builder.go
|
||||||
//
|
//
|
||||||
// Changes to Sites Directory:
|
// Changes to Sites Directory:
|
||||||
// Access files send requests with an adapter's with ASync() support.
|
// Access files send requests with an adapter's with ASync() support.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user