From 86f1154741b6ab79c9b547f2771ac31a257b8844 Mon Sep 17 00:00:00 2001 From: Iraq Jaber Date: Thu, 24 Apr 2025 16:45:13 +0200 Subject: [PATCH] fixup! refactor(api): moving organization API resourced based --- proto/zitadel/org/v2beta/org_service.proto | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/proto/zitadel/org/v2beta/org_service.proto b/proto/zitadel/org/v2beta/org_service.proto index 37cc1b11cf..41e50b02ba 100644 --- a/proto/zitadel/org/v2beta/org_service.proto +++ b/proto/zitadel/org/v2beta/org_service.proto @@ -138,6 +138,30 @@ service OrganizationService { }; }; } + + rpc UpdateOrganization(UpdateOrganizationRequest) returns (UpdateOrganizationResponse) { + option (google.api.http) = { + put: "/v2beta/organizations" + body: "*" + }; + + option (zitadel.v1.auth_option) = { + permission: "org.write" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "Organizations"; + summary: "Update Organization"; + description: "Change the name of the organization." + responses: { + key: "200" + value: { + description: "OK"; + } + }; + }; + } + } message CreateOrganizationRequest{ @@ -172,3 +196,19 @@ message CreateOrganizationResponse{ string organization_id = 2; repeated CreatedAdmin created_admins = 3; } + +message UpdateOrganizationRequest { + string name = 1 [ + (validate.rules).string = {min_len: 1, max_len: 200}, + (google.api.field_behavior) = REQUIRED, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + min_length: 1; + max_length: 200; + example: "\"Customer 1\""; + } + ]; +} + +message UpdateOrganizationResponse { + zitadel.v1.ObjectDetails details = 1; +}