diff --git a/VERSION b/VERSION index c8d7efc..655f923 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.1.3 +10.1.4 diff --git a/package.json b/package.json index 35f630b..88fa7a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clarifai-nodejs-grpc", - "version": "10.1.3", + "version": "10.1.4", "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 b89c0b6..b4e34b9 100644 --- a/proto/clarifai/api/resources.proto +++ b/proto/clarifai/api/resources.proto @@ -478,11 +478,26 @@ message DetailConceptCount { message ConceptQuery { // The name of the concept to search. string name = 1; - // (optional) The language of the concept name in a search. Defaults to English. + // The language of the concept name in a search. Defaults to English. string language = 2; - // (optional) The id of workflow. If no id is provided, then application base workflow is used. + // The id of workflow. If no id is provided, then application base workflow is used. string workflow_id = 3; + // The concepts must belong to workflow models with specified use cases. + // Multiple values are joined using an OR condition. + repeated WorkflowModelUseCase use_cases = 4; } +enum WorkflowModelUseCase { + WORKFLOW_MODEL_USE_CASE_NOT_SET = 0; + + // Classifier models without a detector parent (recursive check) in a workflow + // are used for classification. + CLASSIFICATION = 1; + + // Detector models in a workflow are used for detection. + // Classifier models that run after a detector model are also used for detection. + DETECTION = 2; +} + // This represents a relation (i.e. edge) between the subject concept and the object concept message ConceptRelation { @@ -1501,18 +1516,18 @@ message OutputConfig { google.protobuf.Struct model_metadata = 17 [deprecated = true]; } -// ModelType is a definition of a set of models that generally have the same input and output fields. +// ModelType is a definition of a set of models that generally have the same input and output fields. // This is used to understand more about the possible models in our platform. message ModelType { reserved 7, 4, 13, 14, 15; - + // A unique identifier for this model type. string id = 1; // A display title for this model. string title = 2; // Description of this model type. string description = 3; - + // For both input_fields and output_fields below, the following hold true: // - They are both lists of strings that name the fields from the Data proto // - Individual entries in the list can be comma-separated lists. Each element of it is expected to be present in an incoming data example. @@ -2894,6 +2909,7 @@ message AppDuplication { // - annotations // - models // - workflows + // - installed_module_versions repeated AppCopyProgress progress = 9; } @@ -2915,6 +2931,8 @@ message AppDuplicationFilters { bool copy_models = 4; // Copy workflows. Requires that copy_models and copy_concepts are also set. bool copy_workflows = 5; + // Copy installed module versions. + bool copy_installed_module_versions = 6; } // LabelOrder @@ -3322,7 +3340,7 @@ message Collector { // an example. clarifai.api.status.Status status = 7; - // Whether to collect outputs or not. Default is false. If selected, outputs from the + // Whether to collect outputs or not. Default is false. If selected, outputs from the // original model predict call will be posted as annotations along with the input with success status. bool collect_outputs = 9; } diff --git a/proto/clarifai/api/resources_pb.d.ts b/proto/clarifai/api/resources_pb.d.ts index 39e9dbc..b44bbea 100644 --- a/proto/clarifai/api/resources_pb.d.ts +++ b/proto/clarifai/api/resources_pb.d.ts @@ -867,6 +867,10 @@ export class ConceptQuery extends jspb.Message { setLanguage(value: string): ConceptQuery; getWorkflowId(): string; setWorkflowId(value: string): ConceptQuery; + clearUseCasesList(): void; + getUseCasesList(): Array; + setUseCasesList(value: Array): ConceptQuery; + addUseCases(value: WorkflowModelUseCase, index?: number): WorkflowModelUseCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ConceptQuery.AsObject; @@ -883,6 +887,7 @@ export namespace ConceptQuery { name: string, language: string, workflowId: string, + useCasesList: Array, } } @@ -5340,6 +5345,8 @@ export class AppDuplicationFilters extends jspb.Message { setCopyModels(value: boolean): AppDuplicationFilters; getCopyWorkflows(): boolean; setCopyWorkflows(value: boolean): AppDuplicationFilters; + getCopyInstalledModuleVersions(): boolean; + setCopyInstalledModuleVersions(value: boolean): AppDuplicationFilters; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AppDuplicationFilters.AsObject; @@ -5358,6 +5365,7 @@ export namespace AppDuplicationFilters { copyAnnotations: boolean, copyModels: boolean, copyWorkflows: boolean, + copyInstalledModuleVersions: boolean, } } @@ -7710,6 +7718,12 @@ export namespace Runner { } } +export enum WorkflowModelUseCase { + WORKFLOW_MODEL_USE_CASE_NOT_SET = 0, + CLASSIFICATION = 1, + DETECTION = 2, +} + export enum DatasetVersionMetricsGroupType { DATASET_VERSION_METRICS_GROUP_TYPE_NOT_SET = 0, INPUT_TYPE = 2, diff --git a/proto/clarifai/api/resources_pb.js b/proto/clarifai/api/resources_pb.js index 810759c..850acdc 100644 --- a/proto/clarifai/api/resources_pb.js +++ b/proto/clarifai/api/resources_pb.js @@ -261,6 +261,7 @@ goog.exportSymbol('proto.clarifai.api.W3C', null, global); goog.exportSymbol('proto.clarifai.api.Worker', null, global); goog.exportSymbol('proto.clarifai.api.Worker.WorkerCase', null, global); goog.exportSymbol('proto.clarifai.api.Workflow', null, global); +goog.exportSymbol('proto.clarifai.api.WorkflowModelUseCase', null, global); goog.exportSymbol('proto.clarifai.api.WorkflowNode', null, global); goog.exportSymbol('proto.clarifai.api.WorkflowResult', null, global); goog.exportSymbol('proto.clarifai.api.WorkflowResultsSimilarity', null, global); @@ -739,7 +740,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.clarifai.api.ConceptQuery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.ConceptQuery.repeatedFields_, null); }; goog.inherits(proto.clarifai.api.ConceptQuery, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -10883,6 +10884,13 @@ proto.clarifai.api.DetailConceptCount.prototype.hasProcessing = function() { +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.clarifai.api.ConceptQuery.repeatedFields_ = [4]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -10916,7 +10924,8 @@ proto.clarifai.api.ConceptQuery.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), language: jspb.Message.getFieldWithDefault(msg, 2, ""), - workflowId: jspb.Message.getFieldWithDefault(msg, 3, "") + workflowId: jspb.Message.getFieldWithDefault(msg, 3, ""), + useCasesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f }; if (includeInstance) { @@ -10965,6 +10974,12 @@ proto.clarifai.api.ConceptQuery.deserializeBinaryFromReader = function(msg, read var value = /** @type {string} */ (reader.readString()); msg.setWorkflowId(value); break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addUseCases(values[i]); + } + break; default: reader.skipField(); break; @@ -11015,6 +11030,13 @@ proto.clarifai.api.ConceptQuery.serializeBinaryToWriter = function(message, writ f ); } + f = message.getUseCasesList(); + if (f.length > 0) { + writer.writePackedEnum( + 4, + f + ); + } }; @@ -11072,6 +11094,43 @@ proto.clarifai.api.ConceptQuery.prototype.setWorkflowId = function(value) { }; +/** + * repeated WorkflowModelUseCase use_cases = 4; + * @return {!Array} + */ +proto.clarifai.api.ConceptQuery.prototype.getUseCasesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.clarifai.api.ConceptQuery} returns this + */ +proto.clarifai.api.ConceptQuery.prototype.setUseCasesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!proto.clarifai.api.WorkflowModelUseCase} value + * @param {number=} opt_index + * @return {!proto.clarifai.api.ConceptQuery} returns this + */ +proto.clarifai.api.ConceptQuery.prototype.addUseCases = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.clarifai.api.ConceptQuery} returns this + */ +proto.clarifai.api.ConceptQuery.prototype.clearUseCasesList = function() { + return this.setUseCasesList([]); +}; + + @@ -46132,7 +46191,8 @@ proto.clarifai.api.AppDuplicationFilters.toObject = function(includeInstance, ms copyConcepts: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), copyAnnotations: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), copyModels: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - copyWorkflows: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + copyWorkflows: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + copyInstalledModuleVersions: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -46189,6 +46249,10 @@ proto.clarifai.api.AppDuplicationFilters.deserializeBinaryFromReader = function( var value = /** @type {boolean} */ (reader.readBool()); msg.setCopyWorkflows(value); break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCopyInstalledModuleVersions(value); + break; default: reader.skipField(); break; @@ -46253,6 +46317,13 @@ proto.clarifai.api.AppDuplicationFilters.serializeBinaryToWriter = function(mess f ); } + f = message.getCopyInstalledModuleVersions(); + if (f) { + writer.writeBool( + 6, + f + ); + } }; @@ -46346,6 +46417,24 @@ proto.clarifai.api.AppDuplicationFilters.prototype.setCopyWorkflows = function(v }; +/** + * optional bool copy_installed_module_versions = 6; + * @return {boolean} + */ +proto.clarifai.api.AppDuplicationFilters.prototype.getCopyInstalledModuleVersions = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.clarifai.api.AppDuplicationFilters} returns this + */ +proto.clarifai.api.AppDuplicationFilters.prototype.setCopyInstalledModuleVersions = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + @@ -63641,6 +63730,15 @@ proto.clarifai.api.Runner.prototype.clearLabelsList = function() { }; +/** + * @enum {number} + */ +proto.clarifai.api.WorkflowModelUseCase = { + WORKFLOW_MODEL_USE_CASE_NOT_SET: 0, + CLASSIFICATION: 1, + DETECTION: 2 +}; + /** * @enum {number} */ diff --git a/proto/clarifai/api/service.proto b/proto/clarifai/api/service.proto index 6bac419..db8fba9 100644 --- a/proto/clarifai/api/service.proto +++ b/proto/clarifai/api/service.proto @@ -2589,6 +2589,8 @@ service V2 { option (clarifai.auth.util.cl_depending_scopes) = Inputs_Get; option (clarifai.auth.util.cl_depending_scopes) = Annotations_Get; option (clarifai.auth.util.cl_depending_scopes) = Workflows_Get; + option (clarifai.auth.util.cl_depending_scopes) = Modules_Get; + option (clarifai.auth.util.cl_depending_scopes) = InstalledModuleVersions_Get; } // ListAppDuplications lists all app duplication jobs created by the user. diff --git a/proto/clarifai/api/service_processed.proto b/proto/clarifai/api/service_processed.proto index cea272d..3961e14 100644 --- a/proto/clarifai/api/service_processed.proto +++ b/proto/clarifai/api/service_processed.proto @@ -2589,6 +2589,8 @@ service V2 { option (clarifai.auth.util.cl_depending_scopes) = Inputs_Get; option (clarifai.auth.util.cl_depending_scopes) = Annotations_Get; option (clarifai.auth.util.cl_depending_scopes) = Workflows_Get; + option (clarifai.auth.util.cl_depending_scopes) = Modules_Get; + option (clarifai.auth.util.cl_depending_scopes) = InstalledModuleVersions_Get; } // ListAppDuplications lists all app duplication jobs created by the user.