diff --git a/app/data_client.go b/app/data_client.go index cba84b7edd1b..50bbe6d1c336 100644 --- a/app/data_client.go +++ b/app/data_client.go @@ -385,23 +385,15 @@ func BsonToGo(rawData [][]byte) ([]map[string]interface{}, error) { } // TabularDataByFilter queries tabular data and metadata based on given filters. -// Deprecated: This endpoint will be removed in a future version. -func (d *DataClient) TabularDataByFilter(ctx context.Context, opts *DataByFilterOptions) (TabularDataReturn, error) { - dataReq := pb.DataRequest{} - var countOnly, includeInternalData bool - if opts != nil { - dataReq.Filter = filterToProto(opts.Filter) - if opts.Limit != 0 { - dataReq.Limit = uint64(opts.Limit) - } - if opts.Last != "" { - dataReq.Last = opts.Last - } - dataReq.SortOrder = orderToProto(opts.SortOrder) - countOnly = opts.CountOnly - includeInternalData = opts.IncludeInternalData - } - //nolint:deprecated,staticcheck +func (d *DataClient) TabularDataByFilter( + ctx context.Context, + filter Filter, + limit int, + last string, + sortOrder Order, + countOnly bool, + includeInternalData bool, +) (TabularDataReturn, error) { resp, err := d.dataClient.TabularDataByFilter(ctx, &pb.TabularDataByFilterRequest{ DataRequest: &dataReq, CountOnly: countOnly, @@ -1278,28 +1270,7 @@ func tabularDataFromProto(proto *pb.TabularData, metadata *pb.CaptureMetadata) T } } -func exportTabularDataReturnFromProto(proto *pb.ExportTabularDataResponse) *ExportTabularDataReturn { - return &ExportTabularDataReturn{ - OrganizationID: proto.OrganizationId, - LocationID: proto.LocationId, - RobotID: proto.RobotId, - RobotName: proto.RobotName, - PartID: proto.PartId, - PartName: proto.PartName, - ComponentName: proto.ComponentName, - ComponentType: proto.ComponentType, - MethodName: proto.MethodName, - TimeCaptured: proto.TimeCaptured.AsTime(), - MethodParameters: methodParamsFromProto(proto.MethodParameters), - Tags: proto.Tags, - Payload: proto.Payload.AsMap(), - } -} - -func binaryIDToProto(binaryID *BinaryID) *pb.BinaryID { - if binaryID == nil { - return nil - } +func binaryIDToProto(binaryID BinaryID) *pb.BinaryID { return &pb.BinaryID{ FileId: binaryID.FileID, OrganizationId: binaryID.OrganizationID,