From ff0c8f49df85b5209b80be04c847d89e4d9d047b Mon Sep 17 00:00:00 2001 From: ci core model Date: Thu, 10 Sep 2026 09:56:57 +0000 Subject: [PATCH] Latest generation --- clickhouse.ts | 866 ++++++++++++++++++++------------------------------ package.json | 2 +- 2 files changed, 344 insertions(+), 524 deletions(-) diff --git a/clickhouse.ts b/clickhouse.ts index 7a78e0e..cfd9bfa 100644 --- a/clickhouse.ts +++ b/clickhouse.ts @@ -138,127 +138,6 @@ export interface CHMetric { */ IsComputed: boolean; } -/** - * @generated from protobuf message api.SimpleJSONQueryExpression - */ -export interface SimpleJSONQueryExpression { - /** - * @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.SimpleJSONDimension - */ -export interface SimpleJSONDimension { - /** - * @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.SimpleJSONQueryExpression Expressions = 12 - */ - Expressions: SimpleJSONQueryExpression[]; - /** - * @generated from protobuf field: bool IsComputed = 13 - */ - IsComputed: boolean; - /** - * Only useful for filters - * - * @generated from protobuf field: api.SimpleJSONDimension Or = 14 - */ - Or?: SimpleJSONDimension; -} -/** - * @generated from protobuf message api.SimpleJSONMetric - */ -export interface SimpleJSONMetric { - /** - * @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.SimpleJSONQueryExpression Expressions = 12 - */ - Expressions: SimpleJSONQueryExpression[]; - /** - * @generated from protobuf field: bool IsComputed = 13 - */ - IsComputed: boolean; -} /** * @generated from protobuf message api.CHFilter */ @@ -268,15 +147,6 @@ export interface CHFilter { */ Dimensions: CHDimension[]; } -/** - * @generated from protobuf message api.SimpleJSONFilter - */ -export interface SimpleJSONFilter { - /** - * @generated from protobuf field: repeated api.SimpleJSONDimension Dimensions = 1 - */ - Dimensions: SimpleJSONDimension[]; -} // // GetKpiData Api messages @@ -425,17 +295,12 @@ export interface GetKPIDataSimpleJSONQuery { */ Header?: QueryProjectHeader; /** - * @generated from protobuf field: api.CHQueryType QueryType = 2 + * CHQueryType QueryType = 2; + * string QueryBlock = 3; + * + * @generated from protobuf field: repeated api.SimpleJSONFilter Filters = 4 */ - QueryType: CHQueryType; - /** - * @generated from protobuf field: string QueryBlock = 3 - */ - QueryBlock: string; - /** - * @generated from protobuf field: api.SimpleJSONFilter Filter = 4 - */ - Filter?: SimpleJSONFilter; + Filters: SimpleJSONFilter[]; /** * @generated from protobuf field: repeated api.SimpleJSONDimension Dimensions = 5 */ @@ -465,6 +330,57 @@ export interface GetKPIDataSimpleJSONQuery { */ DateRangeEnd: string; } +/** + * @generated from protobuf message api.SimpleJSONDimension + */ +export interface SimpleJSONDimension { + /** + * @generated from protobuf field: string Name = 1 + */ + Name: string; + /** + * @generated from protobuf field: api.KpiDimensionGranularity Granularity = 2 + */ + Granularity: KpiDimensionGranularity; +} +/** + * @generated from protobuf message api.SimpleJSONMetric + */ +export interface SimpleJSONMetric { + /** + * @generated from protobuf field: string Name = 1 + */ + Name: string; +} +/** + * @generated from protobuf message api.SimpleJSONFilter + */ +export interface SimpleJSONFilter { + /** + * @generated from protobuf field: string DimensionName = 1 + */ + DimensionName: string; + /** + * @generated from protobuf field: api.KPIFilterOperator Operator = 3 + */ + Operator: KPIFilterOperator; + /** + * @generated from protobuf field: repeated string Values = 4 + */ + Values: string[]; + /** + * @generated from protobuf field: api.StringDateObject StartDate = 5 + */ + StartDate?: StringDateObject; + /** + * @generated from protobuf field: api.StringDateObject EndDate = 6 + */ + EndDate?: StringDateObject; + /** + * @generated from protobuf field: api.SimpleJSONFilter Or = 7 + */ + Or?: SimpleJSONFilter; +} /** * SimpleJSONColumn is a column header in the SimpleJSON table format (Grafana-compatible). * @@ -766,6 +682,100 @@ export enum KpiDataResultFormat { */ KPIDATA_RESULT_FORMAT_SERIES = 1 } +/** + * @generated from protobuf enum api.KpiDimensionGranularity + */ +export enum KpiDimensionGranularity { + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_UNKNOWN = 0; + */ + KPI_DIMENSION_GRANULARITY_UNKNOWN = 0, + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_DAY = 1; + */ + KPI_DIMENSION_GRANULARITY_DAY = 1, + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_WEEK = 2; + */ + KPI_DIMENSION_GRANULARITY_WEEK = 2, + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_MONTH = 3; + */ + KPI_DIMENSION_GRANULARITY_MONTH = 3, + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_YEAR = 4; + */ + KPI_DIMENSION_GRANULARITY_YEAR = 4, + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_5_MINUTE = 5; + */ + KPI_DIMENSION_GRANULARITY_5_MINUTE = 5, + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_10_MINUTE = 6; + */ + KPI_DIMENSION_GRANULARITY_10_MINUTE = 6, + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_15_MINUTE = 7; + */ + KPI_DIMENSION_GRANULARITY_15_MINUTE = 7, + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_30_MINUTE = 8; + */ + KPI_DIMENSION_GRANULARITY_30_MINUTE = 8, + /** + * @generated from protobuf enum value: KPI_DIMENSION_GRANULARITY_HOUR = 9; + */ + KPI_DIMENSION_GRANULARITY_HOUR = 9 +} +/** + * @generated from protobuf enum api.KPIFilterOperator + */ +export enum KPIFilterOperator { + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_UNKNOWN = 0; + */ + KPI_FILTER_OPERATOR_UNKNOWN = 0, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_EQUAL = 1; + */ + KPI_FILTER_OPERATOR_EQUAL = 1, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_DIFF = 2; + */ + KPI_FILTER_OPERATOR_DIFF = 2, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_START_BY = 3; + */ + KPI_FILTER_OPERATOR_START_BY = 3, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_NOT_START_BY = 4; + */ + KPI_FILTER_OPERATOR_NOT_START_BY = 4, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_FINISH_BY = 5; + */ + KPI_FILTER_OPERATOR_FINISH_BY = 5, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_NOT_FINISH_BY = 6; + */ + KPI_FILTER_OPERATOR_NOT_FINISH_BY = 6, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_CONTAINS = 7; + */ + KPI_FILTER_OPERATOR_CONTAINS = 7, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_NOT_CONTAINS = 8; + */ + KPI_FILTER_OPERATOR_NOT_CONTAINS = 8, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_IN_LIST = 9; + */ + KPI_FILTER_OPERATOR_IN_LIST = 9, + /** + * @generated from protobuf enum value: KPI_FILTER_OPERATOR_NOT_IN_LIST = 10; + */ + KPI_FILTER_OPERATOR_NOT_IN_LIST = 10 +} // @generated message type with reflection information, may provide speed optimized methods class CHDimension$Type extends MessageType { constructor() { @@ -1081,320 +1091,6 @@ class CHMetric$Type extends MessageType { */ export const CHMetric = new CHMetric$Type(); // @generated message type with reflection information, may provide speed optimized methods -class SimpleJSONQueryExpression$Type extends MessageType { - constructor() { - super("api.SimpleJSONQueryExpression", [ - { 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): SimpleJSONQueryExpression { - const message = globalThis.Object.create((this.messagePrototype!)); - message.Block = ""; - message.QueryType = 0; - message.Field = ""; - message.Query = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SimpleJSONQueryExpression): SimpleJSONQueryExpression { - 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: SimpleJSONQueryExpression, 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.SimpleJSONQueryExpression - */ -export const SimpleJSONQueryExpression = new SimpleJSONQueryExpression$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class SimpleJSONDimension$Type extends MessageType { - constructor() { - super("api.SimpleJSONDimension", [ - { no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "n1validate.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: { "n1validate.rules": { string: { minLen: "1" } } } }, - { no: 4, name: "DataType", kind: "scalar", localName: "DataType", jsonName: "DataType", T: 9 /*ScalarType.STRING*/, options: { "n1validate.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: { "n1validate.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: () => SimpleJSONQueryExpression }, - { 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: () => SimpleJSONDimension } - ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Name", "Level", "DataType", "ContentType"] } } }); - } - create(value?: PartialMessage): SimpleJSONDimension { - 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(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SimpleJSONDimension): SimpleJSONDimension { - 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.SimpleJSONQueryExpression Expressions */ 12: - message.Expressions.push(SimpleJSONQueryExpression.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* bool IsComputed */ 13: - message.IsComputed = reader.bool(); - break; - case /* api.SimpleJSONDimension Or */ 14: - message.Or = SimpleJSONDimension.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: SimpleJSONDimension, 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.SimpleJSONQueryExpression Expressions = 12; */ - for (let i = 0; i < message.Expressions.length; i++) - SimpleJSONQueryExpression.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.SimpleJSONDimension Or = 14; */ - if (message.Or) - SimpleJSONDimension.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.SimpleJSONDimension - */ -export const SimpleJSONDimension = new SimpleJSONDimension$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class SimpleJSONMetric$Type extends MessageType { - constructor() { - super("api.SimpleJSONMetric", [ - { no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, - { no: 3, name: "Level", kind: "scalar", localName: "Level", jsonName: "Level", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, - { no: 4, name: "DataType", kind: "scalar", localName: "DataType", jsonName: "DataType", T: 9 /*ScalarType.STRING*/, options: { "n1validate.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: { "n1validate.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: () => SimpleJSONQueryExpression }, - { 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): SimpleJSONMetric { - 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(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SimpleJSONMetric): SimpleJSONMetric { - 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.SimpleJSONQueryExpression Expressions */ 12: - message.Expressions.push(SimpleJSONQueryExpression.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: SimpleJSONMetric, 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.SimpleJSONQueryExpression Expressions = 12; */ - for (let i = 0; i < message.Expressions.length; i++) - SimpleJSONQueryExpression.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.SimpleJSONMetric - */ -export const SimpleJSONMetric = new SimpleJSONMetric$Type(); -// @generated message type with reflection information, may provide speed optimized methods class CHFilter$Type extends MessageType { constructor() { super("api.CHFilter", [ @@ -1442,53 +1138,6 @@ class CHFilter$Type extends MessageType { */ export const CHFilter = new CHFilter$Type(); // @generated message type with reflection information, may provide speed optimized methods -class SimpleJSONFilter$Type extends MessageType { - constructor() { - super("api.SimpleJSONFilter", [ - { no: 1, name: "Dimensions", kind: "message", localName: "Dimensions", jsonName: "Dimensions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SimpleJSONDimension } - ]); - } - create(value?: PartialMessage): SimpleJSONFilter { - const message = globalThis.Object.create((this.messagePrototype!)); - message.Dimensions = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SimpleJSONFilter): SimpleJSONFilter { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated api.SimpleJSONDimension Dimensions */ 1: - message.Dimensions.push(SimpleJSONDimension.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: SimpleJSONFilter, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated api.SimpleJSONDimension Dimensions = 1; */ - for (let i = 0; i < message.Dimensions.length; i++) - SimpleJSONDimension.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.SimpleJSONFilter - */ -export const SimpleJSONFilter = new SimpleJSONFilter$Type(); -// @generated message type with reflection information, may provide speed optimized methods class KpiDataSerie$Type extends MessageType { constructor() { super("api.KpiDataSerie", [ @@ -1862,9 +1511,7 @@ class GetKPIDataSimpleJSONQuery$Type extends MessageType QueryProjectHeader }, - { no: 2, name: "QueryType", kind: "enum", localName: "QueryType", jsonName: "QueryType", T: () => ["api.CHQueryType", CHQueryType] }, - { no: 3, name: "QueryBlock", kind: "scalar", localName: "QueryBlock", jsonName: "QueryBlock", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "Filter", kind: "message", localName: "Filter", jsonName: "Filter", T: () => SimpleJSONFilter }, + { no: 4, name: "Filters", kind: "message", localName: "Filters", jsonName: "Filters", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SimpleJSONFilter }, { no: 5, name: "Dimensions", kind: "message", localName: "Dimensions", jsonName: "Dimensions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SimpleJSONDimension }, { no: 6, name: "Metrics", kind: "message", localName: "Metrics", jsonName: "Metrics", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SimpleJSONMetric }, { no: 7, name: "TargetTimeZone", kind: "scalar", localName: "TargetTimeZone", jsonName: "TargetTimeZone", T: 9 /*ScalarType.STRING*/ }, @@ -1875,8 +1522,7 @@ class GetKPIDataSimpleJSONQuery$Type extends MessageType): GetKPIDataSimpleJSONQuery { const message = globalThis.Object.create((this.messagePrototype!)); - message.QueryType = 0; - message.QueryBlock = ""; + message.Filters = []; message.Dimensions = []; message.Metrics = []; message.TargetTimeZone = ""; @@ -1895,14 +1541,8 @@ class GetKPIDataSimpleJSONQuery$Type extends MessageType { + constructor() { + super("api.SimpleJSONDimension", [ + { no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }, + { no: 2, name: "Granularity", kind: "enum", localName: "Granularity", jsonName: "Granularity", T: () => ["api.KpiDimensionGranularity", KpiDimensionGranularity] } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Name"] } } }); + } + create(value?: PartialMessage): SimpleJSONDimension { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Name = ""; + message.Granularity = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SimpleJSONDimension): SimpleJSONDimension { + 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 /* api.KpiDimensionGranularity Granularity */ 2: + message.Granularity = 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; + } + internalBinaryWrite(message: SimpleJSONDimension, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Name = 1; */ + if (message.Name !== "") + writer.tag(1, WireType.LengthDelimited).string(message.Name); + /* api.KpiDimensionGranularity Granularity = 2; */ + if (message.Granularity !== 0) + writer.tag(2, WireType.Varint).int32(message.Granularity); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.SimpleJSONDimension + */ +export const SimpleJSONDimension = new SimpleJSONDimension$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SimpleJSONMetric$Type extends MessageType { + constructor() { + super("api.SimpleJSONMetric", [ + { no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Name"] } } }); + } + create(value?: PartialMessage): SimpleJSONMetric { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Name = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SimpleJSONMetric): SimpleJSONMetric { + 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; + 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: SimpleJSONMetric, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string Name = 1; */ + if (message.Name !== "") + writer.tag(1, WireType.LengthDelimited).string(message.Name); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.SimpleJSONMetric + */ +export const SimpleJSONMetric = new SimpleJSONMetric$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SimpleJSONFilter$Type extends MessageType { + constructor() { + super("api.SimpleJSONFilter", [ + { no: 1, name: "DimensionName", kind: "scalar", localName: "DimensionName", jsonName: "DimensionName", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "Operator", kind: "enum", localName: "Operator", jsonName: "Operator", T: () => ["api.KPIFilterOperator", KPIFilterOperator], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Allowed values : \"KPI_FILTER_OPERATOR_EQUAL\", \"KPI_FILTER_OPERATOR_DIFF\", \"KPI_FILTER_OPERATOR_START_BY\", \"KPI_FILTER_OPERATOR_NOT_START_BY\", \"KPI_FILTER_OPERATOR_FINISH_BY\", \"KPI_FILTER_OPERATOR_NOT_FINISH_BY\", \"KPI_FILTER_OPERATOR_CONTAINS\", \"KPI_FILTER_OPERATOR_NOT_CONTAINS\", \"KPI_FILTER_OPERATOR_IN_LIST\", \"KPI_FILTER_OPERATOR_NOT_IN_LIST\"" } } }, + { no: 4, name: "Values", kind: "scalar", localName: "Values", jsonName: "Values", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "StartDate", kind: "message", localName: "StartDate", jsonName: "StartDate", T: () => StringDateObject }, + { no: 6, name: "EndDate", kind: "message", localName: "EndDate", jsonName: "EndDate", T: () => StringDateObject }, + { no: 7, name: "Or", kind: "message", localName: "Or", jsonName: "Or", T: () => SimpleJSONFilter } + ]); + } + create(value?: PartialMessage): SimpleJSONFilter { + const message = globalThis.Object.create((this.messagePrototype!)); + message.DimensionName = ""; + message.Operator = 0; + message.Values = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SimpleJSONFilter): SimpleJSONFilter { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string DimensionName */ 1: + message.DimensionName = reader.string(); + break; + case /* api.KPIFilterOperator Operator */ 3: + message.Operator = reader.int32(); + break; + case /* repeated string Values */ 4: + message.Values.push(reader.string()); + break; + case /* api.StringDateObject StartDate */ 5: + message.StartDate = StringDateObject.internalBinaryRead(reader, reader.uint32(), options, message.StartDate); + break; + case /* api.StringDateObject EndDate */ 6: + message.EndDate = StringDateObject.internalBinaryRead(reader, reader.uint32(), options, message.EndDate); + break; + case /* api.SimpleJSONFilter Or */ 7: + message.Or = SimpleJSONFilter.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: SimpleJSONFilter, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string DimensionName = 1; */ + if (message.DimensionName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.DimensionName); + /* api.KPIFilterOperator Operator = 3; */ + if (message.Operator !== 0) + writer.tag(3, WireType.Varint).int32(message.Operator); + /* repeated string Values = 4; */ + for (let i = 0; i < message.Values.length; i++) + writer.tag(4, WireType.LengthDelimited).string(message.Values[i]); + /* api.StringDateObject StartDate = 5; */ + if (message.StartDate) + StringDateObject.internalBinaryWrite(message.StartDate, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* api.StringDateObject EndDate = 6; */ + if (message.EndDate) + StringDateObject.internalBinaryWrite(message.EndDate, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* api.SimpleJSONFilter Or = 7; */ + if (message.Or) + SimpleJSONFilter.internalBinaryWrite(message.Or, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.SimpleJSONFilter + */ +export const SimpleJSONFilter = new SimpleJSONFilter$Type(); +// @generated message type with reflection information, may provide speed optimized methods class SimpleJSONColumn$Type extends MessageType { constructor() { super("api.SimpleJSONColumn", [ diff --git a/package.json b/package.json index a12f11a..a47c65a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reflex-platform/npm-core-sdk", - "version": "1.15.0-SNAPSHOT-260910094542", + "version": "1.15.0-SNAPSHOT-260910095612", "description": "npm libs from core model proto files", "homepage": "", "main": "index.ts",