Skip to content

Commit

Permalink
GRPC clients version 10.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Apr 19, 2024
1 parent 9b6c587 commit d31f35b
Show file tree
Hide file tree
Showing 14 changed files with 1,727 additions and 307 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.0
10.3.1
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": "10.3.0",
"version": "10.3.1",
"description": "The official Clarifai Node.js gRPC client",
"main": "src/index.js",
"repository": "https://github.com/Clarifai/clarifai-javascript-grpc",
Expand Down
53 changes: 50 additions & 3 deletions proto/clarifai/api/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ message AppExtraInfo {
// For example, this value can be used to detect if client side caches related to searching should be invalidated.
// Field not filled in for list endpoints, use GetApp
string search_revision_marker = 1;
AppResourceCounts counts = 2;
}

// App query
Expand All @@ -169,6 +170,14 @@ message AppQuery {
string name = 1;
}

message AppResourceCounts {
int64 datasets = 1;
int64 models = 2;
int64 workflows = 3;
int64 modules = 4;
int64 inputs = 5;
}

// Collaborator - invited user, who shares an access to an application
message Collaborator {
// id of this collaborator
Expand Down Expand Up @@ -972,6 +981,14 @@ message DatasetInput {
// The input data.
Input input = 2;
}
enum DatasetVersionRequestOrigin {
DATASET_VERSION_REQUEST_ORIGIN_NOT_SET = 0;
MANUAL = 1;
TRAINING = 2;
EVAL_GROUND_TRUTH = 3;
EVAL_PREDICTIONS = 4;
}


// DatasetVersion
message DatasetVersion {
Expand Down Expand Up @@ -1035,6 +1052,10 @@ message DatasetVersion {

// The embedding models to return embeddings for. If empty, no embeddings are returned.
repeated string embed_model_version_ids = 14;

// Read Only. Cannot be Set
// Origin of request for new dataset version
DatasetVersionRequestOrigin request_origin = 20;
}

message AnnotationFilterConfig {
Expand Down Expand Up @@ -3288,15 +3309,20 @@ message TaskAssignment {
clarifai.api.status.Status status = 6;
}

// TaskStatusCountPerUser can represents count of human created annotations for a user for each valid status,
// count of inputs (anchor annotation) for a user for each valid status
// TaskStatusCountPerUser can represent one of the following:
// * count of task annotations created by a worker for each valid status,
// * count of task inputs assigned to a worker (i.e. task assignments) for each valid status
message TaskStatusCountPerUser {
string user_id = 1;
// Deprecated: Use worker instead.
string user_id = 1 [deprecated = true];

uint32 pending = 2 [(clarifai.api.utils.cl_show_if_empty) = true];
uint32 awaiting_review = 3 [(clarifai.api.utils.cl_show_if_empty) = true];
uint32 success = 4 [(clarifai.api.utils.cl_show_if_empty) = true];
uint32 review_denied = 5 [(clarifai.api.utils.cl_show_if_empty) = true];
uint32 awaiting_consensus_review = 6 [(clarifai.api.utils.cl_show_if_empty) = true];

Worker worker = 7;
}

message ThresholdRange {
Expand Down Expand Up @@ -4382,6 +4408,9 @@ message CloudRegion {
// We include this in the proto in case a user needs to create a nodepool on their own
// infrastructure that talks with a specific region.
// string base_api_url = 7; // FUTURE

// The available set of instance types in this cluster.
// InstanceType instance_types = 8; // FUTURE
}


Expand Down Expand Up @@ -4540,4 +4569,22 @@ message RunnerSelector {
Deployment deployment = 3;
// In future as we support matching runners based on just labels:
// RunnerLabels runner_labels = 3; // FUTURE
}
enum RunnerMethodType {
UNKNOWN = 0;
UNARY_UNARY = 1; // single request, single response. predict() in code
UNARY_STREAMING = 2; // single request, streamed response. generate() in code
STREAMING_UNARY = 3; // stream of requests, single response.
STREAMING_STREAMING = 4; // stream of requests, stream of responses. stream() in code
// In the future we may support other things here like long running processes, etc.
}


// Processing info tells the runner how to process a RunnerItem
message ProcessingInfo {
// The type of method witin the runner to call.
RunnerMethodType runner_method_type = 1;
// A status of the processing. We use this for signalling end of a request stream, a runner
// item's processing should be cancelled, etc.
clarifai.api.status.Status status = 2;
}
89 changes: 89 additions & 0 deletions proto/clarifai/api/resources_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ export class AppExtraInfo extends jspb.Message {
getSearchRevisionMarker(): string;
setSearchRevisionMarker(value: string): AppExtraInfo;

hasCounts(): boolean;
clearCounts(): void;
getCounts(): AppResourceCounts | undefined;
setCounts(value?: AppResourceCounts): AppExtraInfo;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AppExtraInfo.AsObject;
static toObject(includeInstance: boolean, msg: AppExtraInfo): AppExtraInfo.AsObject;
Expand All @@ -257,6 +262,7 @@ export class AppExtraInfo extends jspb.Message {
export namespace AppExtraInfo {
export type AsObject = {
searchRevisionMarker: string,
counts?: AppResourceCounts.AsObject,
}
}

Expand All @@ -280,6 +286,38 @@ export namespace AppQuery {
}
}

export class AppResourceCounts extends jspb.Message {
getDatasets(): number;
setDatasets(value: number): AppResourceCounts;
getModels(): number;
setModels(value: number): AppResourceCounts;
getWorkflows(): number;
setWorkflows(value: number): AppResourceCounts;
getModules(): number;
setModules(value: number): AppResourceCounts;
getInputs(): number;
setInputs(value: number): AppResourceCounts;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AppResourceCounts.AsObject;
static toObject(includeInstance: boolean, msg: AppResourceCounts): AppResourceCounts.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AppResourceCounts, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AppResourceCounts;
static deserializeBinaryFromReader(message: AppResourceCounts, reader: jspb.BinaryReader): AppResourceCounts;
}

export namespace AppResourceCounts {
export type AsObject = {
datasets: number,
models: number,
workflows: number,
modules: number,
inputs: number,
}
}

export class Collaborator extends jspb.Message {
getId(): string;
setId(value: string): Collaborator;
Expand Down Expand Up @@ -2003,6 +2041,8 @@ export class DatasetVersion extends jspb.Message {
getEmbedModelVersionIdsList(): Array<string>;
setEmbedModelVersionIdsList(value: Array<string>): DatasetVersion;
addEmbedModelVersionIds(value: string, index?: number): string;
getRequestOrigin(): DatasetVersionRequestOrigin;
setRequestOrigin(value: DatasetVersionRequestOrigin): DatasetVersion;

getDataConfigCase(): DatasetVersion.DataConfigCase;

Expand Down Expand Up @@ -2035,6 +2075,7 @@ export namespace DatasetVersion {
metadata?: google_protobuf_struct_pb.Struct.AsObject,
visibility?: Visibility.AsObject,
embedModelVersionIdsList: Array<string>,
requestOrigin: DatasetVersionRequestOrigin,
}

export enum DataConfigCase {
Expand Down Expand Up @@ -5969,6 +6010,11 @@ export class TaskStatusCountPerUser extends jspb.Message {
getAwaitingConsensusReview(): number;
setAwaitingConsensusReview(value: number): TaskStatusCountPerUser;

hasWorker(): boolean;
clearWorker(): void;
getWorker(): Worker | undefined;
setWorker(value?: Worker): TaskStatusCountPerUser;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): TaskStatusCountPerUser.AsObject;
static toObject(includeInstance: boolean, msg: TaskStatusCountPerUser): TaskStatusCountPerUser.AsObject;
Expand All @@ -5987,6 +6033,7 @@ export namespace TaskStatusCountPerUser {
success: number,
reviewDenied: number,
awaitingConsensusReview: number,
worker?: Worker.AsObject,
}
}

Expand Down Expand Up @@ -8190,12 +8237,46 @@ export namespace RunnerSelector {
}
}

export class ProcessingInfo extends jspb.Message {
getRunnerMethodType(): RunnerMethodType;
setRunnerMethodType(value: RunnerMethodType): ProcessingInfo;

hasStatus(): boolean;
clearStatus(): void;
getStatus(): proto_clarifai_api_status_status_pb.Status | undefined;
setStatus(value?: proto_clarifai_api_status_status_pb.Status): ProcessingInfo;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ProcessingInfo.AsObject;
static toObject(includeInstance: boolean, msg: ProcessingInfo): ProcessingInfo.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ProcessingInfo, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ProcessingInfo;
static deserializeBinaryFromReader(message: ProcessingInfo, reader: jspb.BinaryReader): ProcessingInfo;
}

export namespace ProcessingInfo {
export type AsObject = {
runnerMethodType: RunnerMethodType,
status?: proto_clarifai_api_status_status_pb.Status.AsObject,
}
}

export enum WorkflowModelUseCase {
WORKFLOW_MODEL_USE_CASE_NOT_SET = 0,
CLASSIFICATION = 1,
DETECTION = 2,
}

export enum DatasetVersionRequestOrigin {
DATASET_VERSION_REQUEST_ORIGIN_NOT_SET = 0,
MANUAL = 1,
TRAINING = 2,
EVAL_GROUND_TRUTH = 3,
EVAL_PREDICTIONS = 4,
}

export enum DatasetVersionMetricsGroupType {
DATASET_VERSION_METRICS_GROUP_TYPE_NOT_SET = 0,
INPUT_TYPE = 2,
Expand Down Expand Up @@ -8313,3 +8394,11 @@ export enum InputIDConflictResolution {
SKIP = 1,
SUFFIX = 2,
}

export enum RunnerMethodType {
UNKNOWN = 0,
UNARY_UNARY = 1,
UNARY_STREAMING = 2,
STREAMING_UNARY = 3,
STREAMING_STREAMING = 4,
}
Loading

0 comments on commit d31f35b

Please sign in to comment.