Skip to content

Commit

Permalink
GRPC clients version 10.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Jul 4, 2024
1 parent 72aaf67 commit 0650e5f
Show file tree
Hide file tree
Showing 11 changed files with 964 additions and 98 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.5.3
10.6.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": "10.5.3",
"version": "10.6.0",
"description": "The official Clarifai Node.js gRPC client",
"main": "src/index.js",
"repository": "https://github.com/Clarifai/clarifai-javascript-grpc",
Expand Down
21 changes: 11 additions & 10 deletions proto/clarifai/api/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4275,6 +4275,7 @@ message BookmarkOrigin {
// A worker for compute within a nodepool of instances.
// This asks the API for work
message Runner {
reserved 6;
// A unique ID for this runner.
// This is a UUID since runners can be automatically orchestrated.
string id = 1;
Expand All @@ -4290,9 +4291,6 @@ message Runner {
// This is an optional arg.
google.protobuf.Struct metadata = 5;

// The owner of the runner. Runners belong to a user/org account.
string user_id = 6;

// Labels to match in order to find work.
repeated string labels = 7 [deprecated = true];

Expand Down Expand Up @@ -4329,6 +4327,7 @@ message Runner {
// This compute will typically be consumed by runners and in the future other objects
// like UI modules may be assigned to node pools.
message Nodepool {
reserved 5;
// The user defined ID of the nodepool.
string id = 1;
// Short description about the nodepool.
Expand All @@ -4338,9 +4337,6 @@ message Nodepool {
// When the nodepool was last modified.
google.protobuf.Timestamp modified_at = 4;

// The user/org that this nodepool belongs to.
string user_id = 5;

// Which cluster this nodepool is within.
ComputeCluster compute_cluster = 6;

Expand Down Expand Up @@ -4425,22 +4421,27 @@ message ComputeCluster {
// When the compute cluster was last modified.
google.protobuf.Timestamp modified_at = 7;

// The visibility field represents whether this message is privately/publicly visible.
// To be visible to the public the App that contains it AND the User that contains the App must
// also be publicly visible.
Visibility visibility = 8;

// For future support of different VPC.
// To support splitting a region into multiple VPCs.
// string vpc_id = 8; // FUTURE
// string vpc_id = 9; // FUTURE
// The user/org that this VPC belongs to.
// string vpc_user_id = 9; // FUTURE
// string vpc_user_id = 10; // FUTURE

// this is the base url for the API for all runners in this nodepool to communicate with.
// This is necesary for multi-region / multi-cloud support since runners should only pick up
// work from the region/cloud that they are within. The runners will be orchestrated within the
// nodepool so can have this base_api_url injected as the CLARIFAI_API_BASE env variable.
// 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 = 10; // FUTURE
// string base_api_url = 11; // FUTURE

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


Expand Down
12 changes: 6 additions & 6 deletions proto/clarifai/api/resources_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7969,8 +7969,6 @@ export class Runner extends jspb.Message {
clearMetadata(): void;
getMetadata(): google_protobuf_struct_pb.Struct | undefined;
setMetadata(value?: google_protobuf_struct_pb.Struct): Runner;
getUserId(): string;
setUserId(value: string): Runner;
clearLabelsList(): void;
getLabelsList(): Array<string>;
setLabelsList(value: Array<string>): Runner;
Expand Down Expand Up @@ -8010,7 +8008,6 @@ export namespace Runner {
createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
modifiedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
metadata?: google_protobuf_struct_pb.Struct.AsObject,
userId: string,
labelsList: Array<string>,
worker?: Worker.AsObject,
nodepool?: Nodepool.AsObject,
Expand All @@ -8034,8 +8031,6 @@ export class Nodepool extends jspb.Message {
clearModifiedAt(): void;
getModifiedAt(): google_protobuf_timestamp_pb.Timestamp | undefined;
setModifiedAt(value?: google_protobuf_timestamp_pb.Timestamp): Nodepool;
getUserId(): string;
setUserId(value: string): Nodepool;

hasComputeCluster(): boolean;
clearComputeCluster(): void;
Expand Down Expand Up @@ -8081,7 +8076,6 @@ export namespace Nodepool {
description: string,
createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
modifiedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
userId: string,
computeCluster?: ComputeCluster.AsObject,
nodeCapacityType?: NodeCapacityType.AsObject,
instanceTypesList: Array<InstanceType.AsObject>,
Expand Down Expand Up @@ -8198,6 +8192,11 @@ export class ComputeCluster extends jspb.Message {
getModifiedAt(): google_protobuf_timestamp_pb.Timestamp | undefined;
setModifiedAt(value?: google_protobuf_timestamp_pb.Timestamp): ComputeCluster;

hasVisibility(): boolean;
clearVisibility(): void;
getVisibility(): Visibility | undefined;
setVisibility(value?: Visibility): ComputeCluster;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ComputeCluster.AsObject;
static toObject(includeInstance: boolean, msg: ComputeCluster): ComputeCluster.AsObject;
Expand All @@ -8217,6 +8216,7 @@ export namespace ComputeCluster {
userId: string,
createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
modifiedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
visibility?: Visibility.AsObject,
}
}

Expand Down
113 changes: 52 additions & 61 deletions proto/clarifai/api/resources_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -65820,7 +65820,6 @@ proto.clarifai.api.Runner.toObject = function(includeInstance, msg) {
createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
modifiedAt: (f = msg.getModifiedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
userId: jspb.Message.getFieldWithDefault(msg, 6, ""),
labelsList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f,
worker: (f = msg.getWorker()) && proto.clarifai.api.Worker.toObject(includeInstance, f),
nodepool: (f = msg.getNodepool()) && proto.clarifai.api.Nodepool.toObject(includeInstance, f),
Expand Down Expand Up @@ -65885,10 +65884,6 @@ proto.clarifai.api.Runner.deserializeBinaryFromReader = function(msg, reader) {
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setMetadata(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setUserId(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.addLabels(value);
Expand Down Expand Up @@ -65979,13 +65974,6 @@ proto.clarifai.api.Runner.serializeBinaryToWriter = function(message, writer) {
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
f = message.getUserId();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getLabelsList();
if (f.length > 0) {
writer.writeRepeatedString(
Expand Down Expand Up @@ -66174,24 +66162,6 @@ proto.clarifai.api.Runner.prototype.hasMetadata = function() {
};


/**
* optional string user_id = 6;
* @return {string}
*/
proto.clarifai.api.Runner.prototype.getUserId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
* @param {string} value
* @return {!proto.clarifai.api.Runner} returns this
*/
proto.clarifai.api.Runner.prototype.setUserId = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};


/**
* repeated string labels = 7;
* @return {!Array<string>}
Expand Down Expand Up @@ -66401,7 +66371,6 @@ proto.clarifai.api.Nodepool.toObject = function(includeInstance, msg) {
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
modifiedAt: (f = msg.getModifiedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
userId: jspb.Message.getFieldWithDefault(msg, 5, ""),
computeCluster: (f = msg.getComputeCluster()) && proto.clarifai.api.ComputeCluster.toObject(includeInstance, f),
nodeCapacityType: (f = msg.getNodeCapacityType()) && proto.clarifai.api.NodeCapacityType.toObject(includeInstance, f),
instanceTypesList: jspb.Message.toObjectList(msg.getInstanceTypesList(),
Expand Down Expand Up @@ -66464,10 +66433,6 @@ proto.clarifai.api.Nodepool.deserializeBinaryFromReader = function(msg, reader)
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setModifiedAt(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setUserId(value);
break;
case 6:
var value = new proto.clarifai.api.ComputeCluster;
reader.readMessage(value,proto.clarifai.api.ComputeCluster.deserializeBinaryFromReader);
Expand Down Expand Up @@ -66560,13 +66525,6 @@ proto.clarifai.api.Nodepool.serializeBinaryToWriter = function(message, writer)
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getUserId();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getComputeCluster();
if (f != null) {
writer.writeMessage(
Expand Down Expand Up @@ -66734,24 +66692,6 @@ proto.clarifai.api.Nodepool.prototype.hasModifiedAt = function() {
};


/**
* optional string user_id = 5;
* @return {string}
*/
proto.clarifai.api.Nodepool.prototype.getUserId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
* @param {string} value
* @return {!proto.clarifai.api.Nodepool} returns this
*/
proto.clarifai.api.Nodepool.prototype.setUserId = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};


/**
* optional ComputeCluster compute_cluster = 6;
* @return {?proto.clarifai.api.ComputeCluster}
Expand Down Expand Up @@ -67550,7 +67490,8 @@ proto.clarifai.api.ComputeCluster.toObject = function(includeInstance, msg) {
region: jspb.Message.getFieldWithDefault(msg, 4, ""),
userId: jspb.Message.getFieldWithDefault(msg, 5, ""),
createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
modifiedAt: (f = msg.getModifiedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
modifiedAt: (f = msg.getModifiedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
visibility: (f = msg.getVisibility()) && proto.clarifai.api.Visibility.toObject(includeInstance, f)
};

if (includeInstance) {
Expand Down Expand Up @@ -67618,6 +67559,11 @@ proto.clarifai.api.ComputeCluster.deserializeBinaryFromReader = function(msg, re
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setModifiedAt(value);
break;
case 8:
var value = new proto.clarifai.api.Visibility;
reader.readMessage(value,proto.clarifai.api.Visibility.deserializeBinaryFromReader);
msg.setVisibility(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -67699,6 +67645,14 @@ proto.clarifai.api.ComputeCluster.serializeBinaryToWriter = function(message, wr
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getVisibility();
if (f != null) {
writer.writeMessage(
8,
f,
proto.clarifai.api.Visibility.serializeBinaryToWriter
);
}
};


Expand Down Expand Up @@ -67885,6 +67839,43 @@ proto.clarifai.api.ComputeCluster.prototype.hasModifiedAt = function() {
};


/**
* optional Visibility visibility = 8;
* @return {?proto.clarifai.api.Visibility}
*/
proto.clarifai.api.ComputeCluster.prototype.getVisibility = function() {
return /** @type{?proto.clarifai.api.Visibility} */ (
jspb.Message.getWrapperField(this, proto.clarifai.api.Visibility, 8));
};


/**
* @param {?proto.clarifai.api.Visibility|undefined} value
* @return {!proto.clarifai.api.ComputeCluster} returns this
*/
proto.clarifai.api.ComputeCluster.prototype.setVisibility = function(value) {
return jspb.Message.setWrapperField(this, 8, value);
};


/**
* Clears the message field making it undefined.
* @return {!proto.clarifai.api.ComputeCluster} returns this
*/
proto.clarifai.api.ComputeCluster.prototype.clearVisibility = function() {
return this.setVisibility(undefined);
};


/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.clarifai.api.ComputeCluster.prototype.hasVisibility = function() {
return jspb.Message.getField(this, 8) != null;
};



/**
* List of repeated fields within this message type.
Expand Down
Loading

0 comments on commit 0650e5f

Please sign in to comment.