You've already forked npm-core-sdk
553 lines
30 KiB
TypeScript
553 lines
30 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "partnerQuery.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import { CountLinesResult } from "./shared";
|
|
import { CountLinesQuery } from "./shared";
|
|
import { ExtractResult } from "./shared";
|
|
import { ExtractQuery } from "./shared";
|
|
import { ElementByMatchResult } from "./shared";
|
|
import { ElementByMatchQuery } 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 { MatchFieldResult } from "./shared";
|
|
import { MatchField } from "./shared";
|
|
import { BlockFilter } from "./shared";
|
|
import { Partner } from "./partner";
|
|
import { ResultHeader } from "./shared";
|
|
import { EntityID } from "./shared";
|
|
import { QueryProjectHeader } from "./shared";
|
|
//
|
|
// Query-server services
|
|
|
|
/**
|
|
* @generated from protobuf message api.PartnerByIdQuery
|
|
*/
|
|
export interface PartnerByIdQuery {
|
|
/**
|
|
* @generated from protobuf field: api.QueryProjectHeader Header = 1
|
|
*/
|
|
Header?: QueryProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: repeated api.EntityID IDs = 2
|
|
*/
|
|
IDs: EntityID[];
|
|
/**
|
|
* @generated from protobuf field: api.PartnerQueryOptions Options = 3
|
|
*/
|
|
Options?: PartnerQueryOptions;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.PartnerByIdResult
|
|
*/
|
|
export interface PartnerByIdResult {
|
|
/**
|
|
* @generated from protobuf field: api.ResultHeader Header = 1
|
|
*/
|
|
Header?: ResultHeader;
|
|
/**
|
|
* @generated from protobuf field: repeated api.Partner Objects = 2
|
|
*/
|
|
Objects: Partner[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.PartnerByFilterQuery
|
|
*/
|
|
export interface PartnerByFilterQuery {
|
|
/**
|
|
* @generated from protobuf field: api.QueryProjectHeader Header = 1
|
|
*/
|
|
Header?: QueryProjectHeader;
|
|
/**
|
|
* Number of maximum result
|
|
*
|
|
* @generated from protobuf field: string limitFilter = 4
|
|
*/
|
|
limitFilter: string;
|
|
/**
|
|
* @generated from protobuf field: string queryContext = 5
|
|
*/
|
|
queryContext: string;
|
|
/**
|
|
* list of blockFilters structure for Find query, each element (BlockFilter) in the list is an "OR" part of the query, if not empty, simpleFilters (deprecated) & rangeFilters (deprecated) will be ignored
|
|
*
|
|
* @generated from protobuf field: repeated api.BlockFilter BlockFilters = 6
|
|
*/
|
|
BlockFilters: BlockFilter[];
|
|
/**
|
|
* @generated from protobuf field: api.PartnerQueryOptions Options = 7
|
|
*/
|
|
Options?: PartnerQueryOptions;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.PartnerByFilterResult
|
|
*/
|
|
export interface PartnerByFilterResult {
|
|
/**
|
|
* @generated from protobuf field: api.ResultHeader Header = 1
|
|
*/
|
|
Header?: ResultHeader;
|
|
/**
|
|
* @generated from protobuf field: repeated api.Partner Objects = 2
|
|
*/
|
|
Objects: Partner[];
|
|
/**
|
|
* @generated from protobuf field: string queryContext = 3
|
|
*/
|
|
queryContext: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.PartnerQueryOptions
|
|
*/
|
|
export interface PartnerQueryOptions {
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.PartnerByMatchQuery
|
|
*/
|
|
export interface PartnerByMatchQuery {
|
|
/**
|
|
* @generated from protobuf field: api.QueryProjectHeader Header = 1
|
|
*/
|
|
Header?: QueryProjectHeader;
|
|
/**
|
|
* list of blockFilters structure for Find query, each element (BlockFilter) in the list is an "OR" part of the query, if not empty, simpleFilters (deprecated) & rangeFilters (deprecated) will be ignored
|
|
*
|
|
* @generated from protobuf field: repeated api.BlockFilter BlockFilters = 7
|
|
*/
|
|
BlockFilters: BlockFilter[];
|
|
/**
|
|
* MatchField list structure, for FindMatching query
|
|
*
|
|
* @generated from protobuf field: repeated api.MatchField MatchFields = 8
|
|
*/
|
|
MatchFields: MatchField[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.PartnerByMatchResult
|
|
*/
|
|
export interface PartnerByMatchResult {
|
|
/**
|
|
* @generated from protobuf field: repeated api.MatchFieldResult MatchResults = 2
|
|
*/
|
|
MatchResults: MatchFieldResult[];
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PartnerByIdQuery$Type extends MessageType<PartnerByIdQuery> {
|
|
constructor() {
|
|
super("api.PartnerByIdQuery", [
|
|
{ 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: () => EntityID, options: { "validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 3, name: "Options", kind: "message", localName: "Options", jsonName: "Options", T: () => PartnerQueryOptions }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "IDs"] } }, "api.messageType": "Query" });
|
|
}
|
|
create(value?: PartialMessage<PartnerByIdQuery>): PartnerByIdQuery {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.IDs = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PartnerByIdQuery>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PartnerByIdQuery): PartnerByIdQuery {
|
|
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.EntityID IDs */ 2:
|
|
message.IDs.push(EntityID.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* api.PartnerQueryOptions Options */ 3:
|
|
message.Options = PartnerQueryOptions.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: PartnerByIdQuery, 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.EntityID IDs = 2; */
|
|
for (let i = 0; i < message.IDs.length; i++)
|
|
EntityID.internalBinaryWrite(message.IDs[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.PartnerQueryOptions Options = 3; */
|
|
if (message.Options)
|
|
PartnerQueryOptions.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.PartnerByIdQuery
|
|
*/
|
|
export const PartnerByIdQuery = new PartnerByIdQuery$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PartnerByIdResult$Type extends MessageType<PartnerByIdResult> {
|
|
constructor() {
|
|
super("api.PartnerByIdResult", [
|
|
{ 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: () => Partner }
|
|
], { "api.messageType": "Result" });
|
|
}
|
|
create(value?: PartialMessage<PartnerByIdResult>): PartnerByIdResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Objects = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PartnerByIdResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PartnerByIdResult): PartnerByIdResult {
|
|
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.Partner Objects */ 2:
|
|
message.Objects.push(Partner.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: PartnerByIdResult, 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.Partner Objects = 2; */
|
|
for (let i = 0; i < message.Objects.length; i++)
|
|
Partner.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.PartnerByIdResult
|
|
*/
|
|
export const PartnerByIdResult = new PartnerByIdResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PartnerByFilterQuery$Type extends MessageType<PartnerByFilterQuery> {
|
|
constructor() {
|
|
super("api.PartnerByFilterQuery", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 4, name: "limitFilter", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of maximum result", example: "\"500\"" } } },
|
|
{ no: 5, name: "queryContext", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 6, name: "BlockFilters", kind: "message", localName: "BlockFilters", jsonName: "BlockFilters", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BlockFilter },
|
|
{ no: 7, name: "Options", kind: "message", localName: "Options", jsonName: "Options", T: () => PartnerQueryOptions }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
|
|
}
|
|
create(value?: PartialMessage<PartnerByFilterQuery>): PartnerByFilterQuery {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.limitFilter = "";
|
|
message.queryContext = "";
|
|
message.BlockFilters = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PartnerByFilterQuery>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PartnerByFilterQuery): PartnerByFilterQuery {
|
|
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 /* string limitFilter */ 4:
|
|
message.limitFilter = reader.string();
|
|
break;
|
|
case /* string queryContext */ 5:
|
|
message.queryContext = reader.string();
|
|
break;
|
|
case /* repeated api.BlockFilter BlockFilters */ 6:
|
|
message.BlockFilters.push(BlockFilter.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* api.PartnerQueryOptions Options */ 7:
|
|
message.Options = PartnerQueryOptions.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: PartnerByFilterQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.QueryProjectHeader Header = 1; */
|
|
if (message.Header)
|
|
QueryProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string limitFilter = 4; */
|
|
if (message.limitFilter !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.limitFilter);
|
|
/* string queryContext = 5; */
|
|
if (message.queryContext !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.queryContext);
|
|
/* repeated api.BlockFilter BlockFilters = 6; */
|
|
for (let i = 0; i < message.BlockFilters.length; i++)
|
|
BlockFilter.internalBinaryWrite(message.BlockFilters[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.PartnerQueryOptions Options = 7; */
|
|
if (message.Options)
|
|
PartnerQueryOptions.internalBinaryWrite(message.Options, writer.tag(7, 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.PartnerByFilterQuery
|
|
*/
|
|
export const PartnerByFilterQuery = new PartnerByFilterQuery$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PartnerByFilterResult$Type extends MessageType<PartnerByFilterResult> {
|
|
constructor() {
|
|
super("api.PartnerByFilterResult", [
|
|
{ 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: () => Partner },
|
|
{ no: 3, name: "queryContext", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<PartnerByFilterResult>): PartnerByFilterResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Objects = [];
|
|
message.queryContext = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PartnerByFilterResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PartnerByFilterResult): PartnerByFilterResult {
|
|
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.Partner Objects */ 2:
|
|
message.Objects.push(Partner.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* string queryContext */ 3:
|
|
message.queryContext = 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: PartnerByFilterResult, 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.Partner Objects = 2; */
|
|
for (let i = 0; i < message.Objects.length; i++)
|
|
Partner.internalBinaryWrite(message.Objects[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* string queryContext = 3; */
|
|
if (message.queryContext !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.queryContext);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.PartnerByFilterResult
|
|
*/
|
|
export const PartnerByFilterResult = new PartnerByFilterResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PartnerQueryOptions$Type extends MessageType<PartnerQueryOptions> {
|
|
constructor() {
|
|
super("api.PartnerQueryOptions", []);
|
|
}
|
|
create(value?: PartialMessage<PartnerQueryOptions>): PartnerQueryOptions {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PartnerQueryOptions>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PartnerQueryOptions): PartnerQueryOptions {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
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: PartnerQueryOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.PartnerQueryOptions
|
|
*/
|
|
export const PartnerQueryOptions = new PartnerQueryOptions$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PartnerByMatchQuery$Type extends MessageType<PartnerByMatchQuery> {
|
|
constructor() {
|
|
super("api.PartnerByMatchQuery", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 7, name: "BlockFilters", kind: "message", localName: "BlockFilters", jsonName: "BlockFilters", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BlockFilter },
|
|
{ no: 8, name: "MatchFields", kind: "message", localName: "MatchFields", jsonName: "MatchFields", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MatchField, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "MatchField list structure, for FindMatching query" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
|
|
}
|
|
create(value?: PartialMessage<PartnerByMatchQuery>): PartnerByMatchQuery {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.BlockFilters = [];
|
|
message.MatchFields = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PartnerByMatchQuery>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PartnerByMatchQuery): PartnerByMatchQuery {
|
|
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.BlockFilter BlockFilters */ 7:
|
|
message.BlockFilters.push(BlockFilter.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.MatchField MatchFields */ 8:
|
|
message.MatchFields.push(MatchField.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: PartnerByMatchQuery, 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.BlockFilter BlockFilters = 7; */
|
|
for (let i = 0; i < message.BlockFilters.length; i++)
|
|
BlockFilter.internalBinaryWrite(message.BlockFilters[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.MatchField MatchFields = 8; */
|
|
for (let i = 0; i < message.MatchFields.length; i++)
|
|
MatchField.internalBinaryWrite(message.MatchFields[i], writer.tag(8, 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.PartnerByMatchQuery
|
|
*/
|
|
export const PartnerByMatchQuery = new PartnerByMatchQuery$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PartnerByMatchResult$Type extends MessageType<PartnerByMatchResult> {
|
|
constructor() {
|
|
super("api.PartnerByMatchResult", [
|
|
{ no: 2, name: "MatchResults", kind: "message", localName: "MatchResults", jsonName: "MatchResults", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MatchFieldResult }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<PartnerByMatchResult>): PartnerByMatchResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.MatchResults = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PartnerByMatchResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PartnerByMatchResult): PartnerByMatchResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated api.MatchFieldResult MatchResults */ 2:
|
|
message.MatchResults.push(MatchFieldResult.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: PartnerByMatchResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.MatchFieldResult MatchResults = 2; */
|
|
for (let i = 0; i < message.MatchResults.length; i++)
|
|
MatchFieldResult.internalBinaryWrite(message.MatchResults[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.PartnerByMatchResult
|
|
*/
|
|
export const PartnerByMatchResult = new PartnerByMatchResult$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.PartnerQuery
|
|
*/
|
|
export const PartnerQuery = new ServiceType("api.PartnerQuery", [
|
|
{ name: "GetByIds", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Partner Query"], description: "Get Partners from Ids" }, "api.rscType": "Project", "api.roles": "Platform.Project-Query", "api.tableName": "partnerById", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: PartnerByIdQuery, O: PartnerByIdResult },
|
|
{ name: "Find", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Partner Query"], description: "Find Partners using search criterias" }, "api.rscType": "Project", "api.roles": "Platform.Project-Query", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: PartnerByFilterQuery, O: PartnerByFilterResult },
|
|
{ name: "FindMatchingFieldValues", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Partner Query"], description: "using search criteria & a main field word, find the list of fields containing the searched word (used for auto completion purposes ...) " }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: PartnerByMatchQuery, O: PartnerByMatchResult },
|
|
{ name: "FindMatchingFieldElements", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Partner Query"], description: "using search criteria & a main field word, find the list of field elements containing the searched word (used for auto completion purposes ...) " }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ElementByMatchQuery, O: ElementByMatchResult },
|
|
{ name: "Extract", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Partner Query"], description: "Schedule a data extraction" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ExtractQuery, O: ExtractResult },
|
|
{ name: "CountLines", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Partner Query"], description: "Count lines in database for project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Query", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CountLinesQuery, O: CountLinesResult }
|
|
], { "api.serviceType": "Query", "api.k8sService": "query-server" });
|