⬆️ Bump github.com/microsoftgraph/msgraph-sdk-go from 1.16.0 to 1.17.0 in /src (#4167)

Bumps [github.com/microsoftgraph/msgraph-sdk-go](https://github.com/microsoftgraph/msgraph-sdk-go) from 1.16.0 to 1.17.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/microsoftgraph/msgraph-sdk-go/blob/main/CHANGELOG.md">github.com/microsoftgraph/msgraph-sdk-go's changelog</a>.</em></p>
<blockquote>
<h2>[1.17.0]- 2023-08-30</h2>
<h3>Changed</h3>
<ul>
<li>Weekly generation.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="bd9689c25d"><code>bd9689c</code></a> Generated  models and request builders (<a href="https://redirect.github.com/microsoftgraph/msgraph-sdk-go/issues/563">#563</a>)</li>
<li>See full diff in <a href="https://github.com/microsoftgraph/msgraph-sdk-go/compare/v1.16.0...v1.17.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/microsoftgraph/msgraph-sdk-go&package-manager=go_modules&previous-version=1.16.0&new-version=1.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
This commit is contained in:
dependabot[bot] 2023-09-05 16:45:27 +00:00 committed by GitHub
parent c1c4218994
commit ccdb672026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 222 additions and 215 deletions

View File

@ -252,7 +252,7 @@ func generateAndRestoreDriveItems(
d, err := ctrl.AC.Stable.
Client().
Sites().
BySiteId(protectedResource.ID()).
BySiteIdString(protectedResource.ID()).
Drive().
Get(ctx, nil)
if err != nil {
@ -263,7 +263,7 @@ func generateAndRestoreDriveItems(
default:
d, err := ctrl.AC.Stable.Client().
Users().
ByUserId(protectedResource.ID()).
ByUserIdString(protectedResource.ID()).
Drive().
Get(ctx, nil)
if err != nil {

View File

@ -22,7 +22,7 @@ func CheckOneDriveExport(
) {
drive, err := client.
Users().
ByUserId(userID).
ByUserIdString(userID).
Drive().
Get(ctx, nil)
if err != nil {

View File

@ -22,7 +22,7 @@ func CheckSharePointExport(
) {
drive, err := client.
Sites().
BySiteId(siteID).
BySiteIdString(siteID).
Drive().
Get(ctx, nil)
if err != nil {

View File

@ -29,7 +29,7 @@ func CheckEmailRestoration(
restoreFolder models.MailFolderable
itemCount = make(map[string]int32)
restoreItemCount = make(map[string]int32)
builder = client.Users().ByUserId(testUser).MailFolders()
builder = client.Users().ByUserIdString(testUser).MailFolders()
)
for {
@ -73,9 +73,9 @@ func CheckEmailRestoration(
childFolder, err := client.
Users().
ByUserId(testUser).
ByUserIdString(testUser).
MailFolders().
ByMailFolderId(folderID).
ByMailFolderIdString(folderID).
ChildFolders().
Get(ctx, nil)
if err != nil {
@ -136,9 +136,9 @@ func getAllMailSubFolders(
childFolder, err := client.
Users().
ByUserId(testUser).
ByUserIdString(testUser).
MailFolders().
ByMailFolderId(folderID).
ByMailFolderIdString(folderID).
ChildFolders().
Get(ctx, options)
if err != nil {
@ -188,9 +188,9 @@ func checkAllSubFolder(
childFolder, err := client.
Users().
ByUserId(testUser).
ByUserIdString(testUser).
MailFolders().
ByMailFolderId(folderID).
ByMailFolderIdString(folderID).
ChildFolders().
Get(ctx, options)
if err != nil {

View File

@ -27,7 +27,7 @@ func CheckOneDriveRestoration(
) {
drive, err := client.
Users().
ByUserId(userID).
ByUserIdString(userID).
Drive().
Get(ctx, nil)
if err != nil {
@ -115,9 +115,9 @@ func PopulateDriveDetails(
response, err := client.
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId("root").
ByDriveItemIdString("root").
Children().
Get(ctx, nil)
if err != nil {
@ -234,7 +234,7 @@ func getOneDriveChildFolder(
folderPermission map[string][]common.PermissionInfo,
startTime time.Time,
) {
response, err := client.Drives().ByDriveId(driveID).Items().ByDriveItemId(itemID).Children().Get(ctx, nil)
response, err := client.Drives().ByDriveIdString(driveID).Items().ByDriveItemIdString(itemID).Children().Get(ctx, nil)
if err != nil {
common.Fatal(ctx, "getting child folder", err)
}
@ -283,9 +283,9 @@ func getRestoredDrive(
) {
restored, err := client.
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(restoreFolderID).
ByDriveItemIdString(restoreFolderID).
Children().
Get(ctx, nil)
if err != nil {
@ -326,9 +326,9 @@ func permissionIn(
pcr, err := client.
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(itemID).
ByDriveItemIdString(itemID).
Permissions().
Get(ctx, nil)
if err != nil {

View File

@ -19,7 +19,7 @@ func CheckSharePointRestoration(
) {
drive, err := client.
Sites().
BySiteId(siteID).
BySiteIdString(siteID).
Drive().
Get(ctx, nil)
if err != nil {

View File

@ -19,7 +19,7 @@ require (
github.com/microsoft/kiota-http-go v1.1.0
github.com/microsoft/kiota-serialization-form-go v1.0.0
github.com/microsoft/kiota-serialization-json-go v1.0.4
github.com/microsoftgraph/msgraph-sdk-go v1.16.0
github.com/microsoftgraph/msgraph-sdk-go v1.17.0
github.com/microsoftgraph/msgraph-sdk-go-core v1.0.0
github.com/pkg/errors v0.9.1
github.com/puzpuzpuz/xsync/v2 v2.5.0

View File

@ -303,8 +303,8 @@ github.com/microsoft/kiota-serialization-multipart-go v1.0.0 h1:3O5sb5Zj+moLBiJy
github.com/microsoft/kiota-serialization-multipart-go v1.0.0/go.mod h1:yauLeBTpANk4L03XD985akNysG24SnRJGaveZf+p4so=
github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0jlETWnWrEum0RhmbYrTFnA=
github.com/microsoft/kiota-serialization-text-go v1.0.0/go.mod h1:sM1/C6ecnQ7IquQOGUrUldaO5wj+9+v7G2W3sQ3fy6M=
github.com/microsoftgraph/msgraph-sdk-go v1.16.0 h1:6YjL2f8PZFlJUuCoX1yJwhDFYKPtogxYr/SnKJHAHZ4=
github.com/microsoftgraph/msgraph-sdk-go v1.16.0/go.mod h1:DdshtIL3VJ3abSG6O+gmlvbc/pX7Xh7xbruLTWoRjfU=
github.com/microsoftgraph/msgraph-sdk-go v1.17.0 h1:ODua+yyogMmYos5ihqK90fQ01yaj+S2A+pM2MYxzjJ8=
github.com/microsoftgraph/msgraph-sdk-go v1.17.0/go.mod h1:DdshtIL3VJ3abSG6O+gmlvbc/pX7Xh7xbruLTWoRjfU=
github.com/microsoftgraph/msgraph-sdk-go-core v1.0.0 h1:7NWTfyXvOjoizW7PmxNp3+8wCKPgpODs/D1cUZ3fkAY=
github.com/microsoftgraph/msgraph-sdk-go-core v1.0.0/go.mod h1:tQb4q3YMIj2dWhhXhQSJ4ELpol931ANKzHSYK5kX1qE=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=

View File

@ -425,9 +425,9 @@ func (suite *RestoreIntgSuite) TestRestoreAndBackupEvent_recurringInstancesWithA
ec, err := handler.ac.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
ByCalendarId(calendarID).
ByCalendarIdString(calendarID).
Events().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(err))

View File

@ -221,7 +221,7 @@ func (suite *SharePointCollectionSuite) TestListCollection_Restore() {
// Clean-Up
var (
builder = service.Client().Sites().BySiteId(suite.siteID).Lists()
builder = service.Client().Sites().BySiteIdString(suite.siteID).Lists()
isFound bool
deleteID string
)

View File

@ -57,7 +57,7 @@ func PreFetchLists(
siteID string,
) ([]ListTuple, error) {
var (
builder = gs.Client().Sites().BySiteId(siteID).Lists()
builder = gs.Client().Sites().BySiteIdString(siteID).Lists()
options = preFetchListOptions()
listTuples = make([]ListTuple, 0)
)
@ -149,7 +149,7 @@ func loadSiteLists(
err error
)
entry, err = gs.Client().Sites().BySiteId(siteID).Lists().ByListId(id).Get(ctx, nil)
entry, err = gs.Client().Sites().BySiteIdString(siteID).Lists().ByListIdString(id).Get(ctx, nil)
if err != nil {
el.AddRecoverable(ctx, graph.Wrap(ctx, err, "getting site list"))
return
@ -216,7 +216,7 @@ func fetchListItems(
errs *fault.Bus,
) ([]models.ListItemable, error) {
var (
prefix = gs.Client().Sites().BySiteId(siteID).Lists().ByListId(listID)
prefix = gs.Client().Sites().BySiteIdString(siteID).Lists().ByListIdString(listID)
builder = prefix.Items()
itms = make([]models.ListItemable, 0)
el = errs.Local()
@ -237,7 +237,7 @@ func fetchListItems(
break
}
newPrefix := prefix.Items().ByListItemId(ptr.Val(itm.GetId()))
newPrefix := prefix.Items().ByListItemIdString(ptr.Val(itm.GetId()))
fields, err := newPrefix.Fields().Get(ctx, nil)
if err != nil {
@ -273,7 +273,7 @@ func fetchColumns(
cs := make([]models.ColumnDefinitionable, 0)
if len(cTypeID) == 0 {
builder := gs.Client().Sites().BySiteId(siteID).Lists().ByListId(listID).Columns()
builder := gs.Client().Sites().BySiteIdString(siteID).Lists().ByListIdString(listID).Columns()
for {
resp, err := builder.Get(ctx, nil)
@ -293,11 +293,11 @@ func fetchColumns(
} else {
builder := gs.Client().
Sites().
BySiteId(siteID).
BySiteIdString(siteID).
Lists().
ByListId(listID).
ByListIdString(listID).
ContentTypes().
ByContentTypeId(cTypeID).
ByContentTypeIdString(cTypeID).
Columns()
for {
@ -335,7 +335,7 @@ func fetchContentTypes(
var (
el = errs.Local()
cTypes = make([]models.ContentTypeable, 0)
builder = gs.Client().Sites().BySiteId(siteID).Lists().ByListId(listID).ContentTypes()
builder = gs.Client().Sites().BySiteIdString(siteID).Lists().ByListIdString(listID).ContentTypes()
)
for {
@ -393,11 +393,11 @@ func fetchColumnLinks(
var (
builder = gs.Client().
Sites().
BySiteId(siteID).
BySiteIdString(siteID).
Lists().
ByListId(listID).
ByListIdString(listID).
ContentTypes().
ByContentTypeId(cTypeID).
ByContentTypeIdString(cTypeID).
ColumnLinks()
links = make([]models.ColumnLinkable, 0)
)
@ -431,7 +431,7 @@ func DeleteList(
gs graph.Servicer,
siteID, listID string,
) error {
err := gs.Client().Sites().BySiteId(siteID).Lists().ByListId(listID).Delete(ctx, nil)
err := gs.Client().Sites().BySiteIdString(siteID).Lists().ByListIdString(listID).Delete(ctx, nil)
if err != nil {
return graph.Wrap(ctx, err, "deleting list")
}

View File

@ -177,7 +177,7 @@ func restoreListItem(
newList.SetItems(contents)
// Restore to List base to M365 back store
restoredList, err := service.Client().Sites().BySiteId(siteID).Lists().Post(ctx, newList, nil)
restoredList, err := service.Client().Sites().BySiteIdString(siteID).Lists().Post(ctx, newList, nil)
if err != nil {
return dii, graph.Wrap(ctx, err, "restoring list")
}
@ -188,9 +188,9 @@ func restoreListItem(
for _, lItem := range contents {
_, err := service.Client().
Sites().
BySiteId(siteID).
BySiteIdString(siteID).
Lists().
ByListId(ptr.Val(restoredList.GetId())).
ByListIdString(ptr.Val(restoredList.GetId())).
Items().
Post(ctx, lItem, nil)
if err != nil {

View File

@ -289,7 +289,7 @@ func (suite *RetryMWIntgSuite) TestRetryMiddleware_RetryRequest_resetBodyAfter50
_, err = NewService(adpt).
Client().
Users().
ByUserId("user").
ByUserIdString("user").
MailFolders().
Post(ctx, body, nil)
require.NoError(t, err, clues.ToCore(err))
@ -326,7 +326,7 @@ func (suite *RetryMWIntgSuite) TestRetryMiddleware_RetryResponse_maintainBodyAft
_, err = NewService(adpt).
Client().
Users().
ByUserId("user").
ByUserIdString("user").
MailFolders().
Post(ctx, models.NewMailFolder(), nil)
require.Error(t, err, clues.ToCore(err))

View File

@ -305,7 +305,7 @@ func (suite *SharePointRestoreNightlyIntgSuite) TestRestore_Run_sharepointDelete
md, err = graphClient.
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Patch(ctx, patchBody, nil)
require.NoError(t, err, clues.ToCore(graph.Stack(ctx, err)))
@ -330,9 +330,9 @@ func (suite *SharePointRestoreNightlyIntgSuite) TestRestore_Run_sharepointDelete
resp, err := graphClient.
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(rootFolderID).
ByDriveItemIdString(rootFolderID).
Children().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(graph.Stack(ctx, err)))
@ -356,7 +356,7 @@ func (suite *SharePointRestoreNightlyIntgSuite) TestRestore_Run_sharepointDelete
err = graphClient.
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Delete(ctx, nil)
require.NoError(t, err, clues.ToCore(graph.Stack(ctx, err)))
@ -407,9 +407,9 @@ func (suite *SharePointRestoreNightlyIntgSuite) TestRestore_Run_sharepointDelete
resp, err := graphClient.
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(rootFolderID).
ByDriveItemIdString(rootFolderID).
Children().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(graph.Stack(ctx, err)))
@ -450,9 +450,9 @@ func (suite *SharePointRestoreNightlyIntgSuite) TestRestore_Run_sharepointDelete
resp, err := graphClient.
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(rootFolderID).
ByDriveItemIdString(rootFolderID).
Children().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(graph.Stack(ctx, err)))

View File

@ -46,9 +46,9 @@ func (c Channels) GetChannel(
resp, err := c.Stable.
Client().
Teams().
ByTeamId(teamID).
ByTeamIdString(teamID).
Channels().
ByChannelId(containerID).
ByChannelIdString(containerID).
Get(ctx, config)
if err != nil {
return nil, graph.Stack(ctx, err)
@ -74,7 +74,7 @@ func (c Channels) GetChannelByName(
resp, err := c.Stable.
Client().
Teams().
ByTeamId(teamID).
ByTeamIdString(teamID).
Channels().
Get(ctx, options)
if err != nil {
@ -115,11 +115,11 @@ func (c Channels) GetMessage(
message, err := c.Stable.
Client().
Teams().
ByTeamId(teamID).
ByTeamIdString(teamID).
Channels().
ByChannelId(channelID).
ByChannelIdString(channelID).
Messages().
ByChatMessageId(itemID).
ByChatMessageIdString(itemID).
Get(ctx, nil)
if err != nil {
return nil, nil, graph.Stack(ctx, err)
@ -140,11 +140,11 @@ func (c Channels) GetReplies(
replies, err := c.Stable.
Client().
Teams().
ByTeamId(teamID).
ByTeamIdString(teamID).
Channels().
ByChannelId(channelID).
ByChannelIdString(channelID).
Messages().
ByChatMessageId(messageID).
ByChatMessageIdString(messageID).
Replies().
Get(ctx, nil)
if err != nil {

View File

@ -39,9 +39,9 @@ func (p *channelMessageDeltaPageCtrl) Reset(context.Context) {
p.builder = p.gs.
Client().
Teams().
ByTeamId(p.resourceID).
ByTeamIdString(p.resourceID).
Channels().
ByChannelId(p.channelID).
ByChannelIdString(p.channelID).
Messages().
Delta()
}
@ -56,9 +56,9 @@ func (c Channels) NewChannelMessageDeltaPager(
builder := c.Stable.
Client().
Teams().
ByTeamId(teamID).
ByTeamIdString(teamID).
Channels().
ByChannelId(channelID).
ByChannelIdString(channelID).
Messages().
Delta()
@ -179,7 +179,7 @@ func (c Channels) NewChannelPager(
builder: c.Stable.
Client().
Teams().
ByTeamId(teamID).
ByTeamIdString(teamID).
Channels(),
}

View File

@ -46,7 +46,7 @@ func (c Contacts) CreateContainer(
mdl, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
ContactFolders().
Post(ctx, body, nil)
if err != nil {
@ -71,9 +71,9 @@ func (c Contacts) DeleteContainer(
err = srv.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
ContactFolders().
ByContactFolderId(containerID).
ByContactFolderIdString(containerID).
Delete(ctx, nil)
if err != nil {
return graph.Stack(ctx, err)
@ -95,9 +95,9 @@ func (c Contacts) GetContainerByID(
resp, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
ContactFolders().
ByContactFolderId(containerID).
ByContactFolderIdString(containerID).
Get(ctx, config)
if err != nil {
return nil, graph.Stack(ctx, err)
@ -124,7 +124,7 @@ func (c Contacts) GetContainerByName(
resp, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
ContactFolders().
Get(ctx, options)
if err != nil {
@ -164,9 +164,9 @@ func (c Contacts) PatchFolder(
_, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
ContactFolders().
ByContactFolderId(containerID).
ByContactFolderIdString(containerID).
Patch(ctx, body, nil)
if err != nil {
return graph.Wrap(ctx, err, "patching contact folder")
@ -193,9 +193,9 @@ func (c Contacts) GetItem(
cont, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Contacts().
ByContactId(itemID).
ByContactIdString(itemID).
Get(ctx, options)
if err != nil {
return nil, nil, graph.Stack(ctx, err)
@ -212,9 +212,9 @@ func (c Contacts) PostItem(
itm, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
ContactFolders().
ByContactFolderId(containerID).
ByContactFolderIdString(containerID).
Contacts().
Post(ctx, body, nil)
if err != nil {
@ -238,9 +238,9 @@ func (c Contacts) DeleteItem(
err = srv.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Contacts().
ByContactId(itemID).
ByContactIdString(itemID).
Delete(ctx, nil)
if err != nil {
return graph.Wrap(ctx, err, "deleting contact")

View File

@ -38,9 +38,9 @@ func (c Contacts) EnumerateContainers(
builder := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
ContactFolders().
ByContactFolderId(baseContainerID).
ByContactFolderIdString(baseContainerID).
ChildFolders()
for {
@ -115,9 +115,9 @@ func (c Contacts) NewContactsPager(
builder := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
ContactFolders().
ByContactFolderId(containerID).
ByContactFolderIdString(containerID).
Contacts()
return &contactsPageCtrl{c.Stable, builder, options}
@ -209,9 +209,9 @@ func (c Contacts) NewContactIDsPager(
builder := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
ContactFolders().
ByContactFolderId(containerID).
ByContactFolderIdString(containerID).
Contacts()
return &contactIDPager{c.Stable, builder, config}
@ -257,7 +257,14 @@ func getContactDeltaBuilder(
userID, containerID string,
options *users.ItemContactFoldersItemContactsDeltaRequestBuilderGetRequestConfiguration,
) *users.ItemContactFoldersItemContactsDeltaRequestBuilder {
builder := gs.Client().Users().ByUserId(userID).ContactFolders().ByContactFolderId(containerID).Contacts().Delta()
builder := gs.Client().
Users().
ByUserIdString(userID).
ContactFolders().
ByContactFolderIdString(containerID).
Contacts().
Delta()
return builder
}

View File

@ -45,9 +45,9 @@ func (suite *ContactsPagerIntgSuite) TestContacts_GetItemsInContainerByCollision
conts, err := ac.Stable.
Client().
Users().
ByUserId(suite.its.user.id).
ByUserIdString(suite.its.user.id).
ContactFolders().
ByContactFolderId(ptr.Val(container.GetId())).
ByContactFolderIdString(ptr.Val(container.GetId())).
Contacts().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(err))
@ -97,9 +97,9 @@ func (suite *ContactsPagerIntgSuite) TestContacts_GetItemsIDsInContainer() {
msgs, err := ac.Stable.
Client().
Users().
ByUserId(suite.its.user.id).
ByUserIdString(suite.its.user.id).
ContactFolders().
ByContactFolderId(ptr.Val(container.GetId())).
ByContactFolderIdString(ptr.Val(container.GetId())).
Contacts().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(err))

View File

@ -74,7 +74,7 @@ func (c Drives) GetRootFolder(
root, err := c.Stable.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Root().
Get(ctx, nil)
if err != nil {
@ -96,9 +96,9 @@ func (c Drives) GetItem(
di, err := c.Stable.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(itemID).
ByDriveItemIdString(itemID).
Get(ctx, nil)
if err != nil {
return nil, graph.Wrap(ctx, err, "getting item")
@ -116,9 +116,9 @@ func (c Drives) NewItemContentUpload(
r, err := c.Stable.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(itemID).
ByDriveItemIdString(itemID).
CreateUploadSession().
Post(ctx, session, nil)
if err != nil {
@ -180,9 +180,9 @@ func (c Drives) PatchItem(
_, err := c.Stable.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(itemID).
ByDriveItemIdString(itemID).
Patch(ctx, item, nil)
if err != nil {
return graph.Wrap(ctx, err, "patching drive item")
@ -199,9 +199,9 @@ func (c Drives) PutItemContent(
_, err := c.Stable.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(itemID).
ByDriveItemIdString(itemID).
Content().
Put(ctx, content, nil)
if err != nil {
@ -227,9 +227,9 @@ func (c Drives) DeleteItem(
err = srv.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(itemID).
ByDriveItemIdString(itemID).
Delete(ctx, nil)
if err != nil {
return graph.Wrap(ctx, err, "deleting item").With("item_id", itemID)
@ -249,9 +249,9 @@ func (c Drives) GetItemPermission(
perm, err := c.Stable.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(itemID).
ByDriveItemIdString(itemID).
Permissions().
Get(ctx, nil)
if err != nil {
@ -271,9 +271,9 @@ func (c Drives) PostItemPermissionUpdate(
itm, err := c.Stable.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(itemID).
ByDriveItemIdString(itemID).
Invite().
Post(ctx, body, nil)
if err != nil {
@ -297,11 +297,11 @@ func (c Drives) DeleteItemPermission(
err = srv.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(itemID).
ByDriveItemIdString(itemID).
Permissions().
ByPermissionId(permissionID).
ByPermissionIdString(permissionID).
Delete(graph.ConsumeNTokens(ctx, graph.PermissionsLC), nil)
if err != nil {
return graph.Wrap(ctx, err, "deleting drive item permission")

View File

@ -44,9 +44,9 @@ func (c Drives) NewDriveItemPager(
builder := c.Stable.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(containerID).
ByDriveItemIdString(containerID).
Children()
return &driveItemPageCtrl{c.Stable, builder, options}
@ -158,9 +158,9 @@ func (c Drives) NewDriveItemDeltaPager(
builder: c.Stable.
Client().
Drives().
ByDriveId(driveID).
ByDriveIdString(driveID).
Items().
ByDriveItemId(onedrive.RootID).
ByDriveItemIdString(onedrive.RootID).
Delta(),
}
@ -192,9 +192,9 @@ func (p *DriveItemDeltaPageCtrl) SetNext(link string) {
func (p *DriveItemDeltaPageCtrl) Reset(context.Context) {
p.builder = p.gs.Client().
Drives().
ByDriveId(p.driveID).
ByDriveIdString(p.driveID).
Items().
ByDriveItemId(onedrive.RootID).
ByDriveItemIdString(onedrive.RootID).
Delta()
}
@ -232,7 +232,7 @@ func (c Drives) NewUserDrivePager(
builder: c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Drives(),
}
@ -254,7 +254,7 @@ func (p *userDrivePager) GetPage(ctx context.Context) (PageLinker, error) {
d, err := p.gs.
Client().
Users().
ByUserId(p.userID).
ByUserIdString(p.userID).
Drive().
Get(ctx, nil)
if err != nil {
@ -325,7 +325,7 @@ func (c Drives) NewSiteDrivePager(
builder: c.Stable.
Client().
Sites().
BySiteId(siteID).
BySiteIdString(siteID).
Drives(),
}

View File

@ -61,9 +61,9 @@ func (suite *DrivePagerIntgSuite) TestDrives_GetItemsInContainerByCollisionKey()
items, err := suite.its.ac.Stable.
Client().
Drives().
ByDriveId(test.driveID).
ByDriveIdString(test.driveID).
Items().
ByDriveItemId(test.rootFolderID).
ByDriveItemIdString(test.rootFolderID).
Children().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(err))
@ -135,9 +135,9 @@ func (suite *DrivePagerIntgSuite) TestDrives_GetItemIDsInContainer() {
items, err := suite.its.ac.Stable.
Client().
Drives().
ByDriveId(test.driveID).
ByDriveIdString(test.driveID).
Items().
ByDriveItemId(test.rootFolderID).
ByDriveItemIdString(test.rootFolderID).
Children().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(err))

View File

@ -274,9 +274,9 @@ func (suite *DriveAPIIntgSuite) TestDrives_PostItemInContainer_replaceFolderRegr
resultFileColl, err := acd.Stable.
Client().
Drives().
ByDriveId(suite.its.user.driveID).
ByDriveIdString(suite.its.user.driveID).
Items().
ByDriveItemId(ptr.Val(resultFolder.GetId())).
ByDriveItemIdString(ptr.Val(resultFolder.GetId())).
Children().
Get(ctx, nil)
err = graph.Stack(ctx, err).OrNil()

View File

@ -55,7 +55,7 @@ func (c Events) CreateContainer(
container, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
Post(ctx, body, nil)
if err != nil {
@ -80,9 +80,9 @@ func (c Events) DeleteContainer(
err = srv.Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
ByCalendarId(containerID).
ByCalendarIdString(containerID).
Delete(ctx, nil)
if err != nil {
return graph.Stack(ctx, err)
@ -104,9 +104,9 @@ func (c Events) GetContainerByID(
resp, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
ByCalendarId(containerID).
ByCalendarIdString(containerID).
Get(ctx, config)
if err != nil {
return nil, graph.Stack(ctx, err)
@ -133,7 +133,7 @@ func (c Events) GetContainerByName(
resp, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
Get(ctx, options)
if err != nil {
@ -169,9 +169,9 @@ func (c Events) PatchCalendar(
_, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
ByCalendarId(containerID).
ByCalendarIdString(containerID).
Patch(ctx, body, nil)
if err != nil {
return graph.Wrap(ctx, err, "patching event calendar")
@ -380,9 +380,9 @@ func (c Events) GetAttachments(
attached, err := c.LargeItem.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Events().
ByEventId(itemID).
ByEventIdString(itemID).
Attachments().
Get(ctx, config)
if err != nil {
@ -399,13 +399,13 @@ func (c Events) DeleteAttachment(
return c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
ByCalendarId(calendarID).
ByCalendarIdString(calendarID).
Events().
ByEventId(eventID).
ByEventIdString(eventID).
Attachments().
ByAttachmentId(attachmentID).
ByAttachmentIdString(attachmentID).
Delete(ctx, nil)
}
@ -424,9 +424,9 @@ func (c Events) GetItemInstances(
events, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Events().
ByEventId(itemID).
ByEventIdString(itemID).
Instances().
Get(ctx, config)
if err != nil {
@ -482,9 +482,9 @@ func (c Events) DeleteItem(
err = srv.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Events().
ByEventId(itemID).
ByEventIdString(itemID).
Delete(ctx, nil)
if err != nil {
return graph.Wrap(ctx, err, "deleting calendar event")
@ -501,11 +501,11 @@ func (c Events) PostSmallAttachment(
_, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
ByCalendarId(containerID).
ByCalendarIdString(containerID).
Events().
ByEventId(parentItemID).
ByEventIdString(parentItemID).
Attachments().
Post(ctx, body, nil)
if err != nil {
@ -527,11 +527,11 @@ func (c Events) PostLargeAttachment(
us, err := c.LargeItem.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
ByCalendarId(containerID).
ByCalendarIdString(containerID).
Events().
ByEventId(parentItemID).
ByEventIdString(parentItemID).
Attachments().
CreateUploadSession().
Post(ctx, session, nil)

View File

@ -43,7 +43,7 @@ func (c Events) EnumerateContainers(
builder = c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars()
)
@ -124,9 +124,9 @@ func (c Events) NewEventsPager(
builder := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
ByCalendarId(containerID).
ByCalendarIdString(containerID).
Events()
return &eventsPageCtrl{c.Stable, builder, options}
@ -196,9 +196,9 @@ func (c Events) NewEventIDsPager(
builder := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Calendars().
ByCalendarId(containerID).
ByCalendarIdString(containerID).
Events()
return &eventIDPager{c.Stable, builder, options}, nil

View File

@ -45,9 +45,9 @@ func (suite *EventsPagerIntgSuite) TestEvents_GetItemsInContainerByCollisionKey(
evts, err := ac.Stable.
Client().
Users().
ByUserId(suite.its.user.id).
ByUserIdString(suite.its.user.id).
Calendars().
ByCalendarId(ptr.Val(container.GetId())).
ByCalendarIdString(ptr.Val(container.GetId())).
Events().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(err))

View File

@ -106,7 +106,7 @@ func (c Groups) GetByID(
return nil, err
}
resp, err := service.Client().Groups().ByGroupId(identifier).Get(ctx, nil)
resp, err := service.Client().Groups().ByGroupIdString(identifier).Get(ctx, nil)
if err != nil {
err := graph.Wrap(ctx, err, "getting group by id")
@ -129,9 +129,9 @@ func (c Groups) GetRootSite(
resp, err := service.
Client().
Groups().
ByGroupId(identifier).
ByGroupIdString(identifier).
Sites().
BySiteId("root").
BySiteIdString("root").
Get(ctx, nil)
if err != nil {
return nil, clues.Wrap(err, "getting root site for group")

View File

@ -42,7 +42,7 @@ func (c Lists) PostDrive(
builder := c.Stable.
Client().
Sites().
BySiteId(siteID).
BySiteIdString(siteID).
Lists()
newList, err := builder.Post(ctx, list, nil)
@ -56,7 +56,7 @@ func (c Lists) PostDrive(
// drive information is not returned by the list creation.
drive, err := builder.
ByListId(ptr.Val(newList.GetId())).
ByListIdString(ptr.Val(newList.GetId())).
Drive().
Get(ctx, nil)

View File

@ -53,9 +53,9 @@ func (c Mail) CreateContainer(
mdl, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(parentContainerID).
ByMailFolderIdString(parentContainerID).
ChildFolders().
Post(ctx, body, nil)
if err != nil {
@ -80,9 +80,9 @@ func (c Mail) DeleteContainer(
err = srv.Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Delete(ctx, nil)
if err != nil {
return graph.Stack(ctx, err)
@ -104,9 +104,9 @@ func (c Mail) GetContainerByID(
resp, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Get(ctx, config)
if err != nil {
return nil, graph.Stack(ctx, err)
@ -128,7 +128,7 @@ func (c Mail) GetContainerByName(
builder = c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders()
resp models.MailFolderCollectionResponseable
err error
@ -142,7 +142,7 @@ func (c Mail) GetContainerByName(
}
resp, err = builder.
ByMailFolderId(parentContainerID).
ByMailFolderIdString(parentContainerID).
ChildFolders().
Get(ctx, options)
} else {
@ -192,9 +192,9 @@ func (c Mail) MoveContainer(
_, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Move().
Post(ctx, body, nil)
if err != nil {
@ -212,9 +212,9 @@ func (c Mail) PatchFolder(
_, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Patch(ctx, body, nil)
if err != nil {
return graph.Wrap(ctx, err, "patching mail folder")
@ -246,9 +246,9 @@ func (c Mail) GetItem(
mail, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Messages().
ByMessageId(itemID).
ByMessageIdString(itemID).
Get(ctx, config)
if err != nil {
return nil, nil, graph.Stack(ctx, err)
@ -276,9 +276,9 @@ func (c Mail) GetItem(
attached, err := c.LargeItem.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Messages().
ByMessageId(itemID).
ByMessageIdString(itemID).
Attachments().
Get(ctx, attachConfig)
if err == nil {
@ -309,9 +309,9 @@ func (c Mail) GetItem(
attachments, err := c.LargeItem.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Messages().
ByMessageId(itemID).
ByMessageIdString(itemID).
Attachments().
Get(ctx, attachConfig)
if err != nil {
@ -331,11 +331,11 @@ func (c Mail) GetItem(
att, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Messages().
ByMessageId(itemID).
ByMessageIdString(itemID).
Attachments().
ByAttachmentId(ptr.Val(a.GetId())).
ByAttachmentIdString(ptr.Val(a.GetId())).
Get(ctx, attachConfig)
if err != nil {
// CannotOpenFileAttachment errors are not transient and
@ -377,9 +377,9 @@ func (c Mail) PostItem(
itm, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Messages().
Post(ctx, body, nil)
if err != nil {
@ -403,11 +403,11 @@ func (c Mail) MoveItem(
resp, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(oldContainerID).
ByMailFolderIdString(oldContainerID).
Messages().
ByMessageId(itemID).
ByMessageIdString(itemID).
Move().
Post(ctx, body, nil)
if err != nil {
@ -431,9 +431,9 @@ func (c Mail) DeleteItem(
err = srv.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Messages().
ByMessageId(itemID).
ByMessageIdString(itemID).
Delete(ctx, nil)
if err != nil {
return graph.Wrap(ctx, err, "deleting mail message")
@ -450,11 +450,11 @@ func (c Mail) PostSmallAttachment(
_, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Messages().
ByMessageId(parentItemID).
ByMessageIdString(parentItemID).
Attachments().
Post(ctx, body, nil)
if err != nil {
@ -476,11 +476,11 @@ func (c Mail) PostLargeAttachment(
us, err := c.LargeItem.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Messages().
ByMessageId(parentItemID).
ByMessageIdString(parentItemID).
Attachments().
CreateUploadSession().
Post(ctx, session, nil)

View File

@ -147,9 +147,9 @@ func (c Mail) NewMailPager(
builder := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Messages()
return &mailPageCtrl{c.Stable, builder, options}
@ -198,9 +198,9 @@ func (c Mail) NewMailIDsPager(
builder := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Messages()
return &mailIDPager{c.Stable, builder, config}
@ -291,9 +291,9 @@ func getMailDeltaBuilder(
builder := gs.
Client().
Users().
ByUserId(user).
ByUserIdString(user).
MailFolders().
ByMailFolderId(containerID).
ByMailFolderIdString(containerID).
Messages().
Delta()
@ -341,9 +341,9 @@ func (p *mailDeltaIDPager) Reset(ctx context.Context) {
p.builder = p.gs.
Client().
Users().
ByUserId(p.userID).
ByUserIdString(p.userID).
MailFolders().
ByMailFolderId(p.containerID).
ByMailFolderIdString(p.containerID).
Messages().
Delta()
}

View File

@ -46,9 +46,9 @@ func (suite *MailPagerIntgSuite) TestMail_GetItemsInContainerByCollisionKey() {
msgs, err := ac.Stable.
Client().
Users().
ByUserId(suite.its.user.id).
ByUserIdString(suite.its.user.id).
MailFolders().
ByMailFolderId(ptr.Val(container.GetId())).
ByMailFolderIdString(ptr.Val(container.GetId())).
Messages().
Get(ctx, nil)
require.NoError(t, err, clues.ToCore(err))
@ -101,9 +101,9 @@ func (suite *MailPagerIntgSuite) TestMail_GetItemsIDsInContainer() {
msgs, err := ac.Stable.
Client().
Users().
ByUserId(suite.its.user.id).
ByUserIdString(suite.its.user.id).
MailFolders().
ByMailFolderId(api.MailInbox).
ByMailFolderIdString(api.MailInbox).
Messages().
Get(ctx, config)
require.NoError(t, err, clues.ToCore(err))

View File

@ -39,7 +39,7 @@ func (c Sites) GetRoot(ctx context.Context) (models.Siteable, error) {
resp, err := c.Stable.
Client().
Sites().
BySiteId("root").
BySiteIdString("root").
Get(ctx, nil)
if err != nil {
return nil, graph.Wrap(ctx, err, "getting root site")
@ -120,7 +120,7 @@ func (c Sites) GetByID(ctx context.Context, identifier string) (models.Siteable,
resp, err = c.Stable.
Client().
Sites().
BySiteId(identifier).
BySiteIdString(identifier).
Get(ctx, nil)
if err != nil {
err := graph.Wrap(ctx, err, "getting site by id")
@ -196,7 +196,7 @@ func (c Sites) GetDefaultDrive(
d, err := c.Stable.
Client().
Sites().
BySiteId(site).
BySiteIdString(site).
Drive().
Get(ctx, nil)
if err != nil {

View File

@ -121,7 +121,7 @@ func (c Users) GetByID(ctx context.Context, identifier string) (models.Userable,
err error
)
resp, err = c.Stable.Client().Users().ByUserId(identifier).Get(ctx, nil)
resp, err = c.Stable.Client().Users().ByUserIdString(identifier).Get(ctx, nil)
if err != nil {
return nil, graph.Wrap(ctx, err, "getting user")
@ -291,9 +291,9 @@ func (c Users) GetMailInbox(
inbox, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(MailInbox).
ByMailFolderIdString(MailInbox).
Get(ctx, nil)
if err != nil {
return nil, graph.Wrap(ctx, err, "getting MailFolders")
@ -309,7 +309,7 @@ func (c Users) GetDefaultDrive(
d, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
Drive().
Get(ctx, nil)
if err != nil {
@ -338,9 +338,9 @@ func (c Users) GetFirstInboxMessage(
_, err := c.Stable.
Client().
Users().
ByUserId(userID).
ByUserIdString(userID).
MailFolders().
ByMailFolderId(inboxID).
ByMailFolderIdString(inboxID).
Messages().
Delta().
Get(ctx, config)