From bafbc88a4042ce3869cee25708dc7b2662e3138c Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 1 Sep 2026 17:19:43 +0200 Subject: [PATCH 1/2] graph: expose lockInfo on driveItems --- services/graph/pkg/service/v0/driveitems.go | 36 +++ .../graph/pkg/service/v0/driveitems_test.go | 55 ++++ .../libre-graph-api-go/model_drive_item.go | 36 +++ .../libre-graph-api-go/model_lock_info.go | 276 ++++++++++++++++++ 4 files changed, 403 insertions(+) create mode 100644 vendor/github.com/opencloud-eu/libre-graph-api-go/model_lock_info.go diff --git a/services/graph/pkg/service/v0/driveitems.go b/services/graph/pkg/service/v0/driveitems.go index 2f282dba40..6a715ad142 100644 --- a/services/graph/pkg/service/v0/driveitems.go +++ b/services/graph/pkg/service/v0/driveitems.go @@ -554,6 +554,8 @@ func cs3ResourceToDriveItem(logger *log.Logger, publicBaseURL *url.URL, res *sto } } + driveItem.LockInfo = lockToFacet(res.GetLock()) + if utils.IsProcessing(res) { // queuedDateTime stays absent, we do not track when postprocessing started driveItem.PendingOperations = &libregraph.PendingOperations{ @@ -564,6 +566,40 @@ func cs3ResourceToDriveItem(logger *log.Logger, publicBaseURL *url.URL, res *sto return driveItem, nil } +// lockToFacet maps a CS3 lock; WebDAV renders the same state as d:lockdiscovery. +// Only exclusive locks are reported, that is all OpenCloud issues. +func lockToFacet(lock *storageprovider.Lock) *libregraph.LockInfo { + switch lock.GetType() { + case storageprovider.LockType_LOCK_TYPE_EXCL, storageprovider.LockType_LOCK_TYPE_WRITE: + default: + return nil + } + + info := libregraph.NewLockInfo() + info.SetLockType("exclusive") + + if appName := lock.GetAppName(); appName != "" { + info.SetLibreGraphAppName(appName) + } + + if user := lock.GetUser(); user != nil { + info.SetOwners([]libregraph.Identity{{ + Id: libregraph.PtrString(user.GetOpaqueId()), + DisplayName: utils.ReadPlainFromOpaque(lock.GetOpaque(), "lockownername"), + }}) + } + + if lockTime, err := time.Parse(time.RFC3339, utils.ReadPlainFromOpaque(lock.GetOpaque(), "locktime")); err == nil { + info.SetCreatedDateTime(lockTime.UTC()) + } + + if expiration := lock.GetExpiration(); expiration != nil { + info.SetExpirationDateTime(time.Unix(int64(expiration.GetSeconds()), 0).UTC()) + } + + return info +} + // addShareTypes reads user and group shares off the grants, links from the share // manager. Links are not stored as grants, so they need one filter per item, // which is why the whole annotation is only built when it is selected. diff --git a/services/graph/pkg/service/v0/driveitems_test.go b/services/graph/pkg/service/v0/driveitems_test.go index ec12536933..f66bbe9425 100644 --- a/services/graph/pkg/service/v0/driveitems_test.go +++ b/services/graph/pkg/service/v0/driveitems_test.go @@ -13,6 +13,7 @@ import ( userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + typesv1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/go-chi/chi/v5" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -535,6 +536,60 @@ var _ = Describe("Driveitems", func() { Expect(res.Value[0].LibreGraphShareTypes).To(ConsistOf("user")) }) + It("returns the lock info of a locked item", func() { + // a lock time with a non-UTC offset, the way reva writes it + lockTime := time.Now().Truncate(time.Second).In(time.FixedZone("CEST", 2*60*60)) + gatewayClient.On("ListContainer", mock.Anything, mock.Anything).Return(&provider.ListContainerResponse{ + Status: status.NewOK(ctx), + Infos: []*provider.ResourceInfo{ + { + Type: provider.ResourceType_RESOURCE_TYPE_FILE, + Id: &provider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: "opaqueid"}, + Etag: "etag", + Mtime: utils.TimeToTS(mtime), + Lock: &provider.Lock{ + Type: provider.LockType_LOCK_TYPE_EXCL, + AppName: "Collabora", + User: &userpb.UserId{OpaqueId: "user-id"}, + Expiration: &typesv1beta1.Timestamp{Seconds: uint64(lockTime.Add(time.Hour).Unix())}, + Opaque: utils.AppendPlainToOpaque( + utils.AppendPlainToOpaque(nil, "lockownername", "Alice Hansen"), + "locktime", lockTime.Format(time.RFC3339)), + }, + }, + }, + }, nil) + + res := assertItemsList(1) + lock := res.Value[0].LockInfo + Expect(lock).ToNot(BeNil()) + Expect(lock.GetLockType()).To(Equal("exclusive")) + Expect(lock.GetLibreGraphAppName()).To(Equal("Collabora")) + Expect(lock.GetCreatedDateTime()).To(BeTemporally("==", lockTime)) + Expect(lock.GetCreatedDateTime().Location()).To(Equal(time.UTC)) + Expect(lock.GetExpirationDateTime().Location()).To(Equal(time.UTC)) + Expect(lock.GetExpirationDateTime()).To(BeTemporally("==", lockTime.Add(time.Hour))) + Expect(lock.GetOwners()).To(HaveLen(1)) + Expect(lock.GetOwners()[0].GetId()).To(Equal("user-id")) + Expect(lock.GetOwners()[0].GetDisplayName()).To(Equal("Alice Hansen")) + }) + + It("omits the lock info for an unlocked item", func() { + gatewayClient.On("ListContainer", mock.Anything, mock.Anything).Return(&provider.ListContainerResponse{ + Status: status.NewOK(ctx), + Infos: []*provider.ResourceInfo{ + { + Type: provider.ResourceType_RESOURCE_TYPE_FILE, + Id: &provider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: "opaqueid"}, + Etag: "etag", + Mtime: utils.TimeToTS(mtime), + }, + }, + }, nil) + + Expect(assertItemsList(1).Value[0].LockInfo).To(BeNil()) + }) + It("reports a pending content update while the item is being processed", func() { gatewayClient.On("ListContainer", mock.Anything, mock.Anything).Return(&provider.ListContainerResponse{ Status: status.NewOK(ctx), diff --git a/vendor/github.com/opencloud-eu/libre-graph-api-go/model_drive_item.go b/vendor/github.com/opencloud-eu/libre-graph-api-go/model_drive_item.go index 07e36220fc..1ef89e783f 100644 --- a/vendor/github.com/opencloud-eu/libre-graph-api-go/model_drive_item.go +++ b/vendor/github.com/opencloud-eu/libre-graph-api-go/model_drive_item.go @@ -68,6 +68,7 @@ type DriveItem struct { Video *Video `json:"video,omitempty"` LibreGraphMotionPhoto *MotionPhoto `json:"@libre.graph.motionPhoto,omitempty"` LibreGraphLivePhoto *LivePhoto `json:"@libre.graph.livePhoto,omitempty"` + LockInfo *LockInfo `json:"lockInfo,omitempty"` // Indicates if the item is synchronized with the underlying storage provider. Read-only. ClientSynchronize *bool `json:"@client.synchronize,omitempty"` // A pre-authenticated URL that can be used to download the item's content without providing an Authorization header. The URL is short-lived and cannot be cached. This annotation is only populated when explicitly requested via `$select`, and only for items that have a `file` facet. The returned URL is valid for a limited time and should be used promptly. @@ -1157,6 +1158,38 @@ func (o *DriveItem) SetLibreGraphLivePhoto(v LivePhoto) { o.LibreGraphLivePhoto = &v } +// GetLockInfo returns the LockInfo field value if set, zero value otherwise. +func (o *DriveItem) GetLockInfo() LockInfo { + if o == nil || IsNil(o.LockInfo) { + var ret LockInfo + return ret + } + return *o.LockInfo +} + +// GetLockInfoOk returns a tuple with the LockInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DriveItem) GetLockInfoOk() (*LockInfo, bool) { + if o == nil || IsNil(o.LockInfo) { + return nil, false + } + return o.LockInfo, true +} + +// HasLockInfo returns a boolean if a field has been set. +func (o *DriveItem) HasLockInfo() bool { + if o != nil && !IsNil(o.LockInfo) { + return true + } + + return false +} + +// SetLockInfo gets a reference to the given LockInfo and assigns it to the LockInfo field. +func (o *DriveItem) SetLockInfo(v LockInfo) { + o.LockInfo = &v +} + // GetClientSynchronize returns the ClientSynchronize field value if set, zero value otherwise. func (o *DriveItem) GetClientSynchronize() bool { if o == nil || IsNil(o.ClientSynchronize) { @@ -1490,6 +1523,9 @@ func (o DriveItem) ToMap() (map[string]interface{}, error) { if !IsNil(o.LibreGraphLivePhoto) { toSerialize["@libre.graph.livePhoto"] = o.LibreGraphLivePhoto } + if !IsNil(o.LockInfo) { + toSerialize["lockInfo"] = o.LockInfo + } if !IsNil(o.ClientSynchronize) { toSerialize["@client.synchronize"] = o.ClientSynchronize } diff --git a/vendor/github.com/opencloud-eu/libre-graph-api-go/model_lock_info.go b/vendor/github.com/opencloud-eu/libre-graph-api-go/model_lock_info.go new file mode 100644 index 0000000000..0ee0c552b9 --- /dev/null +++ b/vendor/github.com/opencloud-eu/libre-graph-api-go/model_lock_info.go @@ -0,0 +1,276 @@ +/* +Libre Graph API + +Libre Graph is a free API for cloud collaboration inspired by the MS Graph API. + +API version: v1.0.8 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package libregraph + +import ( + "encoding/json" + "time" +) + +// checks if the LockInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LockInfo{} + +// LockInfo Read-only lock metadata for a file, matching the MS Graph beta lockInfo resource. Indicates whether the file is locked, the kind of lock, when it was created, when it expires and who holds it. +type LockInfo struct { + // The type of lock currently held on the file. OpenCloud currently only issues exclusive locks, same as MS Graph, even if it defines more. Read-only. + LockType *string `json:"lockType,omitempty"` + // The date and time when the lock was created, in UTC. Read-only. + CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` + // The date and time when the lock expires, in UTC. Read-only. + ExpirationDateTime *time.Time `json:"expirationDateTime,omitempty"` + // The collection of users that currently hold the lock on the file. Read-only. + Owners []Identity `json:"owners,omitempty"` + // Name of the application holding the lock, for example an office application. Not part of MS Graph. Read-only. + LibreGraphAppName *string `json:"@libre.graph.appName,omitempty"` +} + +// NewLockInfo instantiates a new LockInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLockInfo() *LockInfo { + this := LockInfo{} + return &this +} + +// NewLockInfoWithDefaults instantiates a new LockInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLockInfoWithDefaults() *LockInfo { + this := LockInfo{} + return &this +} + +// GetLockType returns the LockType field value if set, zero value otherwise. +func (o *LockInfo) GetLockType() string { + if o == nil || IsNil(o.LockType) { + var ret string + return ret + } + return *o.LockType +} + +// GetLockTypeOk returns a tuple with the LockType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LockInfo) GetLockTypeOk() (*string, bool) { + if o == nil || IsNil(o.LockType) { + return nil, false + } + return o.LockType, true +} + +// HasLockType returns a boolean if a field has been set. +func (o *LockInfo) HasLockType() bool { + if o != nil && !IsNil(o.LockType) { + return true + } + + return false +} + +// SetLockType gets a reference to the given string and assigns it to the LockType field. +func (o *LockInfo) SetLockType(v string) { + o.LockType = &v +} + +// GetCreatedDateTime returns the CreatedDateTime field value if set, zero value otherwise. +func (o *LockInfo) GetCreatedDateTime() time.Time { + if o == nil || IsNil(o.CreatedDateTime) { + var ret time.Time + return ret + } + return *o.CreatedDateTime +} + +// GetCreatedDateTimeOk returns a tuple with the CreatedDateTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LockInfo) GetCreatedDateTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedDateTime) { + return nil, false + } + return o.CreatedDateTime, true +} + +// HasCreatedDateTime returns a boolean if a field has been set. +func (o *LockInfo) HasCreatedDateTime() bool { + if o != nil && !IsNil(o.CreatedDateTime) { + return true + } + + return false +} + +// SetCreatedDateTime gets a reference to the given time.Time and assigns it to the CreatedDateTime field. +func (o *LockInfo) SetCreatedDateTime(v time.Time) { + o.CreatedDateTime = &v +} + +// GetExpirationDateTime returns the ExpirationDateTime field value if set, zero value otherwise. +func (o *LockInfo) GetExpirationDateTime() time.Time { + if o == nil || IsNil(o.ExpirationDateTime) { + var ret time.Time + return ret + } + return *o.ExpirationDateTime +} + +// GetExpirationDateTimeOk returns a tuple with the ExpirationDateTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LockInfo) GetExpirationDateTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpirationDateTime) { + return nil, false + } + return o.ExpirationDateTime, true +} + +// HasExpirationDateTime returns a boolean if a field has been set. +func (o *LockInfo) HasExpirationDateTime() bool { + if o != nil && !IsNil(o.ExpirationDateTime) { + return true + } + + return false +} + +// SetExpirationDateTime gets a reference to the given time.Time and assigns it to the ExpirationDateTime field. +func (o *LockInfo) SetExpirationDateTime(v time.Time) { + o.ExpirationDateTime = &v +} + +// GetOwners returns the Owners field value if set, zero value otherwise. +func (o *LockInfo) GetOwners() []Identity { + if o == nil || IsNil(o.Owners) { + var ret []Identity + return ret + } + return o.Owners +} + +// GetOwnersOk returns a tuple with the Owners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LockInfo) GetOwnersOk() ([]Identity, bool) { + if o == nil || IsNil(o.Owners) { + return nil, false + } + return o.Owners, true +} + +// HasOwners returns a boolean if a field has been set. +func (o *LockInfo) HasOwners() bool { + if o != nil && !IsNil(o.Owners) { + return true + } + + return false +} + +// SetOwners gets a reference to the given []Identity and assigns it to the Owners field. +func (o *LockInfo) SetOwners(v []Identity) { + o.Owners = v +} + +// GetLibreGraphAppName returns the LibreGraphAppName field value if set, zero value otherwise. +func (o *LockInfo) GetLibreGraphAppName() string { + if o == nil || IsNil(o.LibreGraphAppName) { + var ret string + return ret + } + return *o.LibreGraphAppName +} + +// GetLibreGraphAppNameOk returns a tuple with the LibreGraphAppName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LockInfo) GetLibreGraphAppNameOk() (*string, bool) { + if o == nil || IsNil(o.LibreGraphAppName) { + return nil, false + } + return o.LibreGraphAppName, true +} + +// HasLibreGraphAppName returns a boolean if a field has been set. +func (o *LockInfo) HasLibreGraphAppName() bool { + if o != nil && !IsNil(o.LibreGraphAppName) { + return true + } + + return false +} + +// SetLibreGraphAppName gets a reference to the given string and assigns it to the LibreGraphAppName field. +func (o *LockInfo) SetLibreGraphAppName(v string) { + o.LibreGraphAppName = &v +} + +func (o LockInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LockInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LockType) { + toSerialize["lockType"] = o.LockType + } + if !IsNil(o.CreatedDateTime) { + toSerialize["createdDateTime"] = o.CreatedDateTime + } + if !IsNil(o.ExpirationDateTime) { + toSerialize["expirationDateTime"] = o.ExpirationDateTime + } + if !IsNil(o.Owners) { + toSerialize["owners"] = o.Owners + } + if !IsNil(o.LibreGraphAppName) { + toSerialize["@libre.graph.appName"] = o.LibreGraphAppName + } + return toSerialize, nil +} + +type NullableLockInfo struct { + value *LockInfo + isSet bool +} + +func (v NullableLockInfo) Get() *LockInfo { + return v.value +} + +func (v *NullableLockInfo) Set(val *LockInfo) { + v.value = val + v.isSet = true +} + +func (v NullableLockInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableLockInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLockInfo(val *LockInfo) *NullableLockInfo { + return &NullableLockInfo{value: val, isSet: true} +} + +func (v NullableLockInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLockInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + From 9a769b8019cfced5ada6ad50815258a5bdbe049a Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 3 Sep 2026 16:02:43 +0000 Subject: [PATCH 2/2] build(deps): bump github.com/opencloud-eu/libre-graph-api-go to 45af3945a067 --- go.mod | 2 +- go.sum | 6 +-- .../opencloud-eu/libre-graph-api-go/README.md | 1 + .../libre-graph-api-go/api_drive_item.go | 20 ++++++++++ .../libre-graph-api-go/api_drives_root.go | 10 +++++ .../libre-graph-api-go/api_me_drive_root.go | 10 +++++ .../model_drive_recipient.go | 37 +++++++++++++++++++ vendor/modules.txt | 2 +- 8 files changed, 82 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 8c65fdbf3a..bfea1ccb90 100644 --- a/go.mod +++ b/go.mod @@ -62,7 +62,7 @@ require ( github.com/onsi/gomega v1.42.1 github.com/open-policy-agent/opa v1.19.1 github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 - github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260901115715-6c4a98340429 + github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260902170011-45af3945a067 github.com/opencloud-eu/reva/v2 v2.49.0 github.com/opensearch-project/opensearch-go/v4 v4.7.3 github.com/orcaman/concurrent-map v1.0.0 diff --git a/go.sum b/go.sum index 1b63c2319b..498b313011 100644 --- a/go.sum +++ b/go.sum @@ -940,10 +940,8 @@ github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-202505121527 github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a/go.mod h1:pjcozWijkNPbEtX5SIQaxEW/h8VAVZYTLx+70bmB3LY= github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 h1:W1ms+lP5lUUIzjRGDg93WrQfZJZCaV1ZP3KeyXi8bzY= github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89/go.mod h1:vigJkNss1N2QEceCuNw/ullDehncuJNFB6mEnzfq9UI= -github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260901070651-08a5330ce57d h1:3zbb31655ZvqwLMWMIiUAhYer6YcFnv/oguujnX7aOU= -github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260901070651-08a5330ce57d/go.mod h1:lTM8JeGblNpoMySTW7Lui2+c5TTLI95mwxtdUIHHrhU= -github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260901115715-6c4a98340429 h1:i/C5/1I0eRkjOcdtqQboyPvV0bPyAOahe/wWHGupKVY= -github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260901115715-6c4a98340429/go.mod h1:lTM8JeGblNpoMySTW7Lui2+c5TTLI95mwxtdUIHHrhU= +github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260902170011-45af3945a067 h1:UkNMKauyJAzY6RE6mmthz9bQZLYkbvBuApm7ZDCparE= +github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260902170011-45af3945a067/go.mod h1:lTM8JeGblNpoMySTW7Lui2+c5TTLI95mwxtdUIHHrhU= github.com/opencloud-eu/reva/v2 v2.49.0 h1:AwECMDDth3NUaihZRf9bI9HNpWutvaRijOCvQyQfTT4= github.com/opencloud-eu/reva/v2 v2.49.0/go.mod h1:Frg+UWnVcSy+412UB3l2LcD0KY8ZNu1samimwkNywbg= github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4 h1:l2oB/RctH+t8r7QBj5p8thfEHCM/jF35aAY3WQ3hADI= diff --git a/vendor/github.com/opencloud-eu/libre-graph-api-go/README.md b/vendor/github.com/opencloud-eu/libre-graph-api-go/README.md index 816ad6e916..78df682736 100644 --- a/vendor/github.com/opencloud-eu/libre-graph-api-go/README.md +++ b/vendor/github.com/opencloud-eu/libre-graph-api-go/README.md @@ -233,6 +233,7 @@ Class | Method | HTTP request | Description - [InvitedUserMessageInfo](docs/InvitedUserMessageInfo.md) - [ItemReference](docs/ItemReference.md) - [LivePhoto](docs/LivePhoto.md) + - [LockInfo](docs/LockInfo.md) - [MemberReference](docs/MemberReference.md) - [MotionPhoto](docs/MotionPhoto.md) - [ObjectIdentity](docs/ObjectIdentity.md) diff --git a/vendor/github.com/opencloud-eu/libre-graph-api-go/api_drive_item.go b/vendor/github.com/opencloud-eu/libre-graph-api-go/api_drive_item.go index 598d9203c5..286f9658e2 100644 --- a/vendor/github.com/opencloud-eu/libre-graph-api-go/api_drive_item.go +++ b/vendor/github.com/opencloud-eu/libre-graph-api-go/api_drive_item.go @@ -350,6 +350,7 @@ type ApiGetDriveItemRequest struct { driveId string itemId string select_ *[]string + expand *[]string } // Select additional properties to be returned. @@ -358,6 +359,12 @@ func (r ApiGetDriveItemRequest) Select_(select_ []string) ApiGetDriveItemRequest return r } +// Expand related entities to be returned. +func (r ApiGetDriveItemRequest) Expand(expand []string) ApiGetDriveItemRequest { + r.expand = &expand + return r +} + func (r ApiGetDriveItemRequest) Execute() (*DriveItem, *http.Response, error) { return r.ApiService.GetDriveItemExecute(r) } @@ -408,6 +415,9 @@ func (a *DriveItemApiService) GetDriveItemExecute(r ApiGetDriveItemRequest) (*Dr if r.select_ != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } + if r.expand != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -755,6 +765,7 @@ type ApiGetDriveItemV1Request struct { driveId string itemId string select_ *[]string + expand *[]string } // Select additional properties to be returned. @@ -763,6 +774,12 @@ func (r ApiGetDriveItemV1Request) Select_(select_ []string) ApiGetDriveItemV1Req return r } +// Expand related entities to be returned. +func (r ApiGetDriveItemV1Request) Expand(expand []string) ApiGetDriveItemV1Request { + r.expand = &expand + return r +} + func (r ApiGetDriveItemV1Request) Execute() (*DriveItem, *http.Response, error) { return r.ApiService.GetDriveItemV1Execute(r) } @@ -816,6 +833,9 @@ func (a *DriveItemApiService) GetDriveItemV1Execute(r ApiGetDriveItemV1Request) if r.select_ != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } + if r.expand != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/opencloud-eu/libre-graph-api-go/api_drives_root.go b/vendor/github.com/opencloud-eu/libre-graph-api-go/api_drives_root.go index ee0b03a324..977c75e546 100644 --- a/vendor/github.com/opencloud-eu/libre-graph-api-go/api_drives_root.go +++ b/vendor/github.com/opencloud-eu/libre-graph-api-go/api_drives_root.go @@ -548,6 +548,7 @@ type ApiGetRootRequest struct { ApiService *DrivesRootApiService driveId string select_ *[]string + expand *[]string } // Select additional properties to be returned. @@ -556,6 +557,12 @@ func (r ApiGetRootRequest) Select_(select_ []string) ApiGetRootRequest { return r } +// Expand related entities to be returned. +func (r ApiGetRootRequest) Expand(expand []string) ApiGetRootRequest { + r.expand = &expand + return r +} + func (r ApiGetRootRequest) Execute() (*DriveItem, *http.Response, error) { return r.ApiService.GetRootExecute(r) } @@ -600,6 +607,9 @@ func (a *DrivesRootApiService) GetRootExecute(r ApiGetRootRequest) (*DriveItem, if r.select_ != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } + if r.expand != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/opencloud-eu/libre-graph-api-go/api_me_drive_root.go b/vendor/github.com/opencloud-eu/libre-graph-api-go/api_me_drive_root.go index bb435a2b46..b2885f0e7a 100644 --- a/vendor/github.com/opencloud-eu/libre-graph-api-go/api_me_drive_root.go +++ b/vendor/github.com/opencloud-eu/libre-graph-api-go/api_me_drive_root.go @@ -26,6 +26,7 @@ type ApiHomeGetRootRequest struct { ctx context.Context ApiService *MeDriveRootApiService select_ *[]string + expand *[]string } // Select additional properties to be returned. @@ -34,6 +35,12 @@ func (r ApiHomeGetRootRequest) Select_(select_ []string) ApiHomeGetRootRequest { return r } +// Expand related entities to be returned. +func (r ApiHomeGetRootRequest) Expand(expand []string) ApiHomeGetRootRequest { + r.expand = &expand + return r +} + func (r ApiHomeGetRootRequest) Execute() (*DriveItem, *http.Response, error) { return r.ApiService.HomeGetRootExecute(r) } @@ -75,6 +82,9 @@ func (a *MeDriveRootApiService) HomeGetRootExecute(r ApiHomeGetRootRequest) (*Dr if r.select_ != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } + if r.expand != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/opencloud-eu/libre-graph-api-go/model_drive_recipient.go b/vendor/github.com/opencloud-eu/libre-graph-api-go/model_drive_recipient.go index 7692e064e3..ed620323e0 100644 --- a/vendor/github.com/opencloud-eu/libre-graph-api-go/model_drive_recipient.go +++ b/vendor/github.com/opencloud-eu/libre-graph-api-go/model_drive_recipient.go @@ -19,6 +19,8 @@ var _ MappedNullable = &DriveRecipient{} // DriveRecipient Represents a person, group, or other recipient to share a drive item with using the invite action. When using invite to add permissions, the `driveRecipient` object would specify the `email`, `alias`, or `objectId` of the recipient. Only one of these values is required; multiple values are not accepted. type DriveRecipient struct { + // The email address for the recipient, if the recipient has an associated email address. + Email *string `json:"email,omitempty"` // The unique identifier for the recipient in the directory. ObjectId *string `json:"objectId,omitempty"` // When the recipient is referenced by objectId this annotation is used to differentiate `user` and `group` recipients. @@ -46,6 +48,38 @@ func NewDriveRecipientWithDefaults() *DriveRecipient { return &this } +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *DriveRecipient) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DriveRecipient) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *DriveRecipient) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *DriveRecipient) SetEmail(v string) { + o.Email = &v +} + // GetObjectId returns the ObjectId field value if set, zero value otherwise. func (o *DriveRecipient) GetObjectId() string { if o == nil || IsNil(o.ObjectId) { @@ -120,6 +154,9 @@ func (o DriveRecipient) MarshalJSON() ([]byte, error) { func (o DriveRecipient) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } if !IsNil(o.ObjectId) { toSerialize["objectId"] = o.ObjectId } diff --git a/vendor/modules.txt b/vendor/modules.txt index 421f0afe74..29de6f7c2b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1364,7 +1364,7 @@ github.com/open-policy-agent/opa/v1/version # github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 ## explicit; go 1.24.6 github.com/opencloud-eu/icap-client -# github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260901115715-6c4a98340429 +# github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260902170011-45af3945a067 ## explicit; go 1.23 github.com/opencloud-eu/libre-graph-api-go # github.com/opencloud-eu/reva/v2 v2.49.0