Skip to content

Commit 3f0b40a

Browse files
authored
[RSDK-9619] Add API for Discover Service and GetModelsFromModules (viamrobotics#611)
1 parent e1161fa commit 3f0b40a

18 files changed

+3213
-556
lines changed

gen/js/robot/v1/robot_grpc_web_pb.js

+61
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,67 @@ proto.viam.robot.v1.RobotServicePromiseClient.prototype.blockForOperation =
452452
};
453453

454454

455+
/**
456+
* @const
457+
* @type {!grpc.web.MethodDescriptor<
458+
* !proto.viam.robot.v1.GetModelsFromModulesRequest,
459+
* !proto.viam.robot.v1.GetModelsFromModulesResponse>}
460+
*/
461+
const methodDescriptor_RobotService_GetModelsFromModules = new grpc.web.MethodDescriptor(
462+
'/viam.robot.v1.RobotService/GetModelsFromModules',
463+
grpc.web.MethodType.UNARY,
464+
proto.viam.robot.v1.GetModelsFromModulesRequest,
465+
proto.viam.robot.v1.GetModelsFromModulesResponse,
466+
/**
467+
* @param {!proto.viam.robot.v1.GetModelsFromModulesRequest} request
468+
* @return {!Uint8Array}
469+
*/
470+
function(request) {
471+
return request.serializeBinary();
472+
},
473+
proto.viam.robot.v1.GetModelsFromModulesResponse.deserializeBinary
474+
);
475+
476+
477+
/**
478+
* @param {!proto.viam.robot.v1.GetModelsFromModulesRequest} request The
479+
* request proto
480+
* @param {?Object<string, string>} metadata User defined
481+
* call metadata
482+
* @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.GetModelsFromModulesResponse)}
483+
* callback The callback function(error, response)
484+
* @return {!grpc.web.ClientReadableStream<!proto.viam.robot.v1.GetModelsFromModulesResponse>|undefined}
485+
* The XHR Node Readable Stream
486+
*/
487+
proto.viam.robot.v1.RobotServiceClient.prototype.getModelsFromModules =
488+
function(request, metadata, callback) {
489+
return this.client_.rpcCall(this.hostname_ +
490+
'/viam.robot.v1.RobotService/GetModelsFromModules',
491+
request,
492+
metadata || {},
493+
methodDescriptor_RobotService_GetModelsFromModules,
494+
callback);
495+
};
496+
497+
498+
/**
499+
* @param {!proto.viam.robot.v1.GetModelsFromModulesRequest} request The
500+
* request proto
501+
* @param {?Object<string, string>=} metadata User defined
502+
* call metadata
503+
* @return {!Promise<!proto.viam.robot.v1.GetModelsFromModulesResponse>}
504+
* Promise that resolves to the response
505+
*/
506+
proto.viam.robot.v1.RobotServicePromiseClient.prototype.getModelsFromModules =
507+
function(request, metadata) {
508+
return this.client_.unaryCall(this.hostname_ +
509+
'/viam.robot.v1.RobotService/GetModelsFromModules',
510+
request,
511+
metadata || {},
512+
methodDescriptor_RobotService_GetModelsFromModules);
513+
};
514+
515+
455516
/**
456517
* @const
457518
* @type {!grpc.web.MethodDescriptor<

gen/js/robot/v1/robot_pb.d.ts

+70
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,76 @@ export namespace Discovery {
594594
}
595595
}
596596

597+
export class ModuleModel extends jspb.Message {
598+
getModuleName(): string;
599+
setModuleName(value: string): void;
600+
601+
getModel(): string;
602+
setModel(value: string): void;
603+
604+
getApi(): string;
605+
setApi(value: string): void;
606+
607+
getFromLocalModule(): boolean;
608+
setFromLocalModule(value: boolean): void;
609+
610+
serializeBinary(): Uint8Array;
611+
toObject(includeInstance?: boolean): ModuleModel.AsObject;
612+
static toObject(includeInstance: boolean, msg: ModuleModel): ModuleModel.AsObject;
613+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
614+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
615+
static serializeBinaryToWriter(message: ModuleModel, writer: jspb.BinaryWriter): void;
616+
static deserializeBinary(bytes: Uint8Array): ModuleModel;
617+
static deserializeBinaryFromReader(message: ModuleModel, reader: jspb.BinaryReader): ModuleModel;
618+
}
619+
620+
export namespace ModuleModel {
621+
export type AsObject = {
622+
moduleName: string,
623+
model: string,
624+
api: string,
625+
fromLocalModule: boolean,
626+
}
627+
}
628+
629+
export class GetModelsFromModulesRequest extends jspb.Message {
630+
serializeBinary(): Uint8Array;
631+
toObject(includeInstance?: boolean): GetModelsFromModulesRequest.AsObject;
632+
static toObject(includeInstance: boolean, msg: GetModelsFromModulesRequest): GetModelsFromModulesRequest.AsObject;
633+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
634+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
635+
static serializeBinaryToWriter(message: GetModelsFromModulesRequest, writer: jspb.BinaryWriter): void;
636+
static deserializeBinary(bytes: Uint8Array): GetModelsFromModulesRequest;
637+
static deserializeBinaryFromReader(message: GetModelsFromModulesRequest, reader: jspb.BinaryReader): GetModelsFromModulesRequest;
638+
}
639+
640+
export namespace GetModelsFromModulesRequest {
641+
export type AsObject = {
642+
}
643+
}
644+
645+
export class GetModelsFromModulesResponse extends jspb.Message {
646+
clearModelsList(): void;
647+
getModelsList(): Array<ModuleModel>;
648+
setModelsList(value: Array<ModuleModel>): void;
649+
addModels(value?: ModuleModel, index?: number): ModuleModel;
650+
651+
serializeBinary(): Uint8Array;
652+
toObject(includeInstance?: boolean): GetModelsFromModulesResponse.AsObject;
653+
static toObject(includeInstance: boolean, msg: GetModelsFromModulesResponse): GetModelsFromModulesResponse.AsObject;
654+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
655+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
656+
static serializeBinaryToWriter(message: GetModelsFromModulesResponse, writer: jspb.BinaryWriter): void;
657+
static deserializeBinary(bytes: Uint8Array): GetModelsFromModulesResponse;
658+
static deserializeBinaryFromReader(message: GetModelsFromModulesResponse, reader: jspb.BinaryReader): GetModelsFromModulesResponse;
659+
}
660+
661+
export namespace GetModelsFromModulesResponse {
662+
export type AsObject = {
663+
modelsList: Array<ModuleModel.AsObject>,
664+
}
665+
}
666+
597667
export class DiscoverComponentsRequest extends jspb.Message {
598668
clearQueriesList(): void;
599669
getQueriesList(): Array<DiscoveryQuery>;

0 commit comments

Comments
 (0)