Files
npm-core-sdk/clickhouse.ts
2025-08-19 08:32:31 +00:00

1954 lines
101 KiB
TypeScript

// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
// @generated from protobuf file "clickhouse.proto" (package "api", syntax proto3)
// tslint:disable
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 { WorkflowExecutionResult } from "./shared";
import { TimeFormat } from "./shared";
import { ExtractColumnFormat } from "./shared";
import { TranslationMap } from "./shared";
import { BlockFilter } from "./shared";
import { QuerySiteHeader } from "./shared";
import { QueryProjectHeader } from "./shared";
import { StringDateObject } from "./shared";
/**
* @generated from protobuf message api.CHDimension
*/
export interface CHDimension {
/**
* @generated from protobuf field: string Name = 1
*/
Name: string;
/**
* @generated from protobuf field: string Granularity = 2
*/
Granularity: string;
/**
* @generated from protobuf field: string Level = 3
*/
Level: string;
/**
* @generated from protobuf field: string DataType = 4
*/
DataType: string;
/**
* @generated from protobuf field: string ContentType = 5
*/
ContentType: string;
/**
* @generated from protobuf field: string EnumValues = 6
*/
EnumValues: string;
/**
* A period of time
*
* @generated from protobuf field: string Period = 7
*/
Period: string;
/**
* Allowed values : \"\", \"EQUAL\", \"DIFF\", \"START_BY\", \"NOT_START_BY\", \"FINISH_BY\", \"NOT_FINISH_BY\", \"CONTAINS\", \"NOT_CONTAINS\", \"IN_LIST\", \"NOT_IN_LIST\"
*
* @generated from protobuf field: string Operator = 8
*/
Operator: string;
/**
* @generated from protobuf field: repeated string Values = 9
*/
Values: string[];
/**
* @generated from protobuf field: api.StringDateObject StartDate = 10
*/
StartDate?: StringDateObject;
/**
* @generated from protobuf field: api.StringDateObject EndDate = 11
*/
EndDate?: StringDateObject;
/**
* @generated from protobuf field: repeated api.CHQueryExpression Expressions = 12
*/
Expressions: CHQueryExpression[];
/**
* @generated from protobuf field: bool IsComputed = 13
*/
IsComputed: boolean;
/**
* Only useful for filters
*
* @generated from protobuf field: api.CHDimension Or = 14
*/
Or?: CHDimension;
}
/**
* @generated from protobuf message api.CHQueryExpression
*/
export interface CHQueryExpression {
/**
* @generated from protobuf field: string Block = 1
*/
Block: string;
/**
* @generated from protobuf field: api.CHQueryType QueryType = 2
*/
QueryType: CHQueryType;
/**
* @generated from protobuf field: string Field = 3
*/
Field: string;
/**
* @generated from protobuf field: string Query = 4
*/
Query: string;
}
/**
* @generated from protobuf message api.CHMetric
*/
export interface CHMetric {
/**
* @generated from protobuf field: string Name = 1
*/
Name: string;
/**
* @generated from protobuf field: string Level = 3
*/
Level: string;
/**
* @generated from protobuf field: string DataType = 4
*/
DataType: string;
/**
* @generated from protobuf field: string ContentType = 5
*/
ContentType: string;
/**
* @generated from protobuf field: string EnumValues = 6
*/
EnumValues: string;
/**
* @generated from protobuf field: repeated api.CHQueryExpression Expressions = 12
*/
Expressions: CHQueryExpression[];
/**
* @generated from protobuf field: bool IsComputed = 13
*/
IsComputed: boolean;
}
/**
* @generated from protobuf message api.CHFilter
*/
export interface CHFilter {
/**
* @generated from protobuf field: repeated api.CHDimension Dimensions = 1
*/
Dimensions: CHDimension[];
}
//
// GetKpiData Api messages
/**
* @generated from protobuf message api.KpiDataSerie
*/
export interface KpiDataSerie {
/**
* @generated from protobuf field: string Name = 1
*/
Name: string;
/**
* @generated from protobuf field: repeated string Values = 2
*/
Values: string[];
}
/**
* @generated from protobuf message api.GetKPIDataQuery
*/
export interface GetKPIDataQuery {
/**
* @generated from protobuf field: api.QueryProjectHeader Header = 1
*/
Header?: QueryProjectHeader;
/**
* @generated from protobuf field: api.CHChartType ChartType = 2
*/
ChartType: CHChartType;
/**
* @generated from protobuf field: api.CHQueryType QueryType = 3
*/
QueryType: CHQueryType;
/**
* @generated from protobuf field: string QueryBlock = 4
*/
QueryBlock: string;
/**
* @generated from protobuf field: repeated api.CHDimension Dimensions = 5
*/
Dimensions: CHDimension[];
/**
* @generated from protobuf field: repeated api.CHMetric Metrics = 6
*/
Metrics: CHMetric[];
/**
* @generated from protobuf field: api.CHFilter Filter = 7
*/
Filter?: CHFilter;
/**
* @generated from protobuf field: string TargetTimeZone = 8
*/
TargetTimeZone: string;
/**
* @generated from protobuf field: api.KpiDataResultFormat ResultFormat = 9
*/
ResultFormat: KpiDataResultFormat;
/**
* @generated from protobuf field: string KpiGroupName = 10
*/
KpiGroupName: string;
}
/**
* @generated from protobuf message api.GetKPIDataSiteQuery
*/
export interface GetKPIDataSiteQuery {
/**
* @generated from protobuf field: api.QuerySiteHeader Header = 1
*/
Header?: QuerySiteHeader;
/**
* @generated from protobuf field: api.CHChartType ChartType = 2
*/
ChartType: CHChartType;
/**
* @generated from protobuf field: api.CHQueryType QueryType = 3
*/
QueryType: CHQueryType;
/**
* @generated from protobuf field: string QueryBlock = 4
*/
QueryBlock: string;
/**
* @generated from protobuf field: repeated api.CHDimension Dimensions = 5
*/
Dimensions: CHDimension[];
/**
* @generated from protobuf field: repeated api.CHMetric Metrics = 6
*/
Metrics: CHMetric[];
/**
* @generated from protobuf field: api.CHFilter Filter = 7
*/
Filter?: CHFilter;
/**
* @generated from protobuf field: string TargetTimeZone = 8
*/
TargetTimeZone: string;
/**
* @generated from protobuf field: api.KpiDataResultFormat ResultFormat = 9
*/
ResultFormat: KpiDataResultFormat;
/**
* @generated from protobuf field: string KpiGroupName = 10
*/
KpiGroupName: string;
}
/**
* @generated from protobuf message api.GetKPIDataForUserQuery
*/
export interface GetKPIDataForUserQuery {
/**
* @generated from protobuf field: string ProjectID = 1
*/
ProjectID: string;
/**
* @generated from protobuf field: api.CHChartType ChartType = 2
*/
ChartType: CHChartType;
/**
* @generated from protobuf field: api.CHQueryType QueryType = 3
*/
QueryType: CHQueryType;
/**
* @generated from protobuf field: string QueryBlock = 4
*/
QueryBlock: string;
/**
* @generated from protobuf field: repeated api.CHDimension Dimensions = 5
*/
Dimensions: CHDimension[];
/**
* @generated from protobuf field: repeated api.CHMetric Metrics = 6
*/
Metrics: CHMetric[];
/**
* @generated from protobuf field: api.CHFilter Filter = 7
*/
Filter?: CHFilter;
/**
* @generated from protobuf field: string TargetTimeZone = 8
*/
TargetTimeZone: string;
/**
* @generated from protobuf field: api.KpiDataResultFormat ResultFormat = 9
*/
ResultFormat: KpiDataResultFormat;
/**
* @generated from protobuf field: string KpiGroupName = 10
*/
KpiGroupName: string;
/**
* @generated from protobuf field: string UserID = 11
*/
UserID: string;
/**
* Number of elements displayed
*
* @generated from protobuf field: string PagingState = 12
*/
PagingState: string;
/**
* Number of additional elements to display
*
* @generated from protobuf field: string Limit = 13
*/
Limit: string;
}
/**
* @generated from protobuf message api.GetKPIDataResult
*/
export interface GetKPIDataResult {
/**
* @generated from protobuf field: string Results = 1
*/
Results: string;
/**
* @generated from protobuf field: repeated api.KpiDataSerie Series = 2
*/
Series: KpiDataSerie[];
}
/**
* @generated from protobuf message api.EntityBlockFilter
*/
export interface EntityBlockFilter {
/**
* @generated from protobuf field: string EntityName = 1
*/
EntityName: string;
/**
* @generated from protobuf field: repeated api.BlockFilter BlockFilters = 2
*/
BlockFilters: BlockFilter[];
}
/**
* @generated from protobuf message api.FindKPIDataQuery
*/
export interface FindKPIDataQuery {
/**
* @generated from protobuf field: api.QueryProjectHeader Header = 1
*/
Header?: QueryProjectHeader;
/**
* TODO really useful ??
*
* @generated from protobuf field: api.CHQueryType QueryType = 2
*/
QueryType: CHQueryType;
/**
* TODO Really useful ??
*
* @generated from protobuf field: string QueryBlock = 3
*/
QueryBlock: string;
/**
* list of blockFilters structure for Find query, each element (BlockFilter) in the list is an "OR" part of the query
*
* @generated from protobuf field: repeated api.EntityBlockFilter EntityBlockFilters = 4
*/
EntityBlockFilters: EntityBlockFilter[];
/**
* @generated from protobuf field: api.CHFilter Filter = 5
*/
Filter?: CHFilter;
/**
* @generated from protobuf field: repeated api.CHDimension Dimensions = 6
*/
Dimensions: CHDimension[];
/**
* @generated from protobuf field: repeated api.CHMetric Metrics = 7
*/
Metrics: CHMetric[];
/**
* @generated from protobuf field: string TargetTimeZone = 8
*/
TargetTimeZone: string;
/**
* @generated from protobuf field: string KpiGroupName = 9
*/
KpiGroupName: string;
}
/**
* @generated from protobuf message api.FindKPIDataResult
*/
export interface FindKPIDataResult {
/**
* @generated from protobuf field: repeated api.KpiDataSerie Series = 1
*/
Series: KpiDataSerie[];
}
/**
* @generated from protobuf message api.ExtractKPIQuery
*/
export interface ExtractKPIQuery {
/**
* @generated from protobuf field: api.QueryProjectHeader Header = 1
*/
Header?: QueryProjectHeader;
/**
* @generated from protobuf field: string UserId = 2
*/
UserId: string;
/**
* @generated from protobuf field: api.CHQueryType QueryType = 3
*/
QueryType: CHQueryType;
/**
* @generated from protobuf field: string QueryBlock = 4
*/
QueryBlock: string;
/**
* @generated from protobuf field: repeated api.EntityBlockFilter EntityBlockFilters = 5
*/
EntityBlockFilters: EntityBlockFilter[];
/**
* @generated from protobuf field: api.CHFilter Filter = 6
*/
Filter?: CHFilter;
/**
* @generated from protobuf field: repeated api.CHDimension Dimensions = 7
*/
Dimensions: CHDimension[];
/**
* @generated from protobuf field: repeated api.CHMetric Metrics = 8
*/
Metrics: CHMetric[];
/**
* @generated from protobuf field: string TargetTimeZone = 9
*/
TargetTimeZone: string;
/**
* @generated from protobuf field: string KpiGroupName = 10
*/
KpiGroupName: string;
/**
* @generated from protobuf field: string TargetDomain = 11
*/
TargetDomain: string;
/**
* @generated from protobuf field: string TargetType = 12
*/
TargetType: string;
/**
* @generated from protobuf field: repeated string Fields = 13
*/
Fields: string[];
/**
* @generated from protobuf field: string ListSeparator = 14
*/
ListSeparator: string;
/**
* @generated from protobuf field: string DecimalSeparator = 15
*/
DecimalSeparator: string;
/**
* @generated from protobuf field: repeated string ColumnNames = 16
*/
ColumnNames: string[];
/**
* @generated from protobuf field: map<string, api.TranslationMap> ColumnTranslationMaps = 17
*/
ColumnTranslationMaps: {
[key: string]: TranslationMap;
};
/**
* @generated from protobuf field: repeated int32 FieldIdxLVDetailedQuantity = 18
*/
FieldIdxLVDetailedQuantity: number[];
/**
* @generated from protobuf field: map<int32, api.ExtractColumnFormat> ColumnFormats = 19
*/
ColumnFormats: {
[key: number]: ExtractColumnFormat;
};
/**
* @generated from protobuf field: string DateFormat = 20
*/
DateFormat: string;
/**
* @generated from protobuf field: string NumberFormat = 21
*/
NumberFormat: string;
/**
* @generated from protobuf field: api.TimeFormat TimeFormat = 22
*/
TimeFormat: TimeFormat;
}
/**
* @generated from protobuf message api.ExtractKPIResult
*/
export interface ExtractKPIResult {
/**
* @generated from protobuf field: api.WorkflowExecutionResult WorkflowExecution = 1
*/
WorkflowExecution?: WorkflowExecutionResult;
}
/**
* @generated from protobuf enum api.CHChartType
*/
export enum CHChartType {
/**
* @generated from protobuf enum value: CH_CHART_TYPE_UNKNOWN = 0;
*/
CH_CHART_TYPE_UNKNOWN = 0,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_LINE_CHART = 1;
*/
CH_CHART_TYPE_LINE_CHART = 1,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_MULTI_LINE_CHART = 2;
*/
CH_CHART_TYPE_MULTI_LINE_CHART = 2,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_VERTICAL_BAR_CHART = 3;
*/
CH_CHART_TYPE_VERTICAL_BAR_CHART = 3,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_HORIZONTAL_BAR_CHART = 4;
*/
CH_CHART_TYPE_HORIZONTAL_BAR_CHART = 4,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_STACKED_BAR_CHART = 5;
*/
CH_CHART_TYPE_STACKED_BAR_CHART = 5,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_PIE_CHART = 6;
*/
CH_CHART_TYPE_PIE_CHART = 6,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_DOUGHNUT_CHART = 7;
*/
CH_CHART_TYPE_DOUGHNUT_CHART = 7,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_METRIC = 8;
*/
CH_CHART_TYPE_METRIC = 8,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_TABLE = 9;
*/
CH_CHART_TYPE_TABLE = 9,
/**
* @generated from protobuf enum value: CH_CHART_TYPE_PIVOT_TABLE = 10;
*/
CH_CHART_TYPE_PIVOT_TABLE = 10
}
/**
* @generated from protobuf enum api.CHQueryType
*/
export enum CHQueryType {
/**
* @generated from protobuf enum value: CH_QUERY_TYPE_UNKNOWN = 0;
*/
CH_QUERY_TYPE_UNKNOWN = 0,
/**
* @generated from protobuf enum value: CH_QUERY_TYPE_A = 1;
*/
CH_QUERY_TYPE_A = 1,
/**
* @generated from protobuf enum value: CH_QUERY_TYPE_B = 2;
*/
CH_QUERY_TYPE_B = 2,
/**
* @generated from protobuf enum value: CH_QUERY_TYPE_C = 3;
*/
CH_QUERY_TYPE_C = 3
}
/**
* @generated from protobuf enum api.KpiDataResultFormat
*/
export enum KpiDataResultFormat {
/**
* @generated from protobuf enum value: KPIDATA_RESULT_FORMAT_RAW = 0;
*/
KPIDATA_RESULT_FORMAT_RAW = 0,
/**
* @generated from protobuf enum value: KPIDATA_RESULT_FORMAT_SERIES = 1;
*/
KPIDATA_RESULT_FORMAT_SERIES = 1
}
// @generated message type with reflection information, may provide speed optimized methods
class CHDimension$Type extends MessageType<CHDimension> {
constructor() {
super("api.CHDimension", [
{ no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Granularity", kind: "scalar", localName: "Granularity", jsonName: "Granularity", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "Level", kind: "scalar", localName: "Level", jsonName: "Level", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 4, name: "DataType", kind: "scalar", localName: "DataType", jsonName: "DataType", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"date\"" } } },
{ no: 5, name: "ContentType", kind: "scalar", localName: "ContentType", jsonName: "ContentType", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"DateTime\"" } } },
{ no: 6, name: "EnumValues", kind: "scalar", localName: "EnumValues", jsonName: "EnumValues", T: 9 /*ScalarType.STRING*/ },
{ no: 7, name: "Period", kind: "scalar", localName: "Period", jsonName: "Period", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "A period of time" } } },
{ no: 8, name: "Operator", kind: "scalar", localName: "Operator", jsonName: "Operator", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Allowed values : \"\", \"EQUAL\", \"DIFF\", \"START_BY\", \"NOT_START_BY\", \"FINISH_BY\", \"NOT_FINISH_BY\", \"CONTAINS\", \"NOT_CONTAINS\", \"IN_LIST\", \"NOT_IN_LIST\"" } } },
{ no: 9, name: "Values", kind: "scalar", localName: "Values", jsonName: "Values", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
{ no: 10, name: "StartDate", kind: "message", localName: "StartDate", jsonName: "StartDate", T: () => StringDateObject },
{ no: 11, name: "EndDate", kind: "message", localName: "EndDate", jsonName: "EndDate", T: () => StringDateObject },
{ no: 12, name: "Expressions", kind: "message", localName: "Expressions", jsonName: "Expressions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHQueryExpression },
{ no: 13, name: "IsComputed", kind: "scalar", localName: "IsComputed", jsonName: "IsComputed", T: 8 /*ScalarType.BOOL*/ },
{ no: 14, name: "Or", kind: "message", localName: "Or", jsonName: "Or", T: () => CHDimension }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Name", "Level", "DataType", "ContentType"] } } });
}
create(value?: PartialMessage<CHDimension>): CHDimension {
const message = globalThis.Object.create((this.messagePrototype!));
message.Name = "";
message.Granularity = "";
message.Level = "";
message.DataType = "";
message.ContentType = "";
message.EnumValues = "";
message.Period = "";
message.Operator = "";
message.Values = [];
message.Expressions = [];
message.IsComputed = false;
if (value !== undefined)
reflectionMergePartial<CHDimension>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CHDimension): CHDimension {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Name */ 1:
message.Name = reader.string();
break;
case /* string Granularity */ 2:
message.Granularity = reader.string();
break;
case /* string Level */ 3:
message.Level = reader.string();
break;
case /* string DataType */ 4:
message.DataType = reader.string();
break;
case /* string ContentType */ 5:
message.ContentType = reader.string();
break;
case /* string EnumValues */ 6:
message.EnumValues = reader.string();
break;
case /* string Period */ 7:
message.Period = reader.string();
break;
case /* string Operator */ 8:
message.Operator = reader.string();
break;
case /* repeated string Values */ 9:
message.Values.push(reader.string());
break;
case /* api.StringDateObject StartDate */ 10:
message.StartDate = StringDateObject.internalBinaryRead(reader, reader.uint32(), options, message.StartDate);
break;
case /* api.StringDateObject EndDate */ 11:
message.EndDate = StringDateObject.internalBinaryRead(reader, reader.uint32(), options, message.EndDate);
break;
case /* repeated api.CHQueryExpression Expressions */ 12:
message.Expressions.push(CHQueryExpression.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* bool IsComputed */ 13:
message.IsComputed = reader.bool();
break;
case /* api.CHDimension Or */ 14:
message.Or = CHDimension.internalBinaryRead(reader, reader.uint32(), options, message.Or);
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: CHDimension, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Name = 1; */
if (message.Name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.Name);
/* string Granularity = 2; */
if (message.Granularity !== "")
writer.tag(2, WireType.LengthDelimited).string(message.Granularity);
/* string Level = 3; */
if (message.Level !== "")
writer.tag(3, WireType.LengthDelimited).string(message.Level);
/* string DataType = 4; */
if (message.DataType !== "")
writer.tag(4, WireType.LengthDelimited).string(message.DataType);
/* string ContentType = 5; */
if (message.ContentType !== "")
writer.tag(5, WireType.LengthDelimited).string(message.ContentType);
/* string EnumValues = 6; */
if (message.EnumValues !== "")
writer.tag(6, WireType.LengthDelimited).string(message.EnumValues);
/* string Period = 7; */
if (message.Period !== "")
writer.tag(7, WireType.LengthDelimited).string(message.Period);
/* string Operator = 8; */
if (message.Operator !== "")
writer.tag(8, WireType.LengthDelimited).string(message.Operator);
/* repeated string Values = 9; */
for (let i = 0; i < message.Values.length; i++)
writer.tag(9, WireType.LengthDelimited).string(message.Values[i]);
/* api.StringDateObject StartDate = 10; */
if (message.StartDate)
StringDateObject.internalBinaryWrite(message.StartDate, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
/* api.StringDateObject EndDate = 11; */
if (message.EndDate)
StringDateObject.internalBinaryWrite(message.EndDate, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
/* repeated api.CHQueryExpression Expressions = 12; */
for (let i = 0; i < message.Expressions.length; i++)
CHQueryExpression.internalBinaryWrite(message.Expressions[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join();
/* bool IsComputed = 13; */
if (message.IsComputed !== false)
writer.tag(13, WireType.Varint).bool(message.IsComputed);
/* api.CHDimension Or = 14; */
if (message.Or)
CHDimension.internalBinaryWrite(message.Or, writer.tag(14, 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.CHDimension
*/
export const CHDimension = new CHDimension$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CHQueryExpression$Type extends MessageType<CHQueryExpression> {
constructor() {
super("api.CHQueryExpression", [
{ no: 1, name: "Block", kind: "scalar", localName: "Block", jsonName: "Block", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "QueryType", kind: "enum", localName: "QueryType", jsonName: "QueryType", T: () => ["api.CHQueryType", CHQueryType] },
{ no: 3, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "Query", kind: "scalar", localName: "Query", jsonName: "Query", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<CHQueryExpression>): CHQueryExpression {
const message = globalThis.Object.create((this.messagePrototype!));
message.Block = "";
message.QueryType = 0;
message.Field = "";
message.Query = "";
if (value !== undefined)
reflectionMergePartial<CHQueryExpression>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CHQueryExpression): CHQueryExpression {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Block */ 1:
message.Block = reader.string();
break;
case /* api.CHQueryType QueryType */ 2:
message.QueryType = reader.int32();
break;
case /* string Field */ 3:
message.Field = reader.string();
break;
case /* string Query */ 4:
message.Query = 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: CHQueryExpression, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Block = 1; */
if (message.Block !== "")
writer.tag(1, WireType.LengthDelimited).string(message.Block);
/* api.CHQueryType QueryType = 2; */
if (message.QueryType !== 0)
writer.tag(2, WireType.Varint).int32(message.QueryType);
/* string Field = 3; */
if (message.Field !== "")
writer.tag(3, WireType.LengthDelimited).string(message.Field);
/* string Query = 4; */
if (message.Query !== "")
writer.tag(4, WireType.LengthDelimited).string(message.Query);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.CHQueryExpression
*/
export const CHQueryExpression = new CHQueryExpression$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CHMetric$Type extends MessageType<CHMetric> {
constructor() {
super("api.CHMetric", [
{ no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 3, name: "Level", kind: "scalar", localName: "Level", jsonName: "Level", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 4, name: "DataType", kind: "scalar", localName: "DataType", jsonName: "DataType", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"count\"" } } },
{ no: 5, name: "ContentType", kind: "scalar", localName: "ContentType", jsonName: "ContentType", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"int\"" } } },
{ no: 6, name: "EnumValues", kind: "scalar", localName: "EnumValues", jsonName: "EnumValues", T: 9 /*ScalarType.STRING*/ },
{ no: 12, name: "Expressions", kind: "message", localName: "Expressions", jsonName: "Expressions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHQueryExpression },
{ no: 13, name: "IsComputed", kind: "scalar", localName: "IsComputed", jsonName: "IsComputed", T: 8 /*ScalarType.BOOL*/ }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Name", "Level", "DataType", "ContentType"] } } });
}
create(value?: PartialMessage<CHMetric>): CHMetric {
const message = globalThis.Object.create((this.messagePrototype!));
message.Name = "";
message.Level = "";
message.DataType = "";
message.ContentType = "";
message.EnumValues = "";
message.Expressions = [];
message.IsComputed = false;
if (value !== undefined)
reflectionMergePartial<CHMetric>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CHMetric): CHMetric {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Name */ 1:
message.Name = reader.string();
break;
case /* string Level */ 3:
message.Level = reader.string();
break;
case /* string DataType */ 4:
message.DataType = reader.string();
break;
case /* string ContentType */ 5:
message.ContentType = reader.string();
break;
case /* string EnumValues */ 6:
message.EnumValues = reader.string();
break;
case /* repeated api.CHQueryExpression Expressions */ 12:
message.Expressions.push(CHQueryExpression.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* bool IsComputed */ 13:
message.IsComputed = reader.bool();
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: CHMetric, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Name = 1; */
if (message.Name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.Name);
/* string Level = 3; */
if (message.Level !== "")
writer.tag(3, WireType.LengthDelimited).string(message.Level);
/* string DataType = 4; */
if (message.DataType !== "")
writer.tag(4, WireType.LengthDelimited).string(message.DataType);
/* string ContentType = 5; */
if (message.ContentType !== "")
writer.tag(5, WireType.LengthDelimited).string(message.ContentType);
/* string EnumValues = 6; */
if (message.EnumValues !== "")
writer.tag(6, WireType.LengthDelimited).string(message.EnumValues);
/* repeated api.CHQueryExpression Expressions = 12; */
for (let i = 0; i < message.Expressions.length; i++)
CHQueryExpression.internalBinaryWrite(message.Expressions[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join();
/* bool IsComputed = 13; */
if (message.IsComputed !== false)
writer.tag(13, WireType.Varint).bool(message.IsComputed);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.CHMetric
*/
export const CHMetric = new CHMetric$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CHFilter$Type extends MessageType<CHFilter> {
constructor() {
super("api.CHFilter", [
{ no: 1, name: "Dimensions", kind: "message", localName: "Dimensions", jsonName: "Dimensions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHDimension }
]);
}
create(value?: PartialMessage<CHFilter>): CHFilter {
const message = globalThis.Object.create((this.messagePrototype!));
message.Dimensions = [];
if (value !== undefined)
reflectionMergePartial<CHFilter>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CHFilter): CHFilter {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated api.CHDimension Dimensions */ 1:
message.Dimensions.push(CHDimension.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: CHFilter, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated api.CHDimension Dimensions = 1; */
for (let i = 0; i < message.Dimensions.length; i++)
CHDimension.internalBinaryWrite(message.Dimensions[i], writer.tag(1, 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.CHFilter
*/
export const CHFilter = new CHFilter$Type();
// @generated message type with reflection information, may provide speed optimized methods
class KpiDataSerie$Type extends MessageType<KpiDataSerie> {
constructor() {
super("api.KpiDataSerie", [
{ no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "Values", kind: "scalar", localName: "Values", jsonName: "Values", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<KpiDataSerie>): KpiDataSerie {
const message = globalThis.Object.create((this.messagePrototype!));
message.Name = "";
message.Values = [];
if (value !== undefined)
reflectionMergePartial<KpiDataSerie>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: KpiDataSerie): KpiDataSerie {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Name */ 1:
message.Name = reader.string();
break;
case /* repeated string Values */ 2:
message.Values.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: KpiDataSerie, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Name = 1; */
if (message.Name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.Name);
/* repeated string Values = 2; */
for (let i = 0; i < message.Values.length; i++)
writer.tag(2, WireType.LengthDelimited).string(message.Values[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.KpiDataSerie
*/
export const KpiDataSerie = new KpiDataSerie$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKPIDataQuery$Type extends MessageType<GetKPIDataQuery> {
constructor() {
super("api.GetKPIDataQuery", [
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "ChartType", kind: "enum", localName: "ChartType", jsonName: "ChartType", T: () => ["api.CHChartType", CHChartType], options: { "validate.rules": { enum: { definedOnly: true } } } },
{ no: 3, name: "QueryType", kind: "enum", localName: "QueryType", jsonName: "QueryType", T: () => ["api.CHQueryType", CHQueryType], options: { "validate.rules": { enum: { definedOnly: true } } } },
{ no: 4, name: "QueryBlock", kind: "scalar", localName: "QueryBlock", jsonName: "QueryBlock", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 5, name: "Dimensions", kind: "message", localName: "Dimensions", jsonName: "Dimensions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHDimension },
{ no: 6, name: "Metrics", kind: "message", localName: "Metrics", jsonName: "Metrics", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHMetric },
{ no: 7, name: "Filter", kind: "message", localName: "Filter", jsonName: "Filter", T: () => CHFilter },
{ no: 8, name: "TargetTimeZone", kind: "scalar", localName: "TargetTimeZone", jsonName: "TargetTimeZone", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", tzData: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Target user time zone <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>format</a>", example: "\"Europe/Paris\"" } } },
{ no: 9, name: "ResultFormat", kind: "enum", localName: "ResultFormat", jsonName: "ResultFormat", T: () => ["api.KpiDataResultFormat", KpiDataResultFormat], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Result format selection", example: "\"KPIDATA_RESULT_FORMAT_SERIES\"" } } },
{ no: 10, name: "KpiGroupName", kind: "scalar", localName: "KpiGroupName", jsonName: "KpiGroupName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["executionflow", "stock", "movement", "handlingunit", "actor", "item", "stock_extended", "claim"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the analysis criterion to get the kpi data from", example: "\"executionflow\"" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ChartType", "QueryType", "QueryBlock", "Metrics", "KpiGroupName"] } } });
}
create(value?: PartialMessage<GetKPIDataQuery>): GetKPIDataQuery {
const message = globalThis.Object.create((this.messagePrototype!));
message.ChartType = 0;
message.QueryType = 0;
message.QueryBlock = "";
message.Dimensions = [];
message.Metrics = [];
message.TargetTimeZone = "";
message.ResultFormat = 0;
message.KpiGroupName = "";
if (value !== undefined)
reflectionMergePartial<GetKPIDataQuery>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKPIDataQuery): GetKPIDataQuery {
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 /* api.CHChartType ChartType */ 2:
message.ChartType = reader.int32();
break;
case /* api.CHQueryType QueryType */ 3:
message.QueryType = reader.int32();
break;
case /* string QueryBlock */ 4:
message.QueryBlock = reader.string();
break;
case /* repeated api.CHDimension Dimensions */ 5:
message.Dimensions.push(CHDimension.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated api.CHMetric Metrics */ 6:
message.Metrics.push(CHMetric.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.CHFilter Filter */ 7:
message.Filter = CHFilter.internalBinaryRead(reader, reader.uint32(), options, message.Filter);
break;
case /* string TargetTimeZone */ 8:
message.TargetTimeZone = reader.string();
break;
case /* api.KpiDataResultFormat ResultFormat */ 9:
message.ResultFormat = reader.int32();
break;
case /* string KpiGroupName */ 10:
message.KpiGroupName = 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: GetKPIDataQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.QueryProjectHeader Header = 1; */
if (message.Header)
QueryProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.CHChartType ChartType = 2; */
if (message.ChartType !== 0)
writer.tag(2, WireType.Varint).int32(message.ChartType);
/* api.CHQueryType QueryType = 3; */
if (message.QueryType !== 0)
writer.tag(3, WireType.Varint).int32(message.QueryType);
/* string QueryBlock = 4; */
if (message.QueryBlock !== "")
writer.tag(4, WireType.LengthDelimited).string(message.QueryBlock);
/* repeated api.CHDimension Dimensions = 5; */
for (let i = 0; i < message.Dimensions.length; i++)
CHDimension.internalBinaryWrite(message.Dimensions[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* repeated api.CHMetric Metrics = 6; */
for (let i = 0; i < message.Metrics.length; i++)
CHMetric.internalBinaryWrite(message.Metrics[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* api.CHFilter Filter = 7; */
if (message.Filter)
CHFilter.internalBinaryWrite(message.Filter, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
/* string TargetTimeZone = 8; */
if (message.TargetTimeZone !== "")
writer.tag(8, WireType.LengthDelimited).string(message.TargetTimeZone);
/* api.KpiDataResultFormat ResultFormat = 9; */
if (message.ResultFormat !== 0)
writer.tag(9, WireType.Varint).int32(message.ResultFormat);
/* string KpiGroupName = 10; */
if (message.KpiGroupName !== "")
writer.tag(10, WireType.LengthDelimited).string(message.KpiGroupName);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.GetKPIDataQuery
*/
export const GetKPIDataQuery = new GetKPIDataQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKPIDataSiteQuery$Type extends MessageType<GetKPIDataSiteQuery> {
constructor() {
super("api.GetKPIDataSiteQuery", [
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => QuerySiteHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "ChartType", kind: "enum", localName: "ChartType", jsonName: "ChartType", T: () => ["api.CHChartType", CHChartType], options: { "validate.rules": { enum: { definedOnly: true } } } },
{ no: 3, name: "QueryType", kind: "enum", localName: "QueryType", jsonName: "QueryType", T: () => ["api.CHQueryType", CHQueryType], options: { "validate.rules": { enum: { definedOnly: true } } } },
{ no: 4, name: "QueryBlock", kind: "scalar", localName: "QueryBlock", jsonName: "QueryBlock", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 5, name: "Dimensions", kind: "message", localName: "Dimensions", jsonName: "Dimensions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHDimension },
{ no: 6, name: "Metrics", kind: "message", localName: "Metrics", jsonName: "Metrics", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHMetric },
{ no: 7, name: "Filter", kind: "message", localName: "Filter", jsonName: "Filter", T: () => CHFilter },
{ no: 8, name: "TargetTimeZone", kind: "scalar", localName: "TargetTimeZone", jsonName: "TargetTimeZone", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", tzData: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Target user time zone <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>format</a>", example: "\"Europe/Paris\"" } } },
{ no: 9, name: "ResultFormat", kind: "enum", localName: "ResultFormat", jsonName: "ResultFormat", T: () => ["api.KpiDataResultFormat", KpiDataResultFormat], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Result format selection", example: "\"KPIDATA_RESULT_FORMAT_SERIES\"" } } },
{ no: 10, name: "KpiGroupName", kind: "scalar", localName: "KpiGroupName", jsonName: "KpiGroupName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["executionflow", "stock", "movement", "handlingunit", "actor", "item", "stock_extended", "claim"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the analysis criterion to get the kpi data from", example: "\"executionflow\"" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ChartType", "QueryType", "QueryBlock", "Metrics", "KpiGroupName"] } } });
}
create(value?: PartialMessage<GetKPIDataSiteQuery>): GetKPIDataSiteQuery {
const message = globalThis.Object.create((this.messagePrototype!));
message.ChartType = 0;
message.QueryType = 0;
message.QueryBlock = "";
message.Dimensions = [];
message.Metrics = [];
message.TargetTimeZone = "";
message.ResultFormat = 0;
message.KpiGroupName = "";
if (value !== undefined)
reflectionMergePartial<GetKPIDataSiteQuery>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKPIDataSiteQuery): GetKPIDataSiteQuery {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.QuerySiteHeader Header */ 1:
message.Header = QuerySiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
break;
case /* api.CHChartType ChartType */ 2:
message.ChartType = reader.int32();
break;
case /* api.CHQueryType QueryType */ 3:
message.QueryType = reader.int32();
break;
case /* string QueryBlock */ 4:
message.QueryBlock = reader.string();
break;
case /* repeated api.CHDimension Dimensions */ 5:
message.Dimensions.push(CHDimension.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated api.CHMetric Metrics */ 6:
message.Metrics.push(CHMetric.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.CHFilter Filter */ 7:
message.Filter = CHFilter.internalBinaryRead(reader, reader.uint32(), options, message.Filter);
break;
case /* string TargetTimeZone */ 8:
message.TargetTimeZone = reader.string();
break;
case /* api.KpiDataResultFormat ResultFormat */ 9:
message.ResultFormat = reader.int32();
break;
case /* string KpiGroupName */ 10:
message.KpiGroupName = 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: GetKPIDataSiteQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.QuerySiteHeader Header = 1; */
if (message.Header)
QuerySiteHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.CHChartType ChartType = 2; */
if (message.ChartType !== 0)
writer.tag(2, WireType.Varint).int32(message.ChartType);
/* api.CHQueryType QueryType = 3; */
if (message.QueryType !== 0)
writer.tag(3, WireType.Varint).int32(message.QueryType);
/* string QueryBlock = 4; */
if (message.QueryBlock !== "")
writer.tag(4, WireType.LengthDelimited).string(message.QueryBlock);
/* repeated api.CHDimension Dimensions = 5; */
for (let i = 0; i < message.Dimensions.length; i++)
CHDimension.internalBinaryWrite(message.Dimensions[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* repeated api.CHMetric Metrics = 6; */
for (let i = 0; i < message.Metrics.length; i++)
CHMetric.internalBinaryWrite(message.Metrics[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* api.CHFilter Filter = 7; */
if (message.Filter)
CHFilter.internalBinaryWrite(message.Filter, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
/* string TargetTimeZone = 8; */
if (message.TargetTimeZone !== "")
writer.tag(8, WireType.LengthDelimited).string(message.TargetTimeZone);
/* api.KpiDataResultFormat ResultFormat = 9; */
if (message.ResultFormat !== 0)
writer.tag(9, WireType.Varint).int32(message.ResultFormat);
/* string KpiGroupName = 10; */
if (message.KpiGroupName !== "")
writer.tag(10, WireType.LengthDelimited).string(message.KpiGroupName);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.GetKPIDataSiteQuery
*/
export const GetKPIDataSiteQuery = new GetKPIDataSiteQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKPIDataForUserQuery$Type extends MessageType<GetKPIDataForUserQuery> {
constructor() {
super("api.GetKPIDataForUserQuery", [
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "ChartType", kind: "enum", localName: "ChartType", jsonName: "ChartType", T: () => ["api.CHChartType", CHChartType], options: { "validate.rules": { enum: { definedOnly: true } } } },
{ no: 3, name: "QueryType", kind: "enum", localName: "QueryType", jsonName: "QueryType", T: () => ["api.CHQueryType", CHQueryType], options: { "validate.rules": { enum: { definedOnly: true } } } },
{ no: 4, name: "QueryBlock", kind: "scalar", localName: "QueryBlock", jsonName: "QueryBlock", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 5, name: "Dimensions", kind: "message", localName: "Dimensions", jsonName: "Dimensions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHDimension },
{ no: 6, name: "Metrics", kind: "message", localName: "Metrics", jsonName: "Metrics", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHMetric },
{ no: 7, name: "Filter", kind: "message", localName: "Filter", jsonName: "Filter", T: () => CHFilter },
{ no: 8, name: "TargetTimeZone", kind: "scalar", localName: "TargetTimeZone", jsonName: "TargetTimeZone", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", tzData: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Target user time zone <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>format</a>", example: "\"Europe/Paris\"" } } },
{ no: 9, name: "ResultFormat", kind: "enum", localName: "ResultFormat", jsonName: "ResultFormat", T: () => ["api.KpiDataResultFormat", KpiDataResultFormat], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Result format selection", example: "\"KPIDATA_RESULT_FORMAT_SERIES\"" } } },
{ no: 10, name: "KpiGroupName", kind: "scalar", localName: "KpiGroupName", jsonName: "KpiGroupName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["executionflow", "stock", "movement", "handlingunit", "actor", "item", "stock_extended", "claim"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the analysis criterion to get the kpi data from", example: "\"executionflow\"" } } },
{ no: 11, name: "UserID", kind: "scalar", localName: "UserID", jsonName: "UserID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 12, name: "PagingState", kind: "scalar", localName: "PagingState", jsonName: "PagingState", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Start position of the query result page. Pagination disabled if equal to -1.", example: "\"50\"" } } },
{ no: 13, name: "Limit", kind: "scalar", localName: "Limit", jsonName: "Limit", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Length of the query result page", example: "\"50\"" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID", "ChartType", "QueryType", "QueryBlock", "Metrics", "KpiGroupName", "UserID"] } } });
}
create(value?: PartialMessage<GetKPIDataForUserQuery>): GetKPIDataForUserQuery {
const message = globalThis.Object.create((this.messagePrototype!));
message.ProjectID = "";
message.ChartType = 0;
message.QueryType = 0;
message.QueryBlock = "";
message.Dimensions = [];
message.Metrics = [];
message.TargetTimeZone = "";
message.ResultFormat = 0;
message.KpiGroupName = "";
message.UserID = "";
message.PagingState = "";
message.Limit = "";
if (value !== undefined)
reflectionMergePartial<GetKPIDataForUserQuery>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKPIDataForUserQuery): GetKPIDataForUserQuery {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID */ 1:
message.ProjectID = reader.string();
break;
case /* api.CHChartType ChartType */ 2:
message.ChartType = reader.int32();
break;
case /* api.CHQueryType QueryType */ 3:
message.QueryType = reader.int32();
break;
case /* string QueryBlock */ 4:
message.QueryBlock = reader.string();
break;
case /* repeated api.CHDimension Dimensions */ 5:
message.Dimensions.push(CHDimension.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated api.CHMetric Metrics */ 6:
message.Metrics.push(CHMetric.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.CHFilter Filter */ 7:
message.Filter = CHFilter.internalBinaryRead(reader, reader.uint32(), options, message.Filter);
break;
case /* string TargetTimeZone */ 8:
message.TargetTimeZone = reader.string();
break;
case /* api.KpiDataResultFormat ResultFormat */ 9:
message.ResultFormat = reader.int32();
break;
case /* string KpiGroupName */ 10:
message.KpiGroupName = reader.string();
break;
case /* string UserID */ 11:
message.UserID = reader.string();
break;
case /* string PagingState */ 12:
message.PagingState = reader.string();
break;
case /* string Limit */ 13:
message.Limit = 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: GetKPIDataForUserQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1; */
if (message.ProjectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
/* api.CHChartType ChartType = 2; */
if (message.ChartType !== 0)
writer.tag(2, WireType.Varint).int32(message.ChartType);
/* api.CHQueryType QueryType = 3; */
if (message.QueryType !== 0)
writer.tag(3, WireType.Varint).int32(message.QueryType);
/* string QueryBlock = 4; */
if (message.QueryBlock !== "")
writer.tag(4, WireType.LengthDelimited).string(message.QueryBlock);
/* repeated api.CHDimension Dimensions = 5; */
for (let i = 0; i < message.Dimensions.length; i++)
CHDimension.internalBinaryWrite(message.Dimensions[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* repeated api.CHMetric Metrics = 6; */
for (let i = 0; i < message.Metrics.length; i++)
CHMetric.internalBinaryWrite(message.Metrics[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* api.CHFilter Filter = 7; */
if (message.Filter)
CHFilter.internalBinaryWrite(message.Filter, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
/* string TargetTimeZone = 8; */
if (message.TargetTimeZone !== "")
writer.tag(8, WireType.LengthDelimited).string(message.TargetTimeZone);
/* api.KpiDataResultFormat ResultFormat = 9; */
if (message.ResultFormat !== 0)
writer.tag(9, WireType.Varint).int32(message.ResultFormat);
/* string KpiGroupName = 10; */
if (message.KpiGroupName !== "")
writer.tag(10, WireType.LengthDelimited).string(message.KpiGroupName);
/* string UserID = 11; */
if (message.UserID !== "")
writer.tag(11, WireType.LengthDelimited).string(message.UserID);
/* string PagingState = 12; */
if (message.PagingState !== "")
writer.tag(12, WireType.LengthDelimited).string(message.PagingState);
/* string Limit = 13; */
if (message.Limit !== "")
writer.tag(13, WireType.LengthDelimited).string(message.Limit);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.GetKPIDataForUserQuery
*/
export const GetKPIDataForUserQuery = new GetKPIDataForUserQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKPIDataResult$Type extends MessageType<GetKPIDataResult> {
constructor() {
super("api.GetKPIDataResult", [
{ no: 1, name: "Results", kind: "scalar", localName: "Results", jsonName: "Results", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Raw result format" } } },
{ no: 2, name: "Series", kind: "message", localName: "Series", jsonName: "Series", repeat: 2 /*RepeatType.UNPACKED*/, T: () => KpiDataSerie, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Json series formatted result format", example: "{\"Series\": [{\"Name\": \"Name\", \"Values\": [\"A\", \"B\", \"C\"]}, {\"Name\": \"Quantity\", \"Values\": [\"12\", \"99\", \"74\"]}, {\"Name\": \"Volume\", \"Values\": [\"34\", \"23\", \"65\"]}]}" } } }
]);
}
create(value?: PartialMessage<GetKPIDataResult>): GetKPIDataResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.Results = "";
message.Series = [];
if (value !== undefined)
reflectionMergePartial<GetKPIDataResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKPIDataResult): GetKPIDataResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Results */ 1:
message.Results = reader.string();
break;
case /* repeated api.KpiDataSerie Series */ 2:
message.Series.push(KpiDataSerie.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: GetKPIDataResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Results = 1; */
if (message.Results !== "")
writer.tag(1, WireType.LengthDelimited).string(message.Results);
/* repeated api.KpiDataSerie Series = 2; */
for (let i = 0; i < message.Series.length; i++)
KpiDataSerie.internalBinaryWrite(message.Series[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.GetKPIDataResult
*/
export const GetKPIDataResult = new GetKPIDataResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class EntityBlockFilter$Type extends MessageType<EntityBlockFilter> {
constructor() {
super("api.EntityBlockFilter", [
{ no: 1, name: "EntityName", kind: "scalar", localName: "EntityName", jsonName: "EntityName", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "BlockFilters", kind: "message", localName: "BlockFilters", jsonName: "BlockFilters", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BlockFilter }
]);
}
create(value?: PartialMessage<EntityBlockFilter>): EntityBlockFilter {
const message = globalThis.Object.create((this.messagePrototype!));
message.EntityName = "";
message.BlockFilters = [];
if (value !== undefined)
reflectionMergePartial<EntityBlockFilter>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EntityBlockFilter): EntityBlockFilter {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string EntityName */ 1:
message.EntityName = reader.string();
break;
case /* repeated api.BlockFilter BlockFilters */ 2:
message.BlockFilters.push(BlockFilter.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: EntityBlockFilter, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string EntityName = 1; */
if (message.EntityName !== "")
writer.tag(1, WireType.LengthDelimited).string(message.EntityName);
/* repeated api.BlockFilter BlockFilters = 2; */
for (let i = 0; i < message.BlockFilters.length; i++)
BlockFilter.internalBinaryWrite(message.BlockFilters[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.EntityBlockFilter
*/
export const EntityBlockFilter = new EntityBlockFilter$Type();
// @generated message type with reflection information, may provide speed optimized methods
class FindKPIDataQuery$Type extends MessageType<FindKPIDataQuery> {
constructor() {
super("api.FindKPIDataQuery", [
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "QueryType", kind: "enum", localName: "QueryType", jsonName: "QueryType", T: () => ["api.CHQueryType", CHQueryType], options: { "validate.rules": { enum: { definedOnly: true } } } },
{ no: 3, name: "QueryBlock", kind: "scalar", localName: "QueryBlock", jsonName: "QueryBlock", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 4, name: "EntityBlockFilters", kind: "message", localName: "EntityBlockFilters", jsonName: "EntityBlockFilters", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EntityBlockFilter },
{ no: 5, name: "Filter", kind: "message", localName: "Filter", jsonName: "Filter", T: () => CHFilter },
{ no: 6, name: "Dimensions", kind: "message", localName: "Dimensions", jsonName: "Dimensions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHDimension },
{ no: 7, name: "Metrics", kind: "message", localName: "Metrics", jsonName: "Metrics", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHMetric },
{ no: 8, name: "TargetTimeZone", kind: "scalar", localName: "TargetTimeZone", jsonName: "TargetTimeZone", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", tzData: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Target user time zone <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>format</a>", example: "\"Europe/Paris\"" } } },
{ no: 9, name: "KpiGroupName", kind: "scalar", localName: "KpiGroupName", jsonName: "KpiGroupName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["executionflow", "stock", "movement", "handlingunit", "actor", "item", "stock_extended", "claim"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the analysis criterion to find the kpi data from", example: "\"stock_extended\"" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ChartType", "QueryType", "QueryBlock", "Metrics", "KpiGroupName"] } } });
}
create(value?: PartialMessage<FindKPIDataQuery>): FindKPIDataQuery {
const message = globalThis.Object.create((this.messagePrototype!));
message.QueryType = 0;
message.QueryBlock = "";
message.EntityBlockFilters = [];
message.Dimensions = [];
message.Metrics = [];
message.TargetTimeZone = "";
message.KpiGroupName = "";
if (value !== undefined)
reflectionMergePartial<FindKPIDataQuery>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FindKPIDataQuery): FindKPIDataQuery {
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 /* api.CHQueryType QueryType */ 2:
message.QueryType = reader.int32();
break;
case /* string QueryBlock */ 3:
message.QueryBlock = reader.string();
break;
case /* repeated api.EntityBlockFilter EntityBlockFilters */ 4:
message.EntityBlockFilters.push(EntityBlockFilter.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.CHFilter Filter */ 5:
message.Filter = CHFilter.internalBinaryRead(reader, reader.uint32(), options, message.Filter);
break;
case /* repeated api.CHDimension Dimensions */ 6:
message.Dimensions.push(CHDimension.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated api.CHMetric Metrics */ 7:
message.Metrics.push(CHMetric.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* string TargetTimeZone */ 8:
message.TargetTimeZone = reader.string();
break;
case /* string KpiGroupName */ 9:
message.KpiGroupName = 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: FindKPIDataQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.QueryProjectHeader Header = 1; */
if (message.Header)
QueryProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.CHQueryType QueryType = 2; */
if (message.QueryType !== 0)
writer.tag(2, WireType.Varint).int32(message.QueryType);
/* string QueryBlock = 3; */
if (message.QueryBlock !== "")
writer.tag(3, WireType.LengthDelimited).string(message.QueryBlock);
/* repeated api.EntityBlockFilter EntityBlockFilters = 4; */
for (let i = 0; i < message.EntityBlockFilters.length; i++)
EntityBlockFilter.internalBinaryWrite(message.EntityBlockFilters[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.CHFilter Filter = 5; */
if (message.Filter)
CHFilter.internalBinaryWrite(message.Filter, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* repeated api.CHDimension Dimensions = 6; */
for (let i = 0; i < message.Dimensions.length; i++)
CHDimension.internalBinaryWrite(message.Dimensions[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* repeated api.CHMetric Metrics = 7; */
for (let i = 0; i < message.Metrics.length; i++)
CHMetric.internalBinaryWrite(message.Metrics[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
/* string TargetTimeZone = 8; */
if (message.TargetTimeZone !== "")
writer.tag(8, WireType.LengthDelimited).string(message.TargetTimeZone);
/* string KpiGroupName = 9; */
if (message.KpiGroupName !== "")
writer.tag(9, WireType.LengthDelimited).string(message.KpiGroupName);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.FindKPIDataQuery
*/
export const FindKPIDataQuery = new FindKPIDataQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class FindKPIDataResult$Type extends MessageType<FindKPIDataResult> {
constructor() {
super("api.FindKPIDataResult", [
{ no: 1, name: "Series", kind: "message", localName: "Series", jsonName: "Series", repeat: 2 /*RepeatType.UNPACKED*/, T: () => KpiDataSerie, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Json series formatted result format", example: "{\"Series\": [{\"Name\": \"Name\", \"Values\": [\"A\", \"B\", \"C\"]}, {\"Name\": \"Quantity\", \"Values\": [\"12\", \"99\", \"74\"]}, {\"Name\": \"Volume\", \"Values\": [\"34\", \"23\", \"65\"]}]}" } } }
]);
}
create(value?: PartialMessage<FindKPIDataResult>): FindKPIDataResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.Series = [];
if (value !== undefined)
reflectionMergePartial<FindKPIDataResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FindKPIDataResult): FindKPIDataResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated api.KpiDataSerie Series */ 1:
message.Series.push(KpiDataSerie.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: FindKPIDataResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated api.KpiDataSerie Series = 1; */
for (let i = 0; i < message.Series.length; i++)
KpiDataSerie.internalBinaryWrite(message.Series[i], writer.tag(1, 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.FindKPIDataResult
*/
export const FindKPIDataResult = new FindKPIDataResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExtractKPIQuery$Type extends MessageType<ExtractKPIQuery> {
constructor() {
super("api.ExtractKPIQuery", [
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "UserId", kind: "scalar", localName: "UserId", jsonName: "UserId", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 3, name: "QueryType", kind: "enum", localName: "QueryType", jsonName: "QueryType", T: () => ["api.CHQueryType", CHQueryType], options: { "validate.rules": { enum: { definedOnly: true } } } },
{ no: 4, name: "QueryBlock", kind: "scalar", localName: "QueryBlock", jsonName: "QueryBlock", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 5, name: "EntityBlockFilters", kind: "message", localName: "EntityBlockFilters", jsonName: "EntityBlockFilters", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EntityBlockFilter },
{ no: 6, name: "Filter", kind: "message", localName: "Filter", jsonName: "Filter", T: () => CHFilter },
{ no: 7, name: "Dimensions", kind: "message", localName: "Dimensions", jsonName: "Dimensions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHDimension },
{ no: 8, name: "Metrics", kind: "message", localName: "Metrics", jsonName: "Metrics", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CHMetric },
{ no: 9, name: "TargetTimeZone", kind: "scalar", localName: "TargetTimeZone", jsonName: "TargetTimeZone", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", tzData: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Target user time zone <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>format</a>", example: "\"Europe/Paris\"" } } },
{ no: 10, name: "KpiGroupName", kind: "scalar", localName: "KpiGroupName", jsonName: "KpiGroupName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["executionflow", "stock", "movement", "handlingunit", "actor", "item", "stock_extended", "claim"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the analysis criterion to find the kpi data from", example: "\"stock_extended\"" } } },
{ no: 11, name: "TargetDomain", kind: "scalar", localName: "TargetDomain", jsonName: "TargetDomain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 12, name: "TargetType", kind: "scalar", localName: "TargetType", jsonName: "TargetType", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 13, name: "Fields", kind: "scalar", localName: "Fields", jsonName: "Fields", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
{ no: 14, name: "ListSeparator", kind: "scalar", localName: "ListSeparator", jsonName: "ListSeparator", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 15, name: "DecimalSeparator", kind: "scalar", localName: "DecimalSeparator", jsonName: "DecimalSeparator", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 16, name: "ColumnNames", kind: "scalar", localName: "ColumnNames", jsonName: "ColumnNames", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
{ no: 17, name: "ColumnTranslationMaps", kind: "map", localName: "ColumnTranslationMaps", jsonName: "ColumnTranslationMaps", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => TranslationMap } },
{ no: 18, name: "FieldIdxLVDetailedQuantity", kind: "scalar", localName: "FieldIdxLVDetailedQuantity", jsonName: "FieldIdxLVDetailedQuantity", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ },
{ no: 19, name: "ColumnFormats", kind: "map", localName: "ColumnFormats", jsonName: "ColumnFormats", K: 5 /*ScalarType.INT32*/, V: { kind: "message", T: () => ExtractColumnFormat } },
{ no: 20, name: "DateFormat", kind: "scalar", localName: "DateFormat", jsonName: "DateFormat", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Language code to format dates <a href='https://en.wikipedia.org/wiki/ISO_639'>format</a>", example: "\"en-US\"" } } },
{ no: 21, name: "NumberFormat", kind: "scalar", localName: "NumberFormat", jsonName: "NumberFormat", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Language code to format numbers <a href='https://en.wikipedia.org/wiki/ISO_639'>format</a>", example: "\"en-US\"" } } },
{ no: 22, name: "TimeFormat", kind: "enum", localName: "TimeFormat", jsonName: "TimeFormat", T: () => ["api.TimeFormat", TimeFormat], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Hour clock time format" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "UserId", "Fields", "ListSeparator", "DecimalSeparator", "ColumnName", "TargetDomain", "TargetType"] } } });
}
create(value?: PartialMessage<ExtractKPIQuery>): ExtractKPIQuery {
const message = globalThis.Object.create((this.messagePrototype!));
message.UserId = "";
message.QueryType = 0;
message.QueryBlock = "";
message.EntityBlockFilters = [];
message.Dimensions = [];
message.Metrics = [];
message.TargetTimeZone = "";
message.KpiGroupName = "";
message.TargetDomain = "";
message.TargetType = "";
message.Fields = [];
message.ListSeparator = "";
message.DecimalSeparator = "";
message.ColumnNames = [];
message.ColumnTranslationMaps = {};
message.FieldIdxLVDetailedQuantity = [];
message.ColumnFormats = {};
message.DateFormat = "";
message.NumberFormat = "";
message.TimeFormat = 0;
if (value !== undefined)
reflectionMergePartial<ExtractKPIQuery>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtractKPIQuery): ExtractKPIQuery {
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 UserId */ 2:
message.UserId = reader.string();
break;
case /* api.CHQueryType QueryType */ 3:
message.QueryType = reader.int32();
break;
case /* string QueryBlock */ 4:
message.QueryBlock = reader.string();
break;
case /* repeated api.EntityBlockFilter EntityBlockFilters */ 5:
message.EntityBlockFilters.push(EntityBlockFilter.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.CHFilter Filter */ 6:
message.Filter = CHFilter.internalBinaryRead(reader, reader.uint32(), options, message.Filter);
break;
case /* repeated api.CHDimension Dimensions */ 7:
message.Dimensions.push(CHDimension.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated api.CHMetric Metrics */ 8:
message.Metrics.push(CHMetric.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* string TargetTimeZone */ 9:
message.TargetTimeZone = reader.string();
break;
case /* string KpiGroupName */ 10:
message.KpiGroupName = reader.string();
break;
case /* string TargetDomain */ 11:
message.TargetDomain = reader.string();
break;
case /* string TargetType */ 12:
message.TargetType = reader.string();
break;
case /* repeated string Fields */ 13:
message.Fields.push(reader.string());
break;
case /* string ListSeparator */ 14:
message.ListSeparator = reader.string();
break;
case /* string DecimalSeparator */ 15:
message.DecimalSeparator = reader.string();
break;
case /* repeated string ColumnNames */ 16:
message.ColumnNames.push(reader.string());
break;
case /* map<string, api.TranslationMap> ColumnTranslationMaps */ 17:
this.binaryReadMap17(message.ColumnTranslationMaps, reader, options);
break;
case /* repeated int32 FieldIdxLVDetailedQuantity */ 18:
if (wireType === WireType.LengthDelimited)
for (let e = reader.int32() + reader.pos; reader.pos < e;)
message.FieldIdxLVDetailedQuantity.push(reader.int32());
else
message.FieldIdxLVDetailedQuantity.push(reader.int32());
break;
case /* map<int32, api.ExtractColumnFormat> ColumnFormats */ 19:
this.binaryReadMap19(message.ColumnFormats, reader, options);
break;
case /* string DateFormat */ 20:
message.DateFormat = reader.string();
break;
case /* string NumberFormat */ 21:
message.NumberFormat = reader.string();
break;
case /* api.TimeFormat TimeFormat */ 22:
message.TimeFormat = reader.int32();
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;
}
private binaryReadMap17(map: ExtractKPIQuery["ColumnTranslationMaps"], reader: IBinaryReader, options: BinaryReadOptions): void {
let len = reader.uint32(), end = reader.pos + len, key: keyof ExtractKPIQuery["ColumnTranslationMaps"] | undefined, val: ExtractKPIQuery["ColumnTranslationMaps"][any] | undefined;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case 1:
key = reader.string();
break;
case 2:
val = TranslationMap.internalBinaryRead(reader, reader.uint32(), options);
break;
default: throw new globalThis.Error("unknown map entry field for api.ExtractKPIQuery.ColumnTranslationMaps");
}
}
map[key ?? ""] = val ?? TranslationMap.create();
}
private binaryReadMap19(map: ExtractKPIQuery["ColumnFormats"], reader: IBinaryReader, options: BinaryReadOptions): void {
let len = reader.uint32(), end = reader.pos + len, key: keyof ExtractKPIQuery["ColumnFormats"] | undefined, val: ExtractKPIQuery["ColumnFormats"][any] | undefined;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case 1:
key = reader.int32();
break;
case 2:
val = ExtractColumnFormat.internalBinaryRead(reader, reader.uint32(), options);
break;
default: throw new globalThis.Error("unknown map entry field for api.ExtractKPIQuery.ColumnFormats");
}
}
map[key ?? 0] = val ?? ExtractColumnFormat.create();
}
internalBinaryWrite(message: ExtractKPIQuery, 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 UserId = 2; */
if (message.UserId !== "")
writer.tag(2, WireType.LengthDelimited).string(message.UserId);
/* api.CHQueryType QueryType = 3; */
if (message.QueryType !== 0)
writer.tag(3, WireType.Varint).int32(message.QueryType);
/* string QueryBlock = 4; */
if (message.QueryBlock !== "")
writer.tag(4, WireType.LengthDelimited).string(message.QueryBlock);
/* repeated api.EntityBlockFilter EntityBlockFilters = 5; */
for (let i = 0; i < message.EntityBlockFilters.length; i++)
EntityBlockFilter.internalBinaryWrite(message.EntityBlockFilters[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* api.CHFilter Filter = 6; */
if (message.Filter)
CHFilter.internalBinaryWrite(message.Filter, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* repeated api.CHDimension Dimensions = 7; */
for (let i = 0; i < message.Dimensions.length; i++)
CHDimension.internalBinaryWrite(message.Dimensions[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
/* repeated api.CHMetric Metrics = 8; */
for (let i = 0; i < message.Metrics.length; i++)
CHMetric.internalBinaryWrite(message.Metrics[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join();
/* string TargetTimeZone = 9; */
if (message.TargetTimeZone !== "")
writer.tag(9, WireType.LengthDelimited).string(message.TargetTimeZone);
/* string KpiGroupName = 10; */
if (message.KpiGroupName !== "")
writer.tag(10, WireType.LengthDelimited).string(message.KpiGroupName);
/* string TargetDomain = 11; */
if (message.TargetDomain !== "")
writer.tag(11, WireType.LengthDelimited).string(message.TargetDomain);
/* string TargetType = 12; */
if (message.TargetType !== "")
writer.tag(12, WireType.LengthDelimited).string(message.TargetType);
/* repeated string Fields = 13; */
for (let i = 0; i < message.Fields.length; i++)
writer.tag(13, WireType.LengthDelimited).string(message.Fields[i]);
/* string ListSeparator = 14; */
if (message.ListSeparator !== "")
writer.tag(14, WireType.LengthDelimited).string(message.ListSeparator);
/* string DecimalSeparator = 15; */
if (message.DecimalSeparator !== "")
writer.tag(15, WireType.LengthDelimited).string(message.DecimalSeparator);
/* repeated string ColumnNames = 16; */
for (let i = 0; i < message.ColumnNames.length; i++)
writer.tag(16, WireType.LengthDelimited).string(message.ColumnNames[i]);
/* map<string, api.TranslationMap> ColumnTranslationMaps = 17; */
for (let k of globalThis.Object.keys(message.ColumnTranslationMaps)) {
writer.tag(17, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
writer.tag(2, WireType.LengthDelimited).fork();
TranslationMap.internalBinaryWrite(message.ColumnTranslationMaps[k], writer, options);
writer.join().join();
}
/* repeated int32 FieldIdxLVDetailedQuantity = 18; */
if (message.FieldIdxLVDetailedQuantity.length) {
writer.tag(18, WireType.LengthDelimited).fork();
for (let i = 0; i < message.FieldIdxLVDetailedQuantity.length; i++)
writer.int32(message.FieldIdxLVDetailedQuantity[i]);
writer.join();
}
/* map<int32, api.ExtractColumnFormat> ColumnFormats = 19; */
for (let k of globalThis.Object.keys(message.ColumnFormats)) {
writer.tag(19, WireType.LengthDelimited).fork().tag(1, WireType.Varint).int32(parseInt(k));
writer.tag(2, WireType.LengthDelimited).fork();
ExtractColumnFormat.internalBinaryWrite(message.ColumnFormats[k as any], writer, options);
writer.join().join();
}
/* string DateFormat = 20; */
if (message.DateFormat !== "")
writer.tag(20, WireType.LengthDelimited).string(message.DateFormat);
/* string NumberFormat = 21; */
if (message.NumberFormat !== "")
writer.tag(21, WireType.LengthDelimited).string(message.NumberFormat);
/* api.TimeFormat TimeFormat = 22; */
if (message.TimeFormat !== 0)
writer.tag(22, WireType.Varint).int32(message.TimeFormat);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.ExtractKPIQuery
*/
export const ExtractKPIQuery = new ExtractKPIQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExtractKPIResult$Type extends MessageType<ExtractKPIResult> {
constructor() {
super("api.ExtractKPIResult", [
{ no: 1, name: "WorkflowExecution", kind: "message", localName: "WorkflowExecution", jsonName: "WorkflowExecution", T: () => WorkflowExecutionResult }
]);
}
create(value?: PartialMessage<ExtractKPIResult>): ExtractKPIResult {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExtractKPIResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtractKPIResult): ExtractKPIResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.WorkflowExecutionResult WorkflowExecution */ 1:
message.WorkflowExecution = WorkflowExecutionResult.internalBinaryRead(reader, reader.uint32(), options, message.WorkflowExecution);
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: ExtractKPIResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.WorkflowExecutionResult WorkflowExecution = 1; */
if (message.WorkflowExecution)
WorkflowExecutionResult.internalBinaryWrite(message.WorkflowExecution, writer.tag(1, 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.ExtractKPIResult
*/
export const ExtractKPIResult = new ExtractKPIResult$Type();