postWorkspaceRoleAssign

/workspace/role/assign

Response Dto/Entity: *core.OkayResponse

Request Dto/Entity: *workspaces.AssignRoleDto

message AssignRoleDto {
	string roleId = 1; // @tag(validate:"required")
	string userId = 2; // @tag(validate:"required")
}
export interface AssignRoleDto {
    /** @tag(validate:"required") */
    roleId: string;
    /** @tag(validate:"required") */
    userId: string;
}

postWorkspaceRole

/workspace/role

Response Dto/Entity: *workspaces.RoleEntity

message RoleEntity {
	string uniqueId  = 1; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;")
	string name      = 2; // @tag(polyglot:"name")

	optional string parentRoleId = 3;
	RoleEntity parentRole = 4;

	repeated string capabilitiesListId = 5;  // @tag(gorm:"-" sql:"-" json:"-")
	repeated CapabilityEntity capabilities  = 6;  // @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities")

	WorkspaceEntity workspace = 7;  // @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-")
	optional string workspaceId = 8;           // @tag(json:"workspaceId" gorm:"size:100;")
}
export interface RoleEntity {
    /** @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;") */
    uniqueId: string;
    /** @tag(polyglot:"name") */
    name: string;
    parentRoleId?: string | undefined;
    parentRole: RoleEntity | undefined;
    /** @tag(gorm:"-" sql:"-" json:"-") */
    capabilitiesListId: string[];
    /** @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities") */
    capabilities: CapabilityEntity[];
    /** @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-") */
    workspace: WorkspaceEntity | undefined;
    /** @tag(json:"workspaceId" gorm:"size:100;") */
    workspaceId?: string | undefined;
}

Request Dto/Entity: *workspaces.RoleEntity

message RoleEntity {
	string uniqueId  = 1; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;")
	string name      = 2; // @tag(polyglot:"name")

	optional string parentRoleId = 3;
	RoleEntity parentRole = 4;

	repeated string capabilitiesListId = 5;  // @tag(gorm:"-" sql:"-" json:"-")
	repeated CapabilityEntity capabilities  = 6;  // @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities")

	WorkspaceEntity workspace = 7;  // @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-")
	optional string workspaceId = 8;           // @tag(json:"workspaceId" gorm:"size:100;")
}
export interface RoleEntity {
    /** @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;") */
    uniqueId: string;
    /** @tag(polyglot:"name") */
    name: string;
    parentRoleId?: string | undefined;
    parentRole: RoleEntity | undefined;
    /** @tag(gorm:"-" sql:"-" json:"-") */
    capabilitiesListId: string[];
    /** @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities") */
    capabilities: CapabilityEntity[];
    /** @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-") */
    workspace: WorkspaceEntity | undefined;
    /** @tag(json:"workspaceId" gorm:"size:100;") */
    workspaceId?: string | undefined;
}

getWorkspaceRoles

/workspace/roles

Response Dto/Entity: *[]workspaces.RoleEntity

message RoleEntity {
	string uniqueId  = 1; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;")
	string name      = 2; // @tag(polyglot:"name")

	optional string parentRoleId = 3;
	RoleEntity parentRole = 4;

	repeated string capabilitiesListId = 5;  // @tag(gorm:"-" sql:"-" json:"-")
	repeated CapabilityEntity capabilities  = 6;  // @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities")

	WorkspaceEntity workspace = 7;  // @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-")
	optional string workspaceId = 8;           // @tag(json:"workspaceId" gorm:"size:100;")
}
export interface RoleEntity {
    /** @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;") */
    uniqueId: string;
    /** @tag(polyglot:"name") */
    name: string;
    parentRoleId?: string | undefined;
    parentRole: RoleEntity | undefined;
    /** @tag(gorm:"-" sql:"-" json:"-") */
    capabilitiesListId: string[];
    /** @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities") */
    capabilities: CapabilityEntity[];
    /** @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-") */
    workspace: WorkspaceEntity | undefined;
    /** @tag(json:"workspaceId" gorm:"size:100;") */
    workspaceId?: string | undefined;
}

getWorkspaceRoleById

/workspace/role/:id

Response Dto/Entity: *workspaces.RoleEntity

message RoleEntity {
	string uniqueId  = 1; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;")
	string name      = 2; // @tag(polyglot:"name")

	optional string parentRoleId = 3;
	RoleEntity parentRole = 4;

	repeated string capabilitiesListId = 5;  // @tag(gorm:"-" sql:"-" json:"-")
	repeated CapabilityEntity capabilities  = 6;  // @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities")

	WorkspaceEntity workspace = 7;  // @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-")
	optional string workspaceId = 8;           // @tag(json:"workspaceId" gorm:"size:100;")
}
export interface RoleEntity {
    /** @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;") */
    uniqueId: string;
    /** @tag(polyglot:"name") */
    name: string;
    parentRoleId?: string | undefined;
    parentRole: RoleEntity | undefined;
    /** @tag(gorm:"-" sql:"-" json:"-") */
    capabilitiesListId: string[];
    /** @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities") */
    capabilities: CapabilityEntity[];
    /** @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-") */
    workspace: WorkspaceEntity | undefined;
    /** @tag(json:"workspaceId" gorm:"size:100;") */
    workspaceId?: string | undefined;
}

Params: :id

deleteWorkspaceRoleById

/workspace/role/:id

Target Entity: *workspaces.RoleEntity

message RoleEntity {
	string uniqueId  = 1; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;")
	string name      = 2; // @tag(polyglot:"name")

	optional string parentRoleId = 3;
	RoleEntity parentRole = 4;

	repeated string capabilitiesListId = 5;  // @tag(gorm:"-" sql:"-" json:"-")
	repeated CapabilityEntity capabilities  = 6;  // @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities")

	WorkspaceEntity workspace = 7;  // @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-")
	optional string workspaceId = 8;           // @tag(json:"workspaceId" gorm:"size:100;")
}
export interface RoleEntity {
    /** @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;") */
    uniqueId: string;
    /** @tag(polyglot:"name") */
    name: string;
    parentRoleId?: string | undefined;
    parentRole: RoleEntity | undefined;
    /** @tag(gorm:"-" sql:"-" json:"-") */
    capabilitiesListId: string[];
    /** @tag(gorm:"many2many:role_capability;foreignKey:UniqueId;joinForeignKey:UniqueId;References:UniqueId;joinReferences:UniqueId" json:"capabilities") */
    capabilities: CapabilityEntity[];
    /** @tag(gorm:"foreignKey:WorkspaceId;references:UniqueId" json:"-") */
    workspace: WorkspaceEntity | undefined;
    /** @tag(json:"workspaceId" gorm:"size:100;") */
    workspaceId?: string | undefined;
}

Params: :id