You've already forked npm-core-sdk
637 lines
37 KiB
TypeScript
637 lines
37 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "stockQuery.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import { ExtractResult } from "./shared";
|
|
import { ExtractQuery } from "./shared";
|
|
import { FindKPIDataResult } from "./clickhouse";
|
|
import { FindKPIDataQuery } from "./clickhouse";
|
|
import { CountLinesResult } from "./shared";
|
|
import { CountLinesQuery } from "./shared";
|
|
import { ExtractKPIResult } from "./clickhouse";
|
|
import { ExtractKPIQuery } from "./clickhouse";
|
|
import { GetKPIDataForUserQuery } from "./clickhouse";
|
|
import { GetKPIDataResult } from "./clickhouse";
|
|
import { GetKPIDataQuery } from "./clickhouse";
|
|
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 { EntityType } from "./shared";
|
|
import { BlockFilter } from "./shared";
|
|
import { Stock } from "./stock";
|
|
import { ResultHeader } from "./shared";
|
|
import { QueryEntityID } from "./shared";
|
|
import { QueryProjectHeader } from "./shared";
|
|
//
|
|
// Query-server services
|
|
|
|
/**
|
|
* @generated from protobuf message api.StockByIdQuery
|
|
*/
|
|
export interface StockByIdQuery {
|
|
/**
|
|
* @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.StockQueryOptions Options = 3
|
|
*/
|
|
Options?: StockQueryOptions;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.StockByIdResult
|
|
*/
|
|
export interface StockByIdResult {
|
|
/**
|
|
* @generated from protobuf field: api.ResultHeader Header = 1
|
|
*/
|
|
Header?: ResultHeader;
|
|
/**
|
|
* @generated from protobuf field: repeated api.Stock Objects = 2
|
|
*/
|
|
Objects: Stock[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.StockByFilterQuery
|
|
*/
|
|
export interface StockByFilterQuery {
|
|
/**
|
|
* @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 = 7
|
|
*/
|
|
BlockFilters: BlockFilter[];
|
|
/**
|
|
* @generated from protobuf field: api.StockQueryOptions Options = 8
|
|
*/
|
|
Options?: StockQueryOptions;
|
|
/**
|
|
* @generated from protobuf field: api.EntityType UsageContextEntity = 9
|
|
*/
|
|
UsageContextEntity: EntityType;
|
|
/**
|
|
* @generated from protobuf field: string UsageContextPath = 10
|
|
*/
|
|
UsageContextPath: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.StockByFilterResult
|
|
*/
|
|
export interface StockByFilterResult {
|
|
/**
|
|
* @generated from protobuf field: api.ResultHeader Header = 1
|
|
*/
|
|
Header?: ResultHeader;
|
|
/**
|
|
* @generated from protobuf field: repeated api.Stock Objects = 2
|
|
*/
|
|
Objects: Stock[];
|
|
/**
|
|
* @generated from protobuf field: string queryContext = 3
|
|
*/
|
|
queryContext: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.StockQueryOptions
|
|
*/
|
|
export interface StockQueryOptions {
|
|
/**
|
|
* @generated from protobuf field: repeated string Only = 1
|
|
*/
|
|
Only: string[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.StockByMatchQuery
|
|
*/
|
|
export interface StockByMatchQuery {
|
|
/**
|
|
* @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 = 5
|
|
*/
|
|
BlockFilters: BlockFilter[];
|
|
/**
|
|
* MatchField list structure, for FindMatching query
|
|
*
|
|
* @generated from protobuf field: repeated api.MatchField MatchFields = 6
|
|
*/
|
|
MatchFields: MatchField[];
|
|
/**
|
|
* @generated from protobuf field: api.StockQueryOptions Options = 7
|
|
*/
|
|
Options?: StockQueryOptions;
|
|
/**
|
|
* @generated from protobuf field: api.EntityType UsageContextEntity = 8
|
|
*/
|
|
UsageContextEntity: EntityType;
|
|
/**
|
|
* @generated from protobuf field: string UsageContextPath = 9
|
|
*/
|
|
UsageContextPath: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.StockByMatchResult
|
|
*/
|
|
export interface StockByMatchResult {
|
|
/**
|
|
* @generated from protobuf field: repeated api.MatchFieldResult MatchResults = 2
|
|
*/
|
|
MatchResults: MatchFieldResult[];
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class StockByIdQuery$Type extends MessageType<StockByIdQuery> {
|
|
constructor() {
|
|
super("api.StockByIdQuery", [
|
|
{ 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: () => StockQueryOptions }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "IDs"] } }, "api.messageType": "Query" });
|
|
}
|
|
create(value?: PartialMessage<StockByIdQuery>): StockByIdQuery {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.IDs = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<StockByIdQuery>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StockByIdQuery): StockByIdQuery {
|
|
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.StockQueryOptions Options */ 3:
|
|
message.Options = StockQueryOptions.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: StockByIdQuery, 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.StockQueryOptions Options = 3; */
|
|
if (message.Options)
|
|
StockQueryOptions.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.StockByIdQuery
|
|
*/
|
|
export const StockByIdQuery = new StockByIdQuery$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class StockByIdResult$Type extends MessageType<StockByIdResult> {
|
|
constructor() {
|
|
super("api.StockByIdResult", [
|
|
{ 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: () => Stock }
|
|
], { "api.messageType": "Result" });
|
|
}
|
|
create(value?: PartialMessage<StockByIdResult>): StockByIdResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Objects = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<StockByIdResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StockByIdResult): StockByIdResult {
|
|
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.Stock Objects */ 2:
|
|
message.Objects.push(Stock.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: StockByIdResult, 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.Stock Objects = 2; */
|
|
for (let i = 0; i < message.Objects.length; i++)
|
|
Stock.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.StockByIdResult
|
|
*/
|
|
export const StockByIdResult = new StockByIdResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class StockByFilterQuery$Type extends MessageType<StockByFilterQuery> {
|
|
constructor() {
|
|
super("api.StockByFilterQuery", [
|
|
{ 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: 7, name: "BlockFilters", kind: "message", localName: "BlockFilters", jsonName: "BlockFilters", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BlockFilter },
|
|
{ no: 8, name: "Options", kind: "message", localName: "Options", jsonName: "Options", T: () => StockQueryOptions },
|
|
{ no: 9, name: "UsageContextEntity", kind: "enum", localName: "UsageContextEntity", jsonName: "UsageContextEntity", T: () => ["api.EntityType", EntityType], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional : Entity to apply the restriction rules (on the path defined with UsageContextPath)", example: "\"For Actor, to limit the results according to Order ShipFrom restriction rules, define UsageContextEntity to Order and UsageContextPath to Payload.ShipFrom\"" } } },
|
|
{ no: 10, name: "UsageContextPath", kind: "scalar", localName: "UsageContextPath", jsonName: "UsageContextPath", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional : Path of restriction rule to apply (UsageContextEntity should be defined)" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
|
|
}
|
|
create(value?: PartialMessage<StockByFilterQuery>): StockByFilterQuery {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.limitFilter = "";
|
|
message.queryContext = "";
|
|
message.BlockFilters = [];
|
|
message.UsageContextEntity = 0;
|
|
message.UsageContextPath = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<StockByFilterQuery>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StockByFilterQuery): StockByFilterQuery {
|
|
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 */ 7:
|
|
message.BlockFilters.push(BlockFilter.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* api.StockQueryOptions Options */ 8:
|
|
message.Options = StockQueryOptions.internalBinaryRead(reader, reader.uint32(), options, message.Options);
|
|
break;
|
|
case /* api.EntityType UsageContextEntity */ 9:
|
|
message.UsageContextEntity = reader.int32();
|
|
break;
|
|
case /* string UsageContextPath */ 10:
|
|
message.UsageContextPath = 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: StockByFilterQuery, 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 = 7; */
|
|
for (let i = 0; i < message.BlockFilters.length; i++)
|
|
BlockFilter.internalBinaryWrite(message.BlockFilters[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.StockQueryOptions Options = 8; */
|
|
if (message.Options)
|
|
StockQueryOptions.internalBinaryWrite(message.Options, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityType UsageContextEntity = 9; */
|
|
if (message.UsageContextEntity !== 0)
|
|
writer.tag(9, WireType.Varint).int32(message.UsageContextEntity);
|
|
/* string UsageContextPath = 10; */
|
|
if (message.UsageContextPath !== "")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.UsageContextPath);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.StockByFilterQuery
|
|
*/
|
|
export const StockByFilterQuery = new StockByFilterQuery$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class StockByFilterResult$Type extends MessageType<StockByFilterResult> {
|
|
constructor() {
|
|
super("api.StockByFilterResult", [
|
|
{ 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: () => Stock },
|
|
{ no: 3, name: "queryContext", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<StockByFilterResult>): StockByFilterResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Objects = [];
|
|
message.queryContext = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<StockByFilterResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StockByFilterResult): StockByFilterResult {
|
|
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.Stock Objects */ 2:
|
|
message.Objects.push(Stock.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: StockByFilterResult, 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.Stock Objects = 2; */
|
|
for (let i = 0; i < message.Objects.length; i++)
|
|
Stock.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.StockByFilterResult
|
|
*/
|
|
export const StockByFilterResult = new StockByFilterResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class StockQueryOptions$Type extends MessageType<StockQueryOptions> {
|
|
constructor() {
|
|
super("api.StockQueryOptions", [
|
|
{ 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 Stock", example: "[\"ID.RefID\", \"Payload.ActorID\", \"Payload.Goods.ItemID\"]" } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<StockQueryOptions>): StockQueryOptions {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Only = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<StockQueryOptions>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StockQueryOptions): StockQueryOptions {
|
|
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: StockQueryOptions, 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.StockQueryOptions
|
|
*/
|
|
export const StockQueryOptions = new StockQueryOptions$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class StockByMatchQuery$Type extends MessageType<StockByMatchQuery> {
|
|
constructor() {
|
|
super("api.StockByMatchQuery", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 5, name: "BlockFilters", kind: "message", localName: "BlockFilters", jsonName: "BlockFilters", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BlockFilter },
|
|
{ no: 6, 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" } } },
|
|
{ no: 7, name: "Options", kind: "message", localName: "Options", jsonName: "Options", T: () => StockQueryOptions },
|
|
{ no: 8, name: "UsageContextEntity", kind: "enum", localName: "UsageContextEntity", jsonName: "UsageContextEntity", T: () => ["api.EntityType", EntityType], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional : Entity to apply the restriction rules (on the path defined with UsageContextPath)", example: "\"For Actor, to limit the results according to Order ShipFrom restriction rules, define UsageContextEntity to Order and UsageContextPath to Payload.ShipFrom\"" } } },
|
|
{ no: 9, name: "UsageContextPath", kind: "scalar", localName: "UsageContextPath", jsonName: "UsageContextPath", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional : Path of restriction rule to apply (UsageContextEntity should be defined)" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
|
|
}
|
|
create(value?: PartialMessage<StockByMatchQuery>): StockByMatchQuery {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.BlockFilters = [];
|
|
message.MatchFields = [];
|
|
message.UsageContextEntity = 0;
|
|
message.UsageContextPath = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<StockByMatchQuery>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StockByMatchQuery): StockByMatchQuery {
|
|
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 */ 5:
|
|
message.BlockFilters.push(BlockFilter.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.MatchField MatchFields */ 6:
|
|
message.MatchFields.push(MatchField.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* api.StockQueryOptions Options */ 7:
|
|
message.Options = StockQueryOptions.internalBinaryRead(reader, reader.uint32(), options, message.Options);
|
|
break;
|
|
case /* api.EntityType UsageContextEntity */ 8:
|
|
message.UsageContextEntity = reader.int32();
|
|
break;
|
|
case /* string UsageContextPath */ 9:
|
|
message.UsageContextPath = 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: StockByMatchQuery, 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 = 5; */
|
|
for (let i = 0; i < message.BlockFilters.length; i++)
|
|
BlockFilter.internalBinaryWrite(message.BlockFilters[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.MatchField MatchFields = 6; */
|
|
for (let i = 0; i < message.MatchFields.length; i++)
|
|
MatchField.internalBinaryWrite(message.MatchFields[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.StockQueryOptions Options = 7; */
|
|
if (message.Options)
|
|
StockQueryOptions.internalBinaryWrite(message.Options, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityType UsageContextEntity = 8; */
|
|
if (message.UsageContextEntity !== 0)
|
|
writer.tag(8, WireType.Varint).int32(message.UsageContextEntity);
|
|
/* string UsageContextPath = 9; */
|
|
if (message.UsageContextPath !== "")
|
|
writer.tag(9, WireType.LengthDelimited).string(message.UsageContextPath);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.StockByMatchQuery
|
|
*/
|
|
export const StockByMatchQuery = new StockByMatchQuery$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class StockByMatchResult$Type extends MessageType<StockByMatchResult> {
|
|
constructor() {
|
|
super("api.StockByMatchResult", [
|
|
{ no: 2, name: "MatchResults", kind: "message", localName: "MatchResults", jsonName: "MatchResults", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MatchFieldResult }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<StockByMatchResult>): StockByMatchResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.MatchResults = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<StockByMatchResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StockByMatchResult): StockByMatchResult {
|
|
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: StockByMatchResult, 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.StockByMatchResult
|
|
*/
|
|
export const StockByMatchResult = new StockByMatchResult$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.StockQuery
|
|
*/
|
|
export const StockQuery = new ServiceType("api.StockQuery", [
|
|
{ name: "GetByIds", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock Query"], description: "(Deprecated, will be removed in release 1.10) Get Stock from Ids" }, "api.rscType": "Project", "api.roles": "Platform.Project-Query", "api.moduleID": "stock-inventory", "api.tableName": "stockById", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: StockByIdQuery, O: StockByIdResult },
|
|
{ name: "Find", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock Query"], description: "(Deprecated, will be removed in release 1.10) Find a stock from its properties." }, "api.rscType": "Project", "api.roles": "Platform.Project-Query", "api.moduleID": "stock-inventory", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: StockByFilterQuery, O: StockByFilterResult },
|
|
{ name: "FindMatchingFieldValues", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock 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": "", "api.moduleID": "stock-inventory", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: StockByMatchQuery, O: StockByMatchResult },
|
|
{ name: "FindMatchingFieldElements", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock 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": "", "api.moduleID": "stock-inventory", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ElementByMatchQuery, O: ElementByMatchResult },
|
|
{ name: "GetKPIData", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock Query"], description: "Get stock KPI data" }, "api.rscType": "Project", "api.roles": "Platform.Project-KPI", "api.moduleID": "stock-inventory", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: GetKPIDataQuery, O: GetKPIDataResult },
|
|
{ name: "GetKPIDataForUser", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock Query"], description: "Get stock KPI data for a specific user" }, "api.rscType": "Platform", "api.roles": "Platform.Project-KPI", "api.moduleID": "", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: GetKPIDataForUserQuery, O: GetKPIDataResult },
|
|
{ name: "ExtractKPI", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock Query"], description: "Schedule a data extraction" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "stock-inventory", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ExtractKPIQuery, O: ExtractKPIResult },
|
|
{ name: "CountLines", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock Query"], description: "Count lines in database for project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Query", "api.moduleID": "stock-inventory", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CountLinesQuery, O: CountLinesResult },
|
|
{ name: "FindKPIData", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock Query"], description: "Find stock KPI data" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "stock-inventory", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: FindKPIDataQuery, O: FindKPIDataResult },
|
|
{ name: "Extract", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Stock Query"], description: "Schedule a data extraction" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "stock-inventory", "api.tags": "PROJECT_ACTIVITY", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ExtractQuery, O: ExtractResult }
|
|
], { "api.serviceType": "Query", "api.k8sService": "query-server" });
|