From cced61d921d79a64b3b908ff2115e46aefec253d Mon Sep 17 00:00:00 2001 From: Cleopatra Enjeck M Date: Wed, 4 Sep 2024 08:41:16 +0100 Subject: [PATCH] fix: update openapi Signed-off-by: Cleopatra Enjeck M --- .../Version000800Date20240828000000.php | 18 +- openapi.json | 183 +++++++++++------- src/shared/mixins/searchUserGroup.js | 6 +- src/types/openapi/openapi.ts | 98 +++++++--- 4 files changed, 197 insertions(+), 108 deletions(-) diff --git a/lib/Migration/Version000800Date20240828000000.php b/lib/Migration/Version000800Date20240828000000.php index a85e44d83..96ac21abc 100644 --- a/lib/Migration/Version000800Date20240828000000.php +++ b/lib/Migration/Version000800Date20240828000000.php @@ -28,15 +28,15 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - if ($schema->hasTable('tables_columns')) { - if ($schema->hasTable('tables_row_cells_usergroup')) { - $table = $schema->getTable('tables_columns'); - if (!$table->hasColumn('usergroup_select_teams')) { - $table->addColumn('usergroup_select_teams', Types::BOOLEAN, [ - 'notnull' => false, - 'default' => 0, - ]); - } + if ($schema->hasTable('tables_columns')) { + if ($schema->hasTable('tables_row_cells_usergroup')) { + $table = $schema->getTable('tables_columns'); + if (!$table->hasColumn('usergroup_select_teams')) { + $table->addColumn('usergroup_select_teams', Types::BOOLEAN, [ + 'notnull' => false, + 'default' => 0, + ]); + } } return $schema; } diff --git a/openapi.json b/openapi.json index 7e27390a1..754199a93 100644 --- a/openapi.json +++ b/openapi.json @@ -95,6 +95,7 @@ "usergroupMultipleItems", "usergroupSelectUsers", "usergroupSelectGroups", + "usergroupSelectTeams", "showUserStatus" ], "properties": { @@ -190,6 +191,9 @@ "usergroupSelectGroups": { "type": "boolean" }, + "usergroupSelectTeams": { + "type": "boolean" + }, "showUserStatus": { "type": "boolean" } @@ -2745,6 +2749,24 @@ "basic_auth": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "viewId": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "View ID" + } + } + } + } + } + }, "parameters": [ { "name": "tableId", @@ -2755,16 +2777,6 @@ "type": "integer", "format": "int64" } - }, - { - "name": "viewId", - "in": "query", - "description": "View ID", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } } ], "responses": { @@ -2978,6 +2990,11 @@ "nullable": true, "description": "Can select groups, if column type is usergroup" }, + "usergroupSelectTeams": { + "type": "boolean", + "nullable": true, + "description": "Can select teams, if column type is usergroup" + }, "usergroupShowUserStatus": { "type": "boolean", "nullable": true, @@ -3327,6 +3344,11 @@ "nullable": true, "description": "Can select groups, if column type is usergroup" }, + "usergroupSelectTeams": { + "type": "boolean", + "nullable": true, + "description": "Can select teams, if column type is usergroup" + }, "usergroupShowUserStatus": { "type": "boolean", "nullable": true, @@ -3541,6 +3563,11 @@ "nullable": true, "description": "Can select groups, if column type is usergroup" }, + "usergroupSelectTeams": { + "type": "boolean", + "nullable": true, + "description": "Can select teams, if column type is usergroup" + }, "usergroupShowUserStatus": { "type": "boolean", "nullable": true, @@ -3787,6 +3814,30 @@ "basic_auth": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Limit" + }, + "offset": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Offset" + } + } + } + } + } + }, "parameters": [ { "name": "tableId", @@ -3797,26 +3848,6 @@ "type": "integer", "format": "int64" } - }, - { - "name": "limit", - "in": "query", - "description": "Limit", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "offset", - "in": "query", - "description": "Offset", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } } ], "responses": { @@ -3902,6 +3933,30 @@ "basic_auth": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Limit" + }, + "offset": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Offset" + } + } + } + } + } + }, "parameters": [ { "name": "tableId", @@ -3912,26 +3967,6 @@ "type": "integer", "format": "int64" } - }, - { - "name": "limit", - "in": "query", - "description": "Limit", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "offset", - "in": "query", - "description": "Offset", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } } ], "responses": { @@ -4118,6 +4153,30 @@ "basic_auth": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Limit" + }, + "offset": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Offset" + } + } + } + } + } + }, "parameters": [ { "name": "viewId", @@ -4128,26 +4187,6 @@ "type": "integer", "format": "int64" } - }, - { - "name": "limit", - "in": "query", - "description": "Limit", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "offset", - "in": "query", - "description": "Offset", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } } ], "responses": { @@ -7895,6 +7934,10 @@ "type": "boolean", "description": "Whether you can select groups" }, + "usergroupSelectTeams": { + "type": "boolean", + "description": "Whether you can select teams" + }, "showUserStatus": { "type": "boolean", "description": "Whether to show the user's status" diff --git a/src/shared/mixins/searchUserGroup.js b/src/shared/mixins/searchUserGroup.js index db116b48d..754fdd261 100644 --- a/src/shared/mixins/searchUserGroup.js +++ b/src/shared/mixins/searchUserGroup.js @@ -60,13 +60,13 @@ export default { getShareTypeString() { const strings = [] if (this.selectUsers) { - strings.push('user') + strings.push('User') } if (this.selectGroups) { - strings.push('group') + strings.push('Group') } if (this?.selectTeams) { - strings.push('team') + strings.push('Team') } return strings.join(' or ') }, diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index 53034bb30..7a977ab80 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -781,6 +781,7 @@ export type components = { readonly usergroupMultipleItems: boolean; readonly usergroupSelectUsers: boolean; readonly usergroupSelectGroups: boolean; + readonly usergroupSelectTeams: boolean; readonly showUserStatus: boolean; }; readonly Context: { @@ -2060,10 +2061,7 @@ export interface operations { }; readonly "api1-index-table-columns": { readonly parameters: { - readonly query?: { - /** @description View ID */ - readonly viewId?: number | null; - }; + readonly query?: never; readonly header?: never; readonly path: { /** @description Table ID */ @@ -2071,7 +2069,17 @@ export interface operations { }; readonly cookie?: never; }; - readonly requestBody?: never; + readonly requestBody?: { + readonly content: { + readonly "application/json": { + /** + * Format: int64 + * @description View ID + */ + readonly viewId?: number | null; + }; + }; + }; readonly responses: { /** @description View deleted */ readonly 200: { @@ -2201,6 +2209,8 @@ export interface operations { readonly usergroupSelectUsers?: boolean | null; /** @description Can select groups, if column type is usergroup */ readonly usergroupSelectGroups?: boolean | null; + /** @description Can select teams, if column type is usergroup */ + readonly usergroupSelectTeams?: boolean | null; /** @description Whether to show the user's status, if column type is usergroup */ readonly usergroupShowUserStatus?: boolean | null; /** @@ -2402,6 +2412,8 @@ export interface operations { readonly usergroupSelectUsers?: boolean | null; /** @description Can select groups, if column type is usergroup */ readonly usergroupSelectGroups?: boolean | null; + /** @description Can select teams, if column type is usergroup */ + readonly usergroupSelectTeams?: boolean | null; /** @description Whether to show the user's status, if column type is usergroup */ readonly usergroupShowUserStatus?: boolean | null; /** @@ -2579,6 +2591,8 @@ export interface operations { readonly usergroupSelectUsers?: boolean | null; /** @description Can select groups, if column type is usergroup */ readonly usergroupSelectGroups?: boolean | null; + /** @description Can select teams, if column type is usergroup */ + readonly usergroupSelectTeams?: boolean | null; /** @description Whether to show the user's status, if column type is usergroup */ readonly usergroupShowUserStatus?: boolean | null; }; @@ -2663,12 +2677,7 @@ export interface operations { }; readonly "api1-index-table-rows-simple": { readonly parameters: { - readonly query?: { - /** @description Limit */ - readonly limit?: number | null; - /** @description Offset */ - readonly offset?: number | null; - }; + readonly query?: never; readonly header?: never; readonly path: { /** @description Table ID */ @@ -2676,7 +2685,22 @@ export interface operations { }; readonly cookie?: never; }; - readonly requestBody?: never; + readonly requestBody?: { + readonly content: { + readonly "application/json": { + /** + * Format: int64 + * @description Limit + */ + readonly limit?: number | null; + /** + * Format: int64 + * @description Offset + */ + readonly offset?: number | null; + }; + }; + }; readonly responses: { /** @description Row values returned */ readonly 200: { @@ -2723,12 +2747,7 @@ export interface operations { }; readonly "api1-index-table-rows": { readonly parameters: { - readonly query?: { - /** @description Limit */ - readonly limit?: number | null; - /** @description Offset */ - readonly offset?: number | null; - }; + readonly query?: never; readonly header?: never; readonly path: { /** @description Table ID */ @@ -2736,7 +2755,22 @@ export interface operations { }; readonly cookie?: never; }; - readonly requestBody?: never; + readonly requestBody?: { + readonly content: { + readonly "application/json": { + /** + * Format: int64 + * @description Limit + */ + readonly limit?: number | null; + /** + * Format: int64 + * @description Offset + */ + readonly offset?: number | null; + }; + }; + }; readonly responses: { /** @description Rows returned */ readonly 200: { @@ -2836,12 +2870,7 @@ export interface operations { }; readonly "api1-index-view-rows": { readonly parameters: { - readonly query?: { - /** @description Limit */ - readonly limit?: number | null; - /** @description Offset */ - readonly offset?: number | null; - }; + readonly query?: never; readonly header?: never; readonly path: { /** @description View ID */ @@ -2849,7 +2878,22 @@ export interface operations { }; readonly cookie?: never; }; - readonly requestBody?: never; + readonly requestBody?: { + readonly content: { + readonly "application/json": { + /** + * Format: int64 + * @description Limit + */ + readonly limit?: number | null; + /** + * Format: int64 + * @description Offset + */ + readonly offset?: number | null; + }; + }; + }; readonly responses: { /** @description Rows returned */ readonly 200: { @@ -4602,6 +4646,8 @@ export interface operations { readonly usergroupSelectUsers?: boolean; /** @description Whether you can select groups */ readonly usergroupSelectGroups?: boolean; + /** @description Whether you can select teams */ + readonly usergroupSelectTeams?: boolean; /** @description Whether to show the user's status */ readonly showUserStatus?: boolean; /** @description Description */