Skip to content

Commit

Permalink
[RSDK-9619] Add API for Discover Service and GetModelsFromModules (vi…
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnN193 authored Jan 7, 2025
1 parent e1161fa commit 3f0b40a
Show file tree
Hide file tree
Showing 18 changed files with 3,213 additions and 556 deletions.
61 changes: 61 additions & 0 deletions gen/js/robot/v1/robot_grpc_web_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,67 @@ proto.viam.robot.v1.RobotServicePromiseClient.prototype.blockForOperation =
};


/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.viam.robot.v1.GetModelsFromModulesRequest,
* !proto.viam.robot.v1.GetModelsFromModulesResponse>}
*/
const methodDescriptor_RobotService_GetModelsFromModules = new grpc.web.MethodDescriptor(
'/viam.robot.v1.RobotService/GetModelsFromModules',
grpc.web.MethodType.UNARY,
proto.viam.robot.v1.GetModelsFromModulesRequest,
proto.viam.robot.v1.GetModelsFromModulesResponse,
/**
* @param {!proto.viam.robot.v1.GetModelsFromModulesRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.viam.robot.v1.GetModelsFromModulesResponse.deserializeBinary
);


/**
* @param {!proto.viam.robot.v1.GetModelsFromModulesRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.GetModelsFromModulesResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.viam.robot.v1.GetModelsFromModulesResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.viam.robot.v1.RobotServiceClient.prototype.getModelsFromModules =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/viam.robot.v1.RobotService/GetModelsFromModules',
request,
metadata || {},
methodDescriptor_RobotService_GetModelsFromModules,
callback);
};


/**
* @param {!proto.viam.robot.v1.GetModelsFromModulesRequest} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.viam.robot.v1.GetModelsFromModulesResponse>}
* Promise that resolves to the response
*/
proto.viam.robot.v1.RobotServicePromiseClient.prototype.getModelsFromModules =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/viam.robot.v1.RobotService/GetModelsFromModules',
request,
metadata || {},
methodDescriptor_RobotService_GetModelsFromModules);
};


/**
* @const
* @type {!grpc.web.MethodDescriptor<
Expand Down
70 changes: 70 additions & 0 deletions gen/js/robot/v1/robot_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,76 @@ export namespace Discovery {
}
}

export class ModuleModel extends jspb.Message {
getModuleName(): string;
setModuleName(value: string): void;

getModel(): string;
setModel(value: string): void;

getApi(): string;
setApi(value: string): void;

getFromLocalModule(): boolean;
setFromLocalModule(value: boolean): void;

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

export namespace ModuleModel {
export type AsObject = {
moduleName: string,
model: string,
api: string,
fromLocalModule: boolean,
}
}

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

export namespace GetModelsFromModulesRequest {
export type AsObject = {
}
}

export class GetModelsFromModulesResponse extends jspb.Message {
clearModelsList(): void;
getModelsList(): Array<ModuleModel>;
setModelsList(value: Array<ModuleModel>): void;
addModels(value?: ModuleModel, index?: number): ModuleModel;

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

export namespace GetModelsFromModulesResponse {
export type AsObject = {
modelsList: Array<ModuleModel.AsObject>,
}
}

export class DiscoverComponentsRequest extends jspb.Message {
clearQueriesList(): void;
getQueriesList(): Array<DiscoveryQuery>;
Expand Down
Loading

0 comments on commit 3f0b40a

Please sign in to comment.