Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the definition of directories for all products #17

Merged
merged 5 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions connect/project.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";

package weni.connect.project;

service ProjectController {
rpc Classifier(ClassifierListRequest) returns (stream ClassifierResponse) {}
}

message ClassifierResponse {
string authorization_uuid = 1;
string classifier_type = 2;
string name = 3;
}

message ClassifierListRequest {
string project_uuid = 1;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
50 changes: 50 additions & 0 deletions inteligence/authentication.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
syntax = "proto3";

package weni.bothub.authentication;

import "google/protobuf/empty.proto";

service UserPermissionController {
rpc Retrieve(UserPermissionRetrieveRequest) returns (Permission) {}
rpc Update(UserPermissionUpdateRequest) returns (Permission) {}
rpc Remove(UserPermissionRemoveRequest) returns (google.protobuf.Empty) {}
}

service UserController {
rpc Retrieve(UserRetrieveRequest) returns (User) {}
}

message UserPermissionRetrieveRequest {
string org_user_email = 1;
int32 org_id = 2;
}

message UserPermissionUpdateRequest {
int32 org_id = 1;
string user_email = 2;
int32 permission = 3;
}

message UserPermissionRemoveRequest {
int32 org_id = 1;
string user_email = 2;
int32 permission = 3;
}

message Permission {
int32 role = 1;
}

message UserRetrieveRequest {
string email = 1;
}

message User {
int32 id = 1;
string email = 2;
string nickname = 3;
string name = 4;
string joined_at = 6;
bool is_active = 7;
bool is_superuser = 8;
}
45 changes: 45 additions & 0 deletions inteligence/organization.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
syntax = "proto3";

package weni.bothub.org;

import "google/protobuf/empty.proto";

service OrgController {
rpc List(OrgListRequest) returns (stream Org) {}
rpc Create(OrgCreateRequest) returns (Org) {}
rpc Update(OrgUpdateRequest) returns (OrgUpdateRequest) {}
rpc Destroy(OrgDestroyRequest) returns (google.protobuf.Empty) {}
}

message Org {
int32 id = 1;
string name = 2;
repeated Users users = 3;
}

message Users {
int32 org_user_id = 1;
string org_user_email = 2;
string org_user_nickname = 3;
string org_user_name = 4;
}

message OrgListRequest {
string user_email = 1;
}

message OrgCreateRequest {
string name = 1;
string user_email = 2;
string user_nickname = 3;
}

message OrgDestroyRequest {
int32 id = 1;
string user_email = 2;
}

message OrgUpdateRequest {
int32 id = 1;
optional string name = 2;
}