diff --git a/package.json b/package.json index 75b3869..3575c32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reflex-platform/npm-viz-sdk", - "version": "1.13.0-SNAPSHOT-260407121852", + "version": "1.13.0-SNAPSHOT-260413122711", "description": "npm libs from visibility model proto files", "homepage": "", "main": "index.ts", diff --git a/viz-view.client.ts b/viz-view.client.ts index 0e9d569..9348fbe 100644 --- a/viz-view.client.ts +++ b/viz-view.client.ts @@ -4,6 +4,7 @@ import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; import { ViewService } from "./viz-view"; +import type { CrossExtractRequest } from "./viz-view"; import type { ExtractResult } from "./viz-view"; import type { ExtractRequest } from "./viz-view"; import type { SetOwnerViewResult } from "./viz-view"; @@ -59,6 +60,10 @@ export interface IViewServiceClient { * @generated from protobuf rpc: Extract */ extract(input: ExtractRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: CrossExtract + */ + crossExtract(input: CrossExtractRequest, options?: RpcOptions): UnaryCall; } /** * @generated from protobuf service vizapi.ViewService @@ -125,4 +130,11 @@ export class ViewServiceClient implements IViewServiceClient, ServiceInfo { const method = this.methods[7], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } + /** + * @generated from protobuf rpc: CrossExtract + */ + crossExtract(input: CrossExtractRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[8], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } } diff --git a/viz-view.ts b/viz-view.ts index a8d4b78..b07a81e 100644 --- a/viz-view.ts +++ b/viz-view.ts @@ -427,6 +427,67 @@ export interface ExtractRequest { */ TimeFormat: TimeFormat; } +/** + * @generated from protobuf message vizapi.CrossExtractRequest + */ +export interface CrossExtractRequest { + /** + * @generated from protobuf field: string ViewID = 1 + */ + ViewID: string; + /** + * BlockFilter structure for Find query + * + * @generated from protobuf field: repeated api.BlockFilter BlockFilters = 2 + */ + BlockFilters: BlockFilter[]; + /** + * Range filter structure for Find query + * + * @generated from protobuf field: string ListSeparator = 3 + */ + ListSeparator: string; + /** + * @generated from protobuf field: string DecimalSeparator = 4 + */ + DecimalSeparator: string; + /** + * @generated from protobuf field: map ColumnTranslationMaps = 5 + */ + ColumnTranslationMaps: { + [key: string]: TranslationMap; + }; + /** + * @generated from protobuf field: map ColumnFormats = 6 + */ + ColumnFormats: { + [key: number]: ExtractColumnFormat; + }; + /** + * @generated from protobuf field: string TargetTimeZone = 7 + */ + TargetTimeZone: string; + /** + * @generated from protobuf field: string DateFormat = 8 + */ + DateFormat: string; + /** + * @generated from protobuf field: string NumberFormat = 9 + */ + NumberFormat: string; + /** + * @generated from protobuf field: vizapi.TimeFormat TimeFormat = 10 + */ + TimeFormat: TimeFormat; + /** + * @generated from protobuf field: repeated string SearchTagProjects = 11 + */ + SearchTagProjects: string[]; + /** + * @generated from protobuf field: repeated string SearchTagUsers = 12 + */ + SearchTagUsers: string[]; +} /** * @generated from protobuf message vizapi.ExtractResult */ @@ -1649,6 +1710,181 @@ class ExtractRequest$Type extends MessageType { */ export const ExtractRequest = new ExtractRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods +class CrossExtractRequest$Type extends MessageType { + constructor() { + super("vizapi.CrossExtractRequest", [ + { no: 1, name: "ViewID", kind: "scalar", localName: "ViewID", jsonName: "ViewID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, + { no: 2, name: "BlockFilters", kind: "message", localName: "BlockFilters", jsonName: "BlockFilters", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BlockFilter, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "BlockFilter structure for Find query" } } }, + { no: 3, name: "ListSeparator", kind: "scalar", localName: "ListSeparator", jsonName: "ListSeparator", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Separator for list to use in the csv" }, "validate.rules": { string: { minLen: "1" } } } }, + { no: 4, name: "DecimalSeparator", kind: "scalar", localName: "DecimalSeparator", jsonName: "DecimalSeparator", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Separator for decimal to use in the csv" }, "validate.rules": { string: { minLen: "1" } } } }, + { no: 5, name: "ColumnTranslationMaps", kind: "map", localName: "ColumnTranslationMaps", jsonName: "ColumnTranslationMaps", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => TranslationMap } }, + { no: 6, name: "ColumnFormats", kind: "map", localName: "ColumnFormats", jsonName: "ColumnFormats", K: 5 /*ScalarType.INT32*/, V: { kind: "message", T: () => ExtractColumnFormat } }, + { no: 7, name: "TargetTimeZone", kind: "scalar", localName: "TargetTimeZone", jsonName: "TargetTimeZone", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Target user time zone format", example: "\"Europe/Paris\"" }, "validate.rules": { string: { minLen: "1", tzData: true } } } }, + { no: 8, 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 format", example: "\"en-US\"" } } }, + { no: 9, 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 format", example: "\"en-US\"" } } }, + { no: 10, name: "TimeFormat", kind: "enum", localName: "TimeFormat", jsonName: "TimeFormat", T: () => ["vizapi.TimeFormat", TimeFormat], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Hour clock time format" } } }, + { no: 11, name: "SearchTagProjects", kind: "scalar", localName: "SearchTagProjects", jsonName: "SearchTagProjects", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "List of projectID to search into", example: "[\"project1\", \"project2\"]" } } }, + { no: 12, name: "SearchTagUsers", kind: "scalar", localName: "SearchTagUsers", jsonName: "SearchTagUsers", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "List of userID to search into", example: "[\"userID1\", \"userID2\"]" } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ViewID", "ListSeparator", "DecimalSeparator"] } } }); + } + create(value?: PartialMessage): CrossExtractRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ViewID = ""; + message.BlockFilters = []; + message.ListSeparator = ""; + message.DecimalSeparator = ""; + message.ColumnTranslationMaps = {}; + message.ColumnFormats = {}; + message.TargetTimeZone = ""; + message.DateFormat = ""; + message.NumberFormat = ""; + message.TimeFormat = 0; + message.SearchTagProjects = []; + message.SearchTagUsers = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CrossExtractRequest): CrossExtractRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string ViewID */ 1: + message.ViewID = reader.string(); + break; + case /* repeated api.BlockFilter BlockFilters */ 2: + message.BlockFilters.push(BlockFilter.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* string ListSeparator */ 3: + message.ListSeparator = reader.string(); + break; + case /* string DecimalSeparator */ 4: + message.DecimalSeparator = reader.string(); + break; + case /* map ColumnTranslationMaps */ 5: + this.binaryReadMap5(message.ColumnTranslationMaps, reader, options); + break; + case /* map ColumnFormats */ 6: + this.binaryReadMap6(message.ColumnFormats, reader, options); + break; + case /* string TargetTimeZone */ 7: + message.TargetTimeZone = reader.string(); + break; + case /* string DateFormat */ 8: + message.DateFormat = reader.string(); + break; + case /* string NumberFormat */ 9: + message.NumberFormat = reader.string(); + break; + case /* vizapi.TimeFormat TimeFormat */ 10: + message.TimeFormat = reader.int32(); + break; + case /* repeated string SearchTagProjects */ 11: + message.SearchTagProjects.push(reader.string()); + break; + case /* repeated string SearchTagUsers */ 12: + message.SearchTagUsers.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; + } + private binaryReadMap5(map: CrossExtractRequest["ColumnTranslationMaps"], reader: IBinaryReader, options: BinaryReadOptions): void { + let len = reader.uint32(), end = reader.pos + len, key: keyof CrossExtractRequest["ColumnTranslationMaps"] | undefined, val: CrossExtractRequest["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 vizapi.CrossExtractRequest.ColumnTranslationMaps"); + } + } + map[key ?? ""] = val ?? TranslationMap.create(); + } + private binaryReadMap6(map: CrossExtractRequest["ColumnFormats"], reader: IBinaryReader, options: BinaryReadOptions): void { + let len = reader.uint32(), end = reader.pos + len, key: keyof CrossExtractRequest["ColumnFormats"] | undefined, val: CrossExtractRequest["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 vizapi.CrossExtractRequest.ColumnFormats"); + } + } + map[key ?? 0] = val ?? ExtractColumnFormat.create(); + } + internalBinaryWrite(message: CrossExtractRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string ViewID = 1; */ + if (message.ViewID !== "") + writer.tag(1, WireType.LengthDelimited).string(message.ViewID); + /* 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(); + /* string ListSeparator = 3; */ + if (message.ListSeparator !== "") + writer.tag(3, WireType.LengthDelimited).string(message.ListSeparator); + /* string DecimalSeparator = 4; */ + if (message.DecimalSeparator !== "") + writer.tag(4, WireType.LengthDelimited).string(message.DecimalSeparator); + /* map ColumnTranslationMaps = 5; */ + for (let k of globalThis.Object.keys(message.ColumnTranslationMaps)) { + writer.tag(5, 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(); + } + /* map ColumnFormats = 6; */ + for (let k of globalThis.Object.keys(message.ColumnFormats)) { + writer.tag(6, 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 TargetTimeZone = 7; */ + if (message.TargetTimeZone !== "") + writer.tag(7, WireType.LengthDelimited).string(message.TargetTimeZone); + /* string DateFormat = 8; */ + if (message.DateFormat !== "") + writer.tag(8, WireType.LengthDelimited).string(message.DateFormat); + /* string NumberFormat = 9; */ + if (message.NumberFormat !== "") + writer.tag(9, WireType.LengthDelimited).string(message.NumberFormat); + /* vizapi.TimeFormat TimeFormat = 10; */ + if (message.TimeFormat !== 0) + writer.tag(10, WireType.Varint).int32(message.TimeFormat); + /* repeated string SearchTagProjects = 11; */ + for (let i = 0; i < message.SearchTagProjects.length; i++) + writer.tag(11, WireType.LengthDelimited).string(message.SearchTagProjects[i]); + /* repeated string SearchTagUsers = 12; */ + for (let i = 0; i < message.SearchTagUsers.length; i++) + writer.tag(12, WireType.LengthDelimited).string(message.SearchTagUsers[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message vizapi.CrossExtractRequest + */ +export const CrossExtractRequest = new CrossExtractRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods class ExtractResult$Type extends MessageType { constructor() { super("vizapi.ExtractResult", [ @@ -1823,5 +2059,6 @@ export const ViewService = new ServiceType("vizapi.ViewService", [ { name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["View"], summary: "List views", description: "List all Views present under the same Project and with the same Screen ID" }, "api.rscType": "Project", "api.roles": "Platform.Project-Views", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ListViewRequest, O: ListViewResult }, { name: "DeleteViewsForProject", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["View"], summary: "Delete all views for a project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Views", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: DeleteViewsForProjectRequest, O: DeleteViewsForProjectResult }, { name: "SetOwner", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["View"], summary: "Set the owner of a view", description: "Set the owner of a View with its ID and the user ID of the new owner" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: SetOwnerViewRequest, O: SetOwnerViewResult }, - { name: "Extract", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["View"], summary: "Extract view", description: "Start view extraction in csv format" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ExtractRequest, O: ExtractResult } + { name: "Extract", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["View"], summary: "Extract view", description: "Start view extraction in csv format" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ExtractRequest, O: ExtractResult }, + { name: "CrossExtract", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["View"], summary: "Cross Extract view", description: "Start view extraction in csv format" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: CrossExtractRequest, O: ExtractResult } ], { "api.k8sService": "views-server" });