diff --git a/src/internal/connector/graph/betasdk/beta_client.go b/src/internal/connector/graph/betasdk/beta_client.go index 7b0316b38..515e1de95 100644 --- a/src/internal/connector/graph/betasdk/beta_client.go +++ b/src/internal/connector/graph/betasdk/beta_client.go @@ -15,15 +15,17 @@ import ( // Details on how the Code was generated is present in `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 in main. Generic Kiota adapters do not support. -// For the client, only calls that begin as client.SitesBy(siteID).Pages() have an endpoint. +// Changes to Sites Directory: +// Access files send requests with an adapter's with ASync() support. +// This feature is not enabled in v1.0. Manually changed in remaining files. +// Additionally, only calls that begin as client.SitesBy(siteID).Pages() have an endpoint. // // The use case specific to Pages(). All other requests should be routed to the /internal/connector/graph.Servicer -// -// Supported Pages 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 // +// Required model files are identified as `modelFiles` in kiota-lock.json. Directory -> betasdk/models +// Required access files are identified as `sitesFiles` in kiota-lock.json. Directory -> betasdk/sites +// // BetaClient minimal msgraph-beta-sdk-go for connecting to msgraph-beta-sdk-go // for retrieving `SharePoint.Pages`. Code is generated from kiota.dev. // requestAdapter is registered with the following the serializers: diff --git a/src/internal/connector/graph/betasdk/beta_service.go b/src/internal/connector/graph/betasdk/beta_service.go new file mode 100644 index 000000000..aa65dc9c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/beta_service.go @@ -0,0 +1,20 @@ +package betasdk + +import ( + msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go" +) + +// Service wraps BetaClient's functionality. +// Abstraction created to comply loosely with graph.Servicer +// methods for ease of switching between v1.0 and beta connnectors +type Service struct { + client *BetaClient +} + +func (s Service) Adapter() *msgraphsdk.GraphRequestAdapter { + return s.client.requestAdapter +} + +func (s Service) Client() *BetaClient { + return s.client +} diff --git a/src/internal/connector/graph/betasdk/kiota-lock.json b/src/internal/connector/graph/betasdk/kiota-lock.json index 1f2bc153a..21a111aef 100644 --- a/src/internal/connector/graph/betasdk/kiota-lock.json +++ b/src/internal/connector/graph/betasdk/kiota-lock.json @@ -4,6 +4,7 @@ "clientClassName": "BetaClient", "clientNamespaceName": "github.com/alcionai/corso/src/internal/connector/graph/betasdk", "language": "Go", + "betaVersion": "0.53.0", "usesBackingStore": false, "includeAdditionalData": true, "serializers": [ @@ -30,7 +31,7 @@ "**/groups/**", "**/onenote/**" ], - "Necessary Sites Files": [ + "sitesFiles": [ "count_request_builder.go", "item_pages_count_request_builder.go", "item_pages_item_canvas_layout_horizontal_sections_count_request_builder.go", @@ -65,7 +66,7 @@ "item_sites_site_item_request_builder.go", "site_item_request_builder.go" ], - "Necessary Model Files":[ + "modelFiles":[ "base_item.go", "page_layout_type.go", "standard_web_partable.go",