Skip to content

Commit

Permalink
Version 6.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rok-clarifai committed Sep 15, 2020
1 parent 6d19e43 commit 8e26a33
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 30 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.7.0
6.8.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clarifai-nodejs-grpc",
"version": "6.7.0",
"version": "6.8.0",
"description": "The official Clarifai Node.js gRPC client",
"main": "src/index.js",
"repository": "https://github.com/Clarifai/clarifai-javascript-grpc",
Expand Down
11 changes: 11 additions & 0 deletions proto/clarifai/api/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,12 @@ message AnnotationSearchMetrics {

// The metric result
EvalMetrics metrics = 3;

// data is filled out with the concepts used for this evaluation
Data data = 4;

// active_concept_count is the number of concepts for this evaluation
uint32 active_concept_count = 5;
}


Expand All @@ -1613,6 +1619,7 @@ message AnnotationSearchMetrics {




////////////////////////////////////////////////////////////////////////////////


Expand Down Expand Up @@ -1816,6 +1823,8 @@ message WorkflowNode {
// Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
// and more complex workflow operations.
repeated NodeInput node_inputs = 3;
// suppress the output for workflow prediction
bool suppress_output = 4;
}

// NodeInput represents inputs to a node of the graph.
Expand All @@ -1836,6 +1845,8 @@ message WorkflowResult {
Model model = 4;
Input input = 5;
repeated Output outputs = 6;
// Indicate if the output of this model is suppressed.
bool suppress_output = 7;
}


Expand Down
9 changes: 9 additions & 0 deletions proto/clarifai/api/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ service V2 {




// Patch one or more inputs.
rpc PatchInputs (PatchInputsRequest) returns (MultiInputResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -2491,6 +2492,8 @@ message PostInputsRequest {





message PatchInputsRequest {
clarifai.api.UserAppIDSet user_app_id = 1;

Expand Down Expand Up @@ -3105,6 +3108,9 @@ message MultiAnnotationSearchMetricsResponse {









Expand Down Expand Up @@ -3334,6 +3340,9 @@ message ListTasksRequest {

// Get tasks that have ANY user from this list assigned as reviewer.
repeated string review_user_ids = 5;

// Get label order tasks as well
bool including_label_order_tasks = 6;
}

// Request to patch a list of tasks.
Expand Down
9 changes: 9 additions & 0 deletions proto/clarifai/api/service_processed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ service V2 {




// Patch one or more inputs.
rpc PatchInputs (PatchInputsRequest) returns (MultiInputResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -2491,6 +2492,8 @@ message PostInputsRequest {





message PatchInputsRequest {
clarifai.api.UserAppIDSet user_app_id = 1;

Expand Down Expand Up @@ -3105,6 +3108,9 @@ message MultiAnnotationSearchMetricsResponse {









Expand Down Expand Up @@ -3334,6 +3340,9 @@ message ListTasksRequest {

// Get tasks that have ANY user from this list assigned as reviewer.
repeated string review_user_ids = 5;

// Get label order tasks as well
bool including_label_order_tasks = 6;
}

// Request to patch a list of tasks.
Expand Down
6 changes: 6 additions & 0 deletions proto/clarifai/api/status/status_code.proto
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ enum StatusCode {
TASK_IN_PROGRESS = 54001;
// The task is closed.
TASK_DONE = 54002;
// An error occurred during add-task-annotations pipeline.
TASK_ADD_ANNOTATIONS_FAILURE = 54005;
// The task operation is in conflict with the current state of the server.
TASK_CONFLICT = 54100;
// Certain task-related scenarios are not implemented.
Expand All @@ -351,6 +353,10 @@ enum StatusCode {
PASSWORD_VALIDATION_FAILED = 61001;
PASSWORDPOLICY_INVALID_ARGUMENT = 61002;

// Feature flags status code
FEATUREFLAG_CONFIG_NOT_FOUND = 62000;
FEATUREFLAG_INVALID_ARGUMENT = 62001;

// TODO: Knowledge graph related 80xxx

// Internal issues: 98xxx
Expand Down
129 changes: 102 additions & 27 deletions proto/clarifai/auth/scope/scope.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ message ScopeList {
// 3. *_Patch is deprecated and not check anywhere.
//
enum S {
reserved 30, 31, 32, 33, 34;
// introduce undef so that the zero (default/unset) value of the enum is not a real
// permission. undef is only present for this purpose and should not be used
// to indicate any "real" value.
Expand All @@ -43,10 +44,12 @@ enum S {

// Make an rpc to our prediction services.
Predict = 2 [(clarfai_exposed) = true];
Predict_Feedback = 29 [(clarfai_exposed) = true];
Predict_Feedback = 29 [(clarfai_exposed) = false,
deprecated = true];
// Make an rpc to our search services.
Search = 3 [(clarfai_exposed) = true];
Search_Feedback = 28 [(clarfai_exposed) = true];
Search_Feedback = 28 [(clarfai_exposed) = false,
deprecated = true];

// Write to the inputs table in the DB.
Inputs_Add = 4 [(clarfai_exposed) = true,
Expand Down Expand Up @@ -120,12 +123,6 @@ enum S {
// Internal only model syncing.
Models_Sync = 27 [(clarifai_depending_scopes) = Models_Get];

// Note: Models_Deploy is effectively doing POST /models/{models_id}/deployments so it's treated that
// way in terms of data access under the hood.
// Write to the model versions DB table.
Models_Deploy = 34 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Models_Get];

// TODO: No model get metrics scope.

// Write to the workflows DB table.
Expand Down Expand Up @@ -156,22 +153,6 @@ enum S {
// Deprecated
TSNEVisualizations_Get = 25 [deprecated = true];

// Write to the workers DB table.
Workers_Add = 30 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Workers_Get];

// Read from the workers DB table.
Workers_Get = 31 [(clarfai_exposed) = true];

// To delete we need read/write.
Workers_Delete = 32 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Workers_Add,
(clarifai_depending_scopes) = Workers_Get];

// Read from the templates DB table.
Templates_Get = 33 [(clarfai_exposed) = true];
// left numbers for Add, Patch, Delete Templates

// Write to the annotations DB table.
Annotations_Add = 37 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Annotations_Get];
Expand All @@ -194,14 +175,14 @@ enum S {


// Write to the collectors DB table.
Collectors_Add = 41 [(clarfai_exposed) = false,
Collectors_Add = 41 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Collectors_Get];

// Read from the collectors DB table.
Collectors_Get = 42 [(clarfai_exposed) = false];
Collectors_Get = 42 [(clarfai_exposed) = true];

// To delete we need read/write.
Collectors_Delete = 43 [(clarfai_exposed) = false,
Collectors_Delete = 43 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Collectors_Add,
(clarifai_depending_scopes) = Collectors_Get];

Expand Down Expand Up @@ -230,7 +211,101 @@ enum S {
(clarifai_depending_scopes) = Keys_Add,
(clarifai_depending_scopes) = Keys_Get];

// Write to the app sharing DB table
Collaborators_Add = 51 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Collaborators_Get];

// Read from the app sharing DB table
Collaborators_Get = 50 [(clarfai_exposed) = true];

// To delete we need read/write
Collaborators_Delete = 52 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Collaborators_Add,
(clarifai_depending_scopes) = Collaborators_Get];

// Write to the metrics table
Metrics_Add = 54 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Metrics_Get];

// Read from metrics table
Metrics_Get = 53 [(clarfai_exposed) = true];

// To delete we need read/write
Metrics_Delete = 63 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Metrics_Add,
(clarifai_depending_scopes) = Metrics_Get];

// Write to tasks DB table.
Tasks_Add = 55 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Tasks_Get];

// Read from the tasks DB table.
Tasks_Get = 56 [(clarfai_exposed) = true];

// To delete we need read/write
Tasks_Delete = 70 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = Tasks_Add,
(clarifai_depending_scopes) = Tasks_Get];

// Write to the password_policies DB table
PasswordPolicies_Add = 57 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = PasswordPolicies_Get];

// Read from the password_policies DB table
PasswordPolicies_Get = 58 [(clarfai_exposed) = true];

// To delete password_policies we need read/write
PasswordPolicies_Delete = 59 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = PasswordPolicies_Add,
(clarifai_depending_scopes) = PasswordPolicies_Get];

// Write to password_history table
PasswordHistory_Add = 60 [(clarfai_exposed) = false,
(clarifai_depending_scopes) = PasswordHistory_Get];

// Read from password_history table
PasswordHistory_Get = 61 [(clarfai_exposed) = false];

// To delete password history we need read/write
PasswordHistory_Delete = 62 [(clarfai_exposed) = false,
(clarifai_depending_scopes) = PasswordHistory_Add,
(clarifai_depending_scopes) = PasswordHistory_Get];

// Read from notifications table
Notifications_Get = 64 [(clarfai_exposed) = false];

// Write to notifications table
Notifications_Add = 65 [(clarfai_exposed) = false,
(clarifai_depending_scopes) = Notifications_Get];

// To delete notifications we need read/write
Notifications_Delete = 66 [(clarfai_exposed) = false,
(clarifai_depending_scopes) = Notifications_Add,
(clarifai_depending_scopes) = Notifications_Get];

// Read from label orders table
LabelOrders_Get = 67 [(clarfai_exposed) = true];

// Write to label orders table
LabelOrders_Add = 68 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = LabelOrders_Get];

// To delete label orders we need read/write
LabelOrders_Delete = 69 [(clarfai_exposed) = true,
(clarifai_depending_scopes) = LabelOrders_Add,
(clarifai_depending_scopes) = LabelOrders_Get];

// Read from user_feature_configs table
UserFeatureConfigs_Get = 71 [(clarfai_exposed) = true];

// Write to configs table
UserFeatureConfigs_Add = 72 [(clarfai_exposed) = false,
(clarifai_depending_scopes) = UserFeatureConfigs_Get];

// To delete configs we need read/write
UserFeatureConfigs_Delete = 73 [(clarfai_exposed) = false,
(clarifai_depending_scopes) = UserFeatureConfigs_Add,
(clarifai_depending_scopes) = UserFeatureConfigs_Get];
}

extend google.protobuf.EnumValueOptions {
Expand Down
2 changes: 1 addition & 1 deletion proto/clarifai/auth/util/extension.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extend google.protobuf.FieldOptions {

extend google.protobuf.MethodOptions {
// indicates if this rpc should be private. If true, then internal use only. If False,
// then publicly avaliable to world.
// then publicly available to world.
bool cl_private_rpc = 80321;

// For each grpc method we define a list of required low-level auth scopes that are needed
Expand Down

0 comments on commit 8e26a33

Please sign in to comment.