diff --git a/counter.client.ts b/counter.client.ts index 1c1980f..0f941df 100644 --- a/counter.client.ts +++ b/counter.client.ts @@ -4,6 +4,8 @@ import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; import { ProjectCountersService } from "./counter"; +import type { NextCounterSiteResult } from "./counter"; +import type { NextProjectCounterSiteRequest } from "./counter"; import { stackIntercept } from "@protobuf-ts/runtime-rpc"; import type { NextCounterResult } from "./counter"; import type { NextProjectCounterRequest } from "./counter"; @@ -17,6 +19,10 @@ export interface IProjectCountersServiceClient { * @generated from protobuf rpc: Next */ next(input: NextProjectCounterRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: NextSite + */ + nextSite(input: NextProjectCounterSiteRequest, options?: RpcOptions): UnaryCall; } /** * @generated from protobuf service vizapi.ProjectCountersService @@ -34,4 +40,11 @@ export class ProjectCountersServiceClient implements IProjectCountersServiceClie const method = this.methods[0], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } + /** + * @generated from protobuf rpc: NextSite + */ + nextSite(input: NextProjectCounterSiteRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[1], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } } diff --git a/counter.ts b/counter.ts index 7e0515a..c1141cd 100644 --- a/counter.ts +++ b/counter.ts @@ -34,6 +34,32 @@ export interface NextCounterResult { */ Value: bigint; } +/** + * @generated from protobuf message vizapi.NextProjectCounterSiteRequest + */ +export interface NextProjectCounterSiteRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * @generated from protobuf field: string ActorID = 2 + */ + ActorID: string; + /** + * @generated from protobuf field: string Key = 3 + */ + Key: string; +} +/** + * @generated from protobuf message vizapi.NextCounterSiteResult + */ +export interface NextCounterSiteResult { + /** + * @generated from protobuf field: int64 Value = 1 + */ + Value: bigint; +} // @generated message type with reflection information, may provide speed optimized methods class NextProjectCounterRequest$Type extends MessageType { constructor() { @@ -135,9 +161,119 @@ class NextCounterResult$Type extends MessageType { * @generated MessageType for protobuf message vizapi.NextCounterResult */ export const NextCounterResult = new NextCounterResult$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class NextProjectCounterSiteRequest$Type extends MessageType { + constructor() { + super("vizapi.NextProjectCounterSiteRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }, + { no: 2, name: "ActorID", kind: "scalar", localName: "ActorID", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, + { no: 3, name: "Key", kind: "scalar", localName: "Key", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"claims\"" }, "validate.rules": { string: { minLen: "1" } } } } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ActorID", "Key"] } } }); + } + create(value?: PartialMessage): NextProjectCounterSiteRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ActorID = ""; + message.Key = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NextProjectCounterSiteRequest): NextProjectCounterSiteRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* string ActorID */ 2: + message.ActorID = reader.string(); + break; + case /* string Key */ 3: + message.Key = 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: NextProjectCounterSiteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string ActorID = 2; */ + if (message.ActorID !== "") + writer.tag(2, WireType.LengthDelimited).string(message.ActorID); + /* string Key = 3; */ + if (message.Key !== "") + writer.tag(3, WireType.LengthDelimited).string(message.Key); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message vizapi.NextProjectCounterSiteRequest + */ +export const NextProjectCounterSiteRequest = new NextProjectCounterSiteRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class NextCounterSiteResult$Type extends MessageType { + constructor() { + super("vizapi.NextCounterSiteResult", [ + { no: 1, name: "Value", kind: "scalar", localName: "Value", jsonName: "Value", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + create(value?: PartialMessage): NextCounterSiteResult { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Value = 0n; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NextCounterSiteResult): NextCounterSiteResult { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 Value */ 1: + message.Value = reader.int64().toBigInt(); + 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: NextCounterSiteResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int64 Value = 1; */ + if (message.Value !== 0n) + writer.tag(1, WireType.Varint).int64(message.Value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message vizapi.NextCounterSiteResult + */ +export const NextCounterSiteResult = new NextCounterSiteResult$Type(); /** * @generated ServiceType for protobuf service vizapi.ProjectCountersService */ export const ProjectCountersService = new ServiceType("vizapi.ProjectCountersService", [ - { name: "Next", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Counters"], summary: "Get the next value for a project key", description: "Get the next value for a project key" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: NextProjectCounterRequest, O: NextCounterResult } + { name: "Next", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Counters"], summary: "Get the next value for a project key", description: "Get the next value for a project key" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: NextProjectCounterRequest, O: NextCounterResult }, + { name: "NextSite", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Counters"], summary: "Get the next value for a site type project key", description: "Get the next value for a site type project key" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: NextProjectCounterSiteRequest, O: NextCounterSiteResult } ], { "api.k8sService": "settings-server" }); diff --git a/package.json b/package.json index c4943bc..d36682d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reflex-platform/npm-viz-sdk", - "version": "1.12.0-SNAPSHOT-251006074407", + "version": "1.12.0-SNAPSHOT-251030151909", "description": "npm libs from visibility model proto files", "homepage": "", "main": "index.ts",