You've already forked npm-core-sdk
231 lines
12 KiB
TypeScript
231 lines
12 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "trackingQuery.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import { CountLinesResult } from "./shared";
|
|
import { CountLinesQuery } from "./shared";
|
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
import { WireType } from "@protobuf-ts/runtime";
|
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
import { Tracking } from "./tracking";
|
|
import { ResultHeader } from "./shared";
|
|
import { QueryEntityID } from "./shared";
|
|
import { QueryProjectHeader } from "./shared";
|
|
//
|
|
// Query-server services
|
|
|
|
/**
|
|
* @generated from protobuf message api.TrackingByIdQuery
|
|
*/
|
|
export interface TrackingByIdQuery {
|
|
/**
|
|
* @generated from protobuf field: api.QueryProjectHeader Header = 1
|
|
*/
|
|
Header?: QueryProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: repeated api.QueryEntityID IDs = 2
|
|
*/
|
|
IDs: QueryEntityID[];
|
|
/**
|
|
* @generated from protobuf field: api.TrackingQueryOptions Options = 3
|
|
*/
|
|
Options?: TrackingQueryOptions;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.TrackingByIdResult
|
|
*/
|
|
export interface TrackingByIdResult {
|
|
/**
|
|
* @generated from protobuf field: api.ResultHeader Header = 1
|
|
*/
|
|
Header?: ResultHeader;
|
|
/**
|
|
* @generated from protobuf field: repeated api.Tracking Objects = 2
|
|
*/
|
|
Objects: Tracking[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.TrackingQueryOptions
|
|
*/
|
|
export interface TrackingQueryOptions {
|
|
/**
|
|
* @generated from protobuf field: repeated string Only = 1
|
|
*/
|
|
Only: string[];
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingByIdQuery$Type extends MessageType<TrackingByIdQuery> {
|
|
constructor() {
|
|
super("api.TrackingByIdQuery", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "IDs", kind: "message", localName: "IDs", jsonName: "IDs", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QueryEntityID, options: { "validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 3, name: "Options", kind: "message", localName: "Options", jsonName: "Options", T: () => TrackingQueryOptions }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "IDs"] } }, "api.messageType": "Query" });
|
|
}
|
|
create(value?: PartialMessage<TrackingByIdQuery>): TrackingByIdQuery {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.IDs = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingByIdQuery>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingByIdQuery): TrackingByIdQuery {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.QueryProjectHeader Header */ 1:
|
|
message.Header = QueryProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* repeated api.QueryEntityID IDs */ 2:
|
|
message.IDs.push(QueryEntityID.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* api.TrackingQueryOptions Options */ 3:
|
|
message.Options = TrackingQueryOptions.internalBinaryRead(reader, reader.uint32(), options, message.Options);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingByIdQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.QueryProjectHeader Header = 1; */
|
|
if (message.Header)
|
|
QueryProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.QueryEntityID IDs = 2; */
|
|
for (let i = 0; i < message.IDs.length; i++)
|
|
QueryEntityID.internalBinaryWrite(message.IDs[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingQueryOptions Options = 3; */
|
|
if (message.Options)
|
|
TrackingQueryOptions.internalBinaryWrite(message.Options, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingByIdQuery
|
|
*/
|
|
export const TrackingByIdQuery = new TrackingByIdQuery$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingByIdResult$Type extends MessageType<TrackingByIdResult> {
|
|
constructor() {
|
|
super("api.TrackingByIdResult", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => ResultHeader },
|
|
{ no: 2, name: "Objects", kind: "message", localName: "Objects", jsonName: "Objects", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Tracking }
|
|
], { "api.messageType": "Result" });
|
|
}
|
|
create(value?: PartialMessage<TrackingByIdResult>): TrackingByIdResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Objects = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingByIdResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingByIdResult): TrackingByIdResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.ResultHeader Header */ 1:
|
|
message.Header = ResultHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* repeated api.Tracking Objects */ 2:
|
|
message.Objects.push(Tracking.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingByIdResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.ResultHeader Header = 1; */
|
|
if (message.Header)
|
|
ResultHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.Tracking Objects = 2; */
|
|
for (let i = 0; i < message.Objects.length; i++)
|
|
Tracking.internalBinaryWrite(message.Objects[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingByIdResult
|
|
*/
|
|
export const TrackingByIdResult = new TrackingByIdResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingQueryOptions$Type extends MessageType<TrackingQueryOptions> {
|
|
constructor() {
|
|
super("api.TrackingQueryOptions", [
|
|
{ no: 1, name: "Only", kind: "scalar", localName: "Only", jsonName: "Only", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional : List of fields to include in the response for each returned Tracking", example: "[\"ID.RefID\", \"Payload.Name\", \"Payload.Lines.ID\"]" } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<TrackingQueryOptions>): TrackingQueryOptions {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Only = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingQueryOptions>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingQueryOptions): TrackingQueryOptions {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated string Only */ 1:
|
|
message.Only.push(reader.string());
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingQueryOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated string Only = 1; */
|
|
for (let i = 0; i < message.Only.length; i++)
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Only[i]);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingQueryOptions
|
|
*/
|
|
export const TrackingQueryOptions = new TrackingQueryOptions$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.TrackingQuery
|
|
*/
|
|
export const TrackingQuery = new ServiceType("api.TrackingQuery", [
|
|
{ name: "GetByIds", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Query"], description: "Get Trackings from Ids" }, "api.rscType": "Project", "api.roles": "Platform.Project-Query", "api.tableName": "trackingById", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: TrackingByIdQuery, O: TrackingByIdResult },
|
|
{ name: "CountLines", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Query"], description: "Count lines in database for project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Query", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CountLinesQuery, O: CountLinesResult }
|
|
], { "api.serviceType": "Query", "api.k8sService": "query-server" });
|