mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-14 04:27:34 +00:00
fixup! fixup! fixup! fixup! fixup! refactor(api): moving organization API resourced based
This commit is contained in:
110
proto/zitadel/org/v2beta/org.proto
Normal file
110
proto/zitadel/org/v2beta/org.proto
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package zitadel.org.v2beta;
|
||||||
|
|
||||||
|
option go_package = "github.com/zitadel/zitadel/pkg/grpc/org/v2beta;org";
|
||||||
|
|
||||||
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||||
|
import "validate/validate.proto";
|
||||||
|
import "zitadel/object/v2beta/object.proto";
|
||||||
|
|
||||||
|
message Organization {
|
||||||
|
// Unique identifier of the organization.
|
||||||
|
string id = 1 [
|
||||||
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"69629023906488334\""
|
||||||
|
}
|
||||||
|
];
|
||||||
|
zitadel.object.v2beta.Details details = 2;
|
||||||
|
// Current state of the organization, for example active, inactive and deleted.
|
||||||
|
OrganizationState state = 3;
|
||||||
|
// Name of the organization.
|
||||||
|
string name = 4 [
|
||||||
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"ZITADEL\"";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
// Primary domain used in the organization.
|
||||||
|
string primary_domain = 5 [
|
||||||
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"zitadel.cloud\"";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
enum OrganizationState {
|
||||||
|
ORGANIZATION_STATE_UNSPECIFIED = 0;
|
||||||
|
ORGANIZATION_STATE_ACTIVE = 1;
|
||||||
|
ORGANIZATION_STATE_INACTIVE = 2;
|
||||||
|
ORGANIZATION_STATE_REMOVED = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message OrgQuery {
|
||||||
|
oneof query {
|
||||||
|
option (validate.required) = true;
|
||||||
|
|
||||||
|
OrgNameQuery name_query = 1;
|
||||||
|
OrgDomainQuery domain_query = 2;
|
||||||
|
OrgStateQuery state_query = 3;
|
||||||
|
OrgIDQuery id_query = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
message OrgNameQuery {
|
||||||
|
string name = 1 [
|
||||||
|
(validate.rules).string = {max_len: 200},
|
||||||
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"ZITADEL\"";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
zitadel.object.v2beta.TextQueryMethod method = 2 [
|
||||||
|
(validate.rules).enum.defined_only = true,
|
||||||
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
description: "defines which text equality method is used";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
message OrgDomainQuery {
|
||||||
|
string domain = 1 [
|
||||||
|
(validate.rules).string = {max_len: 200},
|
||||||
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"citadel.cloud\"";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
zitadel.object.v2beta.TextQueryMethod method = 2 [
|
||||||
|
(validate.rules).enum.defined_only = true,
|
||||||
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
description: "defines which text equality method is used";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
message OrgStateQuery {
|
||||||
|
OrgState state = 1 [
|
||||||
|
(validate.rules).enum.defined_only = true,
|
||||||
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
description: "current state of the organization";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
message OrgIDQuery {
|
||||||
|
string id = 1 [
|
||||||
|
(validate.rules).string = {max_len: 200},
|
||||||
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"69629023906488334\""
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
enum OrgState {
|
||||||
|
ORG_STATE_UNSPECIFIED = 0;
|
||||||
|
ORG_STATE_ACTIVE = 1;
|
||||||
|
ORG_STATE_INACTIVE = 2;
|
||||||
|
ORG_STATE_REMOVED = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum OrgFieldName {
|
||||||
|
ORG_FIELD_NAME_UNSPECIFIED = 0;
|
||||||
|
ORG_FIELD_NAME_NAME = 1;
|
||||||
|
}
|
Reference in New Issue
Block a user