From d7c447555487da7ca263be8593d99170c3903f3b Mon Sep 17 00:00:00 2001 From: clarifai-prod Date: Wed, 23 Oct 2024 09:58:41 +0000 Subject: [PATCH] GRPC clients version 10.9.8 --- VERSION | 2 +- package.json | 2 +- proto/clarifai/api/resources.proto | 22 ++++++-- proto/clarifai/api/resources_pb.d.ts | 6 ++ proto/clarifai/api/resources_pb.js | 62 ++++++++++++++++++++- proto/clarifai/api/service.proto | 10 ++++ proto/clarifai/api/service_processed.proto | 10 ++++ proto/clarifai/api/status/status_code.proto | 2 + 8 files changed, 107 insertions(+), 9 deletions(-) diff --git a/VERSION b/VERSION index 51b288c..efbb854 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.9.7 +10.9.8 diff --git a/package.json b/package.json index e8db6d2..5a99c2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clarifai-nodejs-grpc", - "version": "10.9.7", + "version": "10.9.8", "description": "The official Clarifai Node.js gRPC client", "main": "src/index.js", "repository": "https://github.com/Clarifai/clarifai-javascript-grpc", diff --git a/proto/clarifai/api/resources.proto b/proto/clarifai/api/resources.proto index a06b243..c58232d 100644 --- a/proto/clarifai/api/resources.proto +++ b/proto/clarifai/api/resources.proto @@ -3363,11 +3363,7 @@ message TaskReviewManualStrategyInfo { // This field represents the percentage of inputs that will be reviewed by reviewers. It is a value between 0 and 1. float sample_percentage = 1; - // The number of reviewers that need to agree in order to approve an input. - // Currently, the only allowed values are: - // 0 - when not set, it defaults to 1 - // 1 - only a single reviewer needs to approve each labeled input - // -1 - an input will be approved when all reviewers approve it + // Deprecated: Use consensus_strategy_info.approval_threshold_reviewers. int32 approval_threshold = 2; } @@ -3375,8 +3371,22 @@ message TaskReviewManualStrategyInfo { message TaskReviewConsensusStrategyInfo { reserved 1; + // Deprecated: Use approval_threshold_labelers. + uint32 approval_threshold = 2 [deprecated = true]; + // The number of labelers that need to agree in order to automatically approve an annotation. - uint32 approval_threshold = 2; + // When 0, labelers consensus is disabled. + // When 1, the labels are automatically approved once a single labeler labels the input. + // When greater than 1, the labels are automatically approved when the specified number of labelers agree. + // If the number of labelers that agree is less than the specified number, then the input will reviewed by reviewers. + uint32 approval_threshold_labelers = 3; + + // The number of reviewers that need to agree in order to approve an input. + // Currently, the only allowed values are: + // 0 - when not set, it defaults to 1 + // 1 - only a single reviewer needs to approve each labeled input + // -1 - an input will be approved when all reviewers approve it + int32 approval_threshold_reviewers = 4; } // TaskAIAssistant diff --git a/proto/clarifai/api/resources_pb.d.ts b/proto/clarifai/api/resources_pb.d.ts index 730dfa6..96f9741 100644 --- a/proto/clarifai/api/resources_pb.d.ts +++ b/proto/clarifai/api/resources_pb.d.ts @@ -6003,6 +6003,10 @@ export namespace TaskReviewManualStrategyInfo { export class TaskReviewConsensusStrategyInfo extends jspb.Message { getApprovalThreshold(): number; setApprovalThreshold(value: number): TaskReviewConsensusStrategyInfo; + getApprovalThresholdLabelers(): number; + setApprovalThresholdLabelers(value: number): TaskReviewConsensusStrategyInfo; + getApprovalThresholdReviewers(): number; + setApprovalThresholdReviewers(value: number): TaskReviewConsensusStrategyInfo; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TaskReviewConsensusStrategyInfo.AsObject; @@ -6017,6 +6021,8 @@ export class TaskReviewConsensusStrategyInfo extends jspb.Message { export namespace TaskReviewConsensusStrategyInfo { export type AsObject = { approvalThreshold: number, + approvalThresholdLabelers: number, + approvalThresholdReviewers: number, } } diff --git a/proto/clarifai/api/resources_pb.js b/proto/clarifai/api/resources_pb.js index 76d20b9..b0bafa0 100644 --- a/proto/clarifai/api/resources_pb.js +++ b/proto/clarifai/api/resources_pb.js @@ -51540,7 +51540,9 @@ proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.toObject = function */ proto.clarifai.api.TaskReviewConsensusStrategyInfo.toObject = function(includeInstance, msg) { var f, obj = { - approvalThreshold: jspb.Message.getFieldWithDefault(msg, 2, 0) + approvalThreshold: jspb.Message.getFieldWithDefault(msg, 2, 0), + approvalThresholdLabelers: jspb.Message.getFieldWithDefault(msg, 3, 0), + approvalThresholdReviewers: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -51581,6 +51583,14 @@ proto.clarifai.api.TaskReviewConsensusStrategyInfo.deserializeBinaryFromReader = var value = /** @type {number} */ (reader.readUint32()); msg.setApprovalThreshold(value); break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setApprovalThresholdLabelers(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setApprovalThresholdReviewers(value); + break; default: reader.skipField(); break; @@ -51617,6 +51627,20 @@ proto.clarifai.api.TaskReviewConsensusStrategyInfo.serializeBinaryToWriter = fun f ); } + f = message.getApprovalThresholdLabelers(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getApprovalThresholdReviewers(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } }; @@ -51638,6 +51662,42 @@ proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.setApprovalThreshol }; +/** + * optional uint32 approval_threshold_labelers = 3; + * @return {number} + */ +proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.getApprovalThresholdLabelers = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.clarifai.api.TaskReviewConsensusStrategyInfo} returns this + */ +proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.setApprovalThresholdLabelers = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 approval_threshold_reviewers = 4; + * @return {number} + */ +proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.getApprovalThresholdReviewers = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.clarifai.api.TaskReviewConsensusStrategyInfo} returns this + */ +proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.setApprovalThresholdReviewers = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + diff --git a/proto/clarifai/api/service.proto b/proto/clarifai/api/service.proto index 8e331a1..fb5ccf0 100644 --- a/proto/clarifai/api/service.proto +++ b/proto/clarifai/api/service.proto @@ -3819,6 +3819,12 @@ service V2 { option (clarifai.auth.util.cl_depending_scopes) = Nodepools_Add; option (clarifai.auth.util.cl_depending_scopes) = Nodepools_Delete; option (clarifai.auth.util.cl_depending_scopes) = Keys_Get; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Get; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Add; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Delete; + option (clarifai.auth.util.cl_depending_scopes) = Runners_Get; + option (clarifai.auth.util.cl_depending_scopes) = Runners_Add; + option (clarifai.auth.util.cl_depending_scopes) = Runners_Delete; } // Nodepools CRUD @@ -3878,6 +3884,10 @@ service V2 { option (clarifai.auth.util.cl_depending_scopes) = Runners_Delete; option (clarifai.auth.util.cl_depending_scopes) = Models_Get; option (clarifai.auth.util.cl_depending_scopes) = Workflows_Get; + option (clarifai.auth.util.cl_depending_scopes) = Runners_Get; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Get; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Add; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Delete; } // Deployments CRUD diff --git a/proto/clarifai/api/service_processed.proto b/proto/clarifai/api/service_processed.proto index af7a15c..526a347 100644 --- a/proto/clarifai/api/service_processed.proto +++ b/proto/clarifai/api/service_processed.proto @@ -3819,6 +3819,12 @@ service V2 { option (clarifai.auth.util.cl_depending_scopes) = Nodepools_Add; option (clarifai.auth.util.cl_depending_scopes) = Nodepools_Delete; option (clarifai.auth.util.cl_depending_scopes) = Keys_Get; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Get; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Add; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Delete; + option (clarifai.auth.util.cl_depending_scopes) = Runners_Get; + option (clarifai.auth.util.cl_depending_scopes) = Runners_Add; + option (clarifai.auth.util.cl_depending_scopes) = Runners_Delete; } // Nodepools CRUD @@ -3878,6 +3884,10 @@ service V2 { option (clarifai.auth.util.cl_depending_scopes) = Runners_Delete; option (clarifai.auth.util.cl_depending_scopes) = Models_Get; option (clarifai.auth.util.cl_depending_scopes) = Workflows_Get; + option (clarifai.auth.util.cl_depending_scopes) = Runners_Get; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Get; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Add; + option (clarifai.auth.util.cl_depending_scopes) = Deployments_Delete; } // Deployments CRUD diff --git a/proto/clarifai/api/status/status_code.proto b/proto/clarifai/api/status/status_code.proto index 96c5307..6431926 100644 --- a/proto/clarifai/api/status/status_code.proto +++ b/proto/clarifai/api/status/status_code.proto @@ -147,7 +147,9 @@ enum StatusCode { ANNOTATION_UNKNOWN_STATUS = 24154; ANNOTATION_INVALID_ARGUMENT = 24155; ANNOTATION_PERMISSION_DENIED = 24156; + // Annotation is awaiting review from task REVIEWERS. ANNOTATION_AWAITING_REVIEW = 24157; + // Annotation is awaiting consensus review from task LABELERS. ANNOTATION_AWAITING_CONSENSUS_REVIEW = 24159; ANNOTATION_REVIEW_DENIED = 24158;