-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the definition of directories for all products (#17)
* Updated the definition of directories for all products * Flow directories renamed * Update of protobuffers * Add user_email as parameter to ClassifierDestroyRequest (required due to rapidpro update) Co-authored-by: Joao <[email protected]>
- Loading branch information
1 parent
a84bb86
commit d365cdc
Showing
10 changed files
with
204 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
syntax = "proto3"; | ||
|
||
package weni.connect.project; | ||
|
||
import "google/protobuf/empty.proto"; | ||
|
||
service ProjectController { | ||
rpc Classifier(ClassifierListRequest) returns (stream ClassifierResponse) {} | ||
rpc CreateClassifier(ClassifierCreateRequest) returns (ClassifierResponse) {} | ||
rpc RetrieveClassifier(ClassifierRetrieveRequest) returns (ClassifierResponse) {} | ||
rpc DestroyClassifier(ClassifierDestroyRequest) returns (google.protobuf.Empty) {} | ||
} | ||
|
||
message ClassifierResponse { | ||
string authorization_uuid = 1; | ||
string classifier_type = 2; | ||
string name = 3; | ||
bool is_active = 4; | ||
string uuid = 5; | ||
} | ||
|
||
message ClassifierListRequest { | ||
string project_uuid = 1; | ||
} | ||
|
||
message ClassifierCreateRequest { | ||
string project_uuid = 1; | ||
string user = 2; | ||
string classifier_type = 3; | ||
string name = 4; | ||
string access_token = 5; | ||
} | ||
|
||
message ClassifierRetrieveRequest { | ||
string uuid = 1; | ||
} | ||
|
||
message ClassifierDestroyRequest { | ||
string uuid = 1; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,3 @@ message OrgStatistic { | |
int32 active_classifiers = 2; | ||
int32 active_contacts = 3; | ||
} | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
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) {} | ||
} | ||
|
||
service UserLanguageController { | ||
rpc Update(UserLanguageUpdateRequest) 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 UserLanguageUpdateRequest { | ||
string email = 1; | ||
string language = 2; | ||
} | ||
|
||
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 language = 5; | ||
string joined_at = 6; | ||
bool is_active = 7; | ||
bool is_superuser = 8; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
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) {} | ||
rpc Retrieve(OrgStatisticRetrieveRequest) returns (OrgStatistic) {} | ||
} | ||
|
||
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 organization_name = 1; | ||
string user_email = 2; | ||
} | ||
|
||
message OrgDestroyRequest { | ||
int32 id = 1; | ||
string user_email = 2; | ||
} | ||
|
||
message OrgUpdateRequest { | ||
int32 id = 1; | ||
optional string name = 2; | ||
} | ||
|
||
message OrgStatisticRetrieveRequest { | ||
int32 org_id = 1; | ||
} | ||
|
||
message OrgStatistic { | ||
int32 repositories_count = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
syntax = "proto3"; | ||
|
||
package weni.bothub.repository; | ||
|
||
service RepositoryController { | ||
rpc List(RepositoryListRequest) returns (stream Repository) {} | ||
rpc RetrieveAuthorization(RepositoryAuthorizationRetrieveRequest) returns (Repository) {} | ||
} | ||
|
||
message Repository { | ||
string uuid = 1; | ||
string name = 2; | ||
string slug = 3; | ||
string description = 4; | ||
bool is_private = 5; | ||
string created_at = 6; | ||
string language = 7; | ||
int32 owner = 8; | ||
string algorithm = 9; | ||
bool use_competing_intents = 10; | ||
bool use_name_entities = 11; | ||
bool use_analyze_char = 12; | ||
string repository_type = 13; | ||
string owner__nickname = 14; | ||
repeated Intent intents = 15; | ||
repeated int32 categories = 16; | ||
repeated string available_languages = 17; | ||
repeated Category categories_list = 18; | ||
} | ||
|
||
message Intent { | ||
int32 id = 1; | ||
string value = 2; | ||
int32 examples__count = 3; | ||
} | ||
|
||
message Category { | ||
int32 id = 1; | ||
string name = 2; | ||
string icon = 3; | ||
} | ||
|
||
message RepositoryListRequest { | ||
optional int32 org_id = 1; | ||
string name = 2; | ||
} | ||
|
||
message RepositoryAuthorizationRetrieveRequest { | ||
string repository_authorization = 1; | ||
} |