From cfdde3b77cfade7c9477e41a29c21bad23ab9515 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Tue, 10 Jun 2025 14:05:56 +0200 Subject: [PATCH 1/2] chore(client): bump libre graph SDK --- .../web-client/src/graph/generated/api.ts | 68 +++++++++++++++---- .../web-client/src/graph/generated/base.ts | 2 +- .../web-client/src/graph/generated/common.ts | 2 +- .../src/graph/generated/configuration.ts | 2 +- .../web-client/src/graph/generated/index.ts | 2 +- 5 files changed, 57 insertions(+), 19 deletions(-) diff --git a/packages/web-client/src/graph/generated/api.ts b/packages/web-client/src/graph/generated/api.ts index 6aa7b8a18e..62b37c3318 100644 --- a/packages/web-client/src/graph/generated/api.ts +++ b/packages/web-client/src/graph/generated/api.ts @@ -4,7 +4,7 @@ * Libre Graph API * Libre Graph is a free API for cloud collaboration inspired by the MS Graph API. * - * The version of the OpenAPI document: v1.0.7 + * The version of the OpenAPI document: v1.0.8 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -543,6 +543,12 @@ export interface CollectionOfPermissionsWithAllowedValues { * @memberof CollectionOfPermissionsWithAllowedValues */ 'value'?: Array; + /** + * The total number of permissions available, only present if the `count` query parameter is set to true. + * @type {number} + * @memberof CollectionOfPermissionsWithAllowedValues + */ + '@odata.count'?: number; } /** * @@ -4032,10 +4038,12 @@ export const DrivesPermissionsApiAxiosParamCreator = function (configuration?: C * @param {string} itemId key: id of item * @param {string} [$filter] Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions. * @param {Set} [$select] Select properties to be returned. By default all properties are returned. Select the roles property to fetch the available sharing roles without resolving all the permissions. Combine this with the $filter parameter to fetch the actions applicable to federated users. + * @param {boolean} [$count] Include count of items + * @param {number} [$top] Show only the first n items * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listPermissions: async (driveId: string, itemId: string, $filter?: string, $select?: Set, options: RawAxiosRequestConfig = {}): Promise => { + listPermissions: async (driveId: string, itemId: string, $filter?: string, $select?: Set, $count?: boolean, $top?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'driveId' is not null or undefined assertParamExists('listPermissions', 'driveId', driveId) // verify required parameter 'itemId' is not null or undefined @@ -4068,6 +4076,14 @@ export const DrivesPermissionsApiAxiosParamCreator = function (configuration?: C localVarQueryParameter['$select'] = Array.from($select).join(COLLECTION_FORMATS.csv); } + if ($count !== undefined) { + localVarQueryParameter['$count'] = $count; + } + + if ($top !== undefined) { + localVarQueryParameter['$top'] = $top; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4264,11 +4280,13 @@ export const DrivesPermissionsApiFp = function(configuration?: Configuration) { * @param {string} itemId key: id of item * @param {string} [$filter] Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions. * @param {Set} [$select] Select properties to be returned. By default all properties are returned. Select the roles property to fetch the available sharing roles without resolving all the permissions. Combine this with the $filter parameter to fetch the actions applicable to federated users. + * @param {boolean} [$count] Include count of items + * @param {number} [$top] Show only the first n items * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listPermissions(driveId: string, itemId: string, $filter?: string, $select?: Set, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listPermissions(driveId, itemId, $filter, $select, options); + async listPermissions(driveId: string, itemId: string, $filter?: string, $select?: Set, $count?: boolean, $top?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listPermissions(driveId, itemId, $filter, $select, $count, $top, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DrivesPermissionsApi.listPermissions']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -4370,11 +4388,13 @@ export const DrivesPermissionsApiFactory = function (configuration?: Configurati * @param {string} itemId key: id of item * @param {string} [$filter] Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions. * @param {Set} [$select] Select properties to be returned. By default all properties are returned. Select the roles property to fetch the available sharing roles without resolving all the permissions. Combine this with the $filter parameter to fetch the actions applicable to federated users. + * @param {boolean} [$count] Include count of items + * @param {number} [$top] Show only the first n items * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listPermissions(driveId: string, itemId: string, $filter?: string, $select?: Set, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listPermissions(driveId, itemId, $filter, $select, options).then((request) => request(axios, basePath)); + listPermissions(driveId: string, itemId: string, $filter?: string, $select?: Set, $count?: boolean, $top?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listPermissions(driveId, itemId, $filter, $select, $count, $top, options).then((request) => request(axios, basePath)); }, /** * Set the password of a sharing permission. Only the `password` property can be modified this way. @@ -4475,12 +4495,14 @@ export class DrivesPermissionsApi extends BaseAPI { * @param {string} itemId key: id of item * @param {string} [$filter] Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions. * @param {Set} [$select] Select properties to be returned. By default all properties are returned. Select the roles property to fetch the available sharing roles without resolving all the permissions. Combine this with the $filter parameter to fetch the actions applicable to federated users. + * @param {boolean} [$count] Include count of items + * @param {number} [$top] Show only the first n items * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DrivesPermissionsApi */ - public listPermissions(driveId: string, itemId: string, $filter?: string, $select?: Set, options?: RawAxiosRequestConfig) { - return DrivesPermissionsApiFp(this.configuration).listPermissions(driveId, itemId, $filter, $select, options).then((request) => request(this.axios, this.basePath)); + public listPermissions(driveId: string, itemId: string, $filter?: string, $select?: Set, $count?: boolean, $top?: number, options?: RawAxiosRequestConfig) { + return DrivesPermissionsApiFp(this.configuration).listPermissions(driveId, itemId, $filter, $select, $count, $top, options).then((request) => request(this.axios, this.basePath)); } /** @@ -4797,10 +4819,12 @@ export const DrivesRootApiAxiosParamCreator = function (configuration?: Configur * @param {string} driveId key: id of drive * @param {string} [$filter] Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions. * @param {Set} [$select] Select properties to be returned. By default all properties are returned. Select the roles property to fetch the available sharing roles without resolving all the permissions. Combine this with the $filter parameter to fetch the actions applicable to federated users. + * @param {boolean} [$count] Include count of items + * @param {number} [$top] Show only the first n items * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listPermissionsSpaceRoot: async (driveId: string, $filter?: string, $select?: Set, options: RawAxiosRequestConfig = {}): Promise => { + listPermissionsSpaceRoot: async (driveId: string, $filter?: string, $select?: Set, $count?: boolean, $top?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'driveId' is not null or undefined assertParamExists('listPermissionsSpaceRoot', 'driveId', driveId) const localVarPath = `/v1beta1/drives/{drive-id}/root/permissions` @@ -4830,6 +4854,14 @@ export const DrivesRootApiAxiosParamCreator = function (configuration?: Configur localVarQueryParameter['$select'] = Array.from($select).join(COLLECTION_FORMATS.csv); } + if ($count !== undefined) { + localVarQueryParameter['$count'] = $count; + } + + if ($top !== undefined) { + localVarQueryParameter['$top'] = $top; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -5040,11 +5072,13 @@ export const DrivesRootApiFp = function(configuration?: Configuration) { * @param {string} driveId key: id of drive * @param {string} [$filter] Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions. * @param {Set} [$select] Select properties to be returned. By default all properties are returned. Select the roles property to fetch the available sharing roles without resolving all the permissions. Combine this with the $filter parameter to fetch the actions applicable to federated users. + * @param {boolean} [$count] Include count of items + * @param {number} [$top] Show only the first n items * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listPermissionsSpaceRoot(driveId: string, $filter?: string, $select?: Set, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listPermissionsSpaceRoot(driveId, $filter, $select, options); + async listPermissionsSpaceRoot(driveId: string, $filter?: string, $select?: Set, $count?: boolean, $top?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listPermissionsSpaceRoot(driveId, $filter, $select, $count, $top, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DrivesRootApi.listPermissionsSpaceRoot']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -5160,11 +5194,13 @@ export const DrivesRootApiFactory = function (configuration?: Configuration, bas * @param {string} driveId key: id of drive * @param {string} [$filter] Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions. * @param {Set} [$select] Select properties to be returned. By default all properties are returned. Select the roles property to fetch the available sharing roles without resolving all the permissions. Combine this with the $filter parameter to fetch the actions applicable to federated users. + * @param {boolean} [$count] Include count of items + * @param {number} [$top] Show only the first n items * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listPermissionsSpaceRoot(driveId: string, $filter?: string, $select?: Set, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listPermissionsSpaceRoot(driveId, $filter, $select, options).then((request) => request(axios, basePath)); + listPermissionsSpaceRoot(driveId: string, $filter?: string, $select?: Set, $count?: boolean, $top?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listPermissionsSpaceRoot(driveId, $filter, $select, $count, $top, options).then((request) => request(axios, basePath)); }, /** * Set the password of a sharing permission. Only the `password` property can be modified this way. @@ -5283,12 +5319,14 @@ export class DrivesRootApi extends BaseAPI { * @param {string} driveId key: id of drive * @param {string} [$filter] Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions. * @param {Set} [$select] Select properties to be returned. By default all properties are returned. Select the roles property to fetch the available sharing roles without resolving all the permissions. Combine this with the $filter parameter to fetch the actions applicable to federated users. + * @param {boolean} [$count] Include count of items + * @param {number} [$top] Show only the first n items * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DrivesRootApi */ - public listPermissionsSpaceRoot(driveId: string, $filter?: string, $select?: Set, options?: RawAxiosRequestConfig) { - return DrivesRootApiFp(this.configuration).listPermissionsSpaceRoot(driveId, $filter, $select, options).then((request) => request(this.axios, this.basePath)); + public listPermissionsSpaceRoot(driveId: string, $filter?: string, $select?: Set, $count?: boolean, $top?: number, options?: RawAxiosRequestConfig) { + return DrivesRootApiFp(this.configuration).listPermissionsSpaceRoot(driveId, $filter, $select, $count, $top, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/packages/web-client/src/graph/generated/base.ts b/packages/web-client/src/graph/generated/base.ts index 3979c64a17..c106a5c24d 100644 --- a/packages/web-client/src/graph/generated/base.ts +++ b/packages/web-client/src/graph/generated/base.ts @@ -4,7 +4,7 @@ * Libre Graph API * Libre Graph is a free API for cloud collaboration inspired by the MS Graph API. * - * The version of the OpenAPI document: v1.0.7 + * The version of the OpenAPI document: v1.0.8 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/packages/web-client/src/graph/generated/common.ts b/packages/web-client/src/graph/generated/common.ts index 0c7a89980c..17852fec95 100644 --- a/packages/web-client/src/graph/generated/common.ts +++ b/packages/web-client/src/graph/generated/common.ts @@ -4,7 +4,7 @@ * Libre Graph API * Libre Graph is a free API for cloud collaboration inspired by the MS Graph API. * - * The version of the OpenAPI document: v1.0.7 + * The version of the OpenAPI document: v1.0.8 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/packages/web-client/src/graph/generated/configuration.ts b/packages/web-client/src/graph/generated/configuration.ts index 851dfbdcca..270a953351 100644 --- a/packages/web-client/src/graph/generated/configuration.ts +++ b/packages/web-client/src/graph/generated/configuration.ts @@ -4,7 +4,7 @@ * Libre Graph API * Libre Graph is a free API for cloud collaboration inspired by the MS Graph API. * - * The version of the OpenAPI document: v1.0.7 + * The version of the OpenAPI document: v1.0.8 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/packages/web-client/src/graph/generated/index.ts b/packages/web-client/src/graph/generated/index.ts index 31ffb1e77d..59cbcd495e 100644 --- a/packages/web-client/src/graph/generated/index.ts +++ b/packages/web-client/src/graph/generated/index.ts @@ -4,7 +4,7 @@ * Libre Graph API * Libre Graph is a free API for cloud collaboration inspired by the MS Graph API. * - * The version of the OpenAPI document: v1.0.7 + * The version of the OpenAPI document: v1.0.8 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). From 0b5a3f1daa41feae41799d503518a37d827ea2b4 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Tue, 10 Jun 2025 14:13:28 +0200 Subject: [PATCH 2/2] fix: space member count in space header component --- .../src/components/Spaces/SpaceHeader.vue | 28 +++++++--------- .../components/Spaces/SpaceHeader.spec.ts | 33 ++++++++++++------- .../src/graph/permissions/permissions.ts | 7 +++- .../web-client/src/graph/permissions/types.ts | 3 ++ 4 files changed, 42 insertions(+), 29 deletions(-) diff --git a/packages/web-app-files/src/components/Spaces/SpaceHeader.vue b/packages/web-app-files/src/components/Spaces/SpaceHeader.vue index 1b23d54342..9afc9dd44a 100644 --- a/packages/web-app-files/src/components/Spaces/SpaceHeader.vue +++ b/packages/web-app-files/src/components/Spaces/SpaceHeader.vue @@ -109,7 +109,6 @@