From 56e42e01fa42169cf8f2d1f40f30b6b94466e0d8 Mon Sep 17 00:00:00 2001 From: Vitalii Popov Date: Sat, 13 Jun 2026 22:29:31 +0200 Subject: [PATCH 1/4] =?UTF-8?q?[MILAB-XXXX]:=20PF-0:=20regen=20TS=20gRPC?= =?UTF-8?q?=20bindings=20=E2=80=94=20add=20Query/Mutation=20RPCs=20and=20C?= =?UTF-8?q?ommandAPI=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Command/CmdError/CommandResult messages plus Query and Mutation RPCs to service Platform in api.proto. Regenerate proto-grpc/* via generate-grpc.sh. PlatformClient and IPlatformClient now expose query()/mutation() methods. --- .../proto/plapi/plapiproto/api.proto | 42 ++ .../googleapis/google/rpc/status.ts | 8 +- .../pl/plapi/plapiproto/api.client.ts | 32 ++ .../milaboratory/pl/plapi/plapiproto/api.ts | 264 +++++++++- .../src/proto-grpc/google/api/http.ts | 62 +-- .../src/proto-grpc/google/rpc/code.ts | 14 +- .../proto-grpc/google/rpc/error_details.ts | 482 +++++------------- .../src/proto-grpc/google/rpc/status.ts | 8 +- 8 files changed, 515 insertions(+), 397 deletions(-) diff --git a/lib/node/pl-client/proto/plapi/plapiproto/api.proto b/lib/node/pl-client/proto/plapi/plapiproto/api.proto index 5439d6fe9a..69be70f5de 100644 --- a/lib/node/pl-client/proto/plapi/plapiproto/api.proto +++ b/lib/node/pl-client/proto/plapi/plapiproto/api.proto @@ -275,6 +275,22 @@ service Platform { rpc License(MaintenanceAPI.License.Request) returns (MaintenanceAPI.License.Response) { option (google.api.http) = {get: "/v1/license"}; } + + // + // Command bus + // + rpc Query(CommandAPI.Command) returns (CommandAPI.CommandResult) { + option (google.api.http) = { + post: "/v1/command/query" + body: "*" + }; + } + rpc Mutation(CommandAPI.Command) returns (CommandAPI.CommandResult) { + option (google.api.http) = { + post: "/v1/command/mutation" + body: "*" + }; + } } // Platform transactions at the API level are implemented as bidirectional @@ -2024,3 +2040,29 @@ message MaintenanceAPI { message Util { message Deprecated {} } + +// Command bus — two standalone RPCs (Query / Mutation) that carry +// arbitrary named commands as JSON payloads. The proto contract is +// frozen: new features register new command names server-side only. +message CommandAPI { + // Command carries the name of a registered handler and an optional + // JSON-encoded argument payload. + message Command { + string name = 1; // required, non-empty + bytes payload = 2; // JSON args, may be omitted + } + + // CmdError is a structured error returned inside a CommandResult. + message CmdError { + string message = 1; + string code = 2; + } + + // CommandResult is the response envelope for both Query and Mutation. + // On success data contains a JSON-encoded result; errors is empty. + // On failure data may be absent and errors carries one or more entries. + message CommandResult { + bytes data = 1; // JSON result + repeated CmdError errors = 2; + } +} diff --git a/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts b/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts index 619459020f..56d780b598 100644 --- a/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts +++ b/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "github.com/googleapis/googleapis/google/rpc/status.proto" (package "google.rpc", syntax proto3) // tslint:disable // -// Copyright 2025 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -39,8 +39,7 @@ import { Any } from "../../../../../google/protobuf/any"; */ export interface Status { /** - * The status code, which should be an enum value of - * [google.rpc.Code][google.rpc.Code]. + * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. * * @generated from protobuf field: int32 code = 1 */ @@ -48,8 +47,7 @@ export interface Status { /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the - * [google.rpc.Status.details][google.rpc.Status.details] field, or localized - * by the client. + * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. * * @generated from protobuf field: string message = 2 */ diff --git a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts index bc619b18a9..f4806eed1d 100644 --- a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +++ b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts @@ -4,6 +4,8 @@ import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; import { Platform } from "./api"; +import type { CommandAPI_CommandResult } from "./api"; +import type { CommandAPI_Command } from "./api"; import type { MaintenanceAPI_License_Response } from "./api"; import type { MaintenanceAPI_License_Request } from "./api"; import type { MaintenanceAPI_Ping_Response } from "./api"; @@ -304,6 +306,18 @@ export interface IPlatformClient { * @generated from protobuf rpc: License */ license(input: MaintenanceAPI_License_Request, options?: RpcOptions): UnaryCall; + /** + * + * Command bus + * + * + * @generated from protobuf rpc: Query + */ + query(input: CommandAPI_Command, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: Mutation + */ + mutation(input: CommandAPI_Command, options?: RpcOptions): UnaryCall; } /** * @generated from protobuf service MiLaboratories.PL.API.Platform @@ -642,4 +656,22 @@ export class PlatformClient implements IPlatformClient, ServiceInfo { const method = this.methods[36], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } + /** + * + * Command bus + * + * + * @generated from protobuf rpc: Query + */ + query(input: CommandAPI_Command, options?: RpcOptions): UnaryCall { + const method = this.methods[37], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: Mutation + */ + mutation(input: CommandAPI_Command, options?: RpcOptions): UnaryCall { + const method = this.methods[38], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } } diff --git a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts index b6113f1bbd..e56884772a 100644 --- a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts +++ b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts @@ -4371,6 +4371,63 @@ export interface Util { */ export interface Util_Deprecated { } +/** + * Command bus — two standalone RPCs (Query / Mutation) that carry + * arbitrary named commands as JSON payloads. The proto contract is + * frozen: new features register new command names server-side only. + * + * @generated from protobuf message MiLaboratories.PL.API.CommandAPI + */ +export interface CommandAPI { +} +/** + * Command carries the name of a registered handler and an optional + * JSON-encoded argument payload. + * + * @generated from protobuf message MiLaboratories.PL.API.CommandAPI.Command + */ +export interface CommandAPI_Command { + /** + * @generated from protobuf field: string name = 1 + */ + name: string; // required, non-empty + /** + * @generated from protobuf field: bytes payload = 2 + */ + payload: Uint8Array; // JSON args, may be omitted +} +/** + * CmdError is a structured error returned inside a CommandResult. + * + * @generated from protobuf message MiLaboratories.PL.API.CommandAPI.CmdError + */ +export interface CommandAPI_CmdError { + /** + * @generated from protobuf field: string message = 1 + */ + message: string; + /** + * @generated from protobuf field: string code = 2 + */ + code: string; +} +/** + * CommandResult is the response envelope for both Query and Mutation. + * On success data contains a JSON-encoded result; errors is empty. + * On failure data may be absent and errors carries one or more entries. + * + * @generated from protobuf message MiLaboratories.PL.API.CommandAPI.CommandResult + */ +export interface CommandAPI_CommandResult { + /** + * @generated from protobuf field: bytes data = 1 + */ + data: Uint8Array; // JSON result + /** + * @generated from protobuf field: repeated MiLaboratories.PL.API.CommandAPI.CmdError errors = 2 + */ + errors: CommandAPI_CmdError[]; +} // @generated message type with reflection information, may provide speed optimized methods class TxAPI$Type extends MessageType { constructor() { @@ -20367,6 +20424,209 @@ class Util_Deprecated$Type extends MessageType { * @generated MessageType for protobuf message MiLaboratories.PL.API.Util.Deprecated */ export const Util_Deprecated = new Util_Deprecated$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CommandAPI$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.CommandAPI", []); + } + create(value?: PartialMessage): CommandAPI { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI): CommandAPI { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + 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: CommandAPI, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message MiLaboratories.PL.API.CommandAPI + */ +export const CommandAPI = new CommandAPI$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CommandAPI_Command$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.CommandAPI.Command", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "payload", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } + create(value?: PartialMessage): CommandAPI_Command { + const message = globalThis.Object.create((this.messagePrototype!)); + message.name = ""; + message.payload = new Uint8Array(0); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI_Command): CommandAPI_Command { + 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 /* bytes payload */ 2: + message.payload = reader.bytes(); + 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: CommandAPI_Command, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* bytes payload = 2; */ + if (message.payload.length) + writer.tag(2, WireType.LengthDelimited).bytes(message.payload); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message MiLaboratories.PL.API.CommandAPI.Command + */ +export const CommandAPI_Command = new CommandAPI_Command$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CommandAPI_CmdError$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.CommandAPI.CmdError", [ + { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "code", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): CommandAPI_CmdError { + const message = globalThis.Object.create((this.messagePrototype!)); + message.message = ""; + message.code = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI_CmdError): CommandAPI_CmdError { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string message */ 1: + message.message = reader.string(); + break; + case /* string code */ 2: + message.code = 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: CommandAPI_CmdError, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string message = 1; */ + if (message.message !== "") + writer.tag(1, WireType.LengthDelimited).string(message.message); + /* string code = 2; */ + if (message.code !== "") + writer.tag(2, WireType.LengthDelimited).string(message.code); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message MiLaboratories.PL.API.CommandAPI.CmdError + */ +export const CommandAPI_CmdError = new CommandAPI_CmdError$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CommandAPI_CommandResult$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.CommandAPI.CommandResult", [ + { no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "errors", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CommandAPI_CmdError } + ]); + } + create(value?: PartialMessage): CommandAPI_CommandResult { + const message = globalThis.Object.create((this.messagePrototype!)); + message.data = new Uint8Array(0); + message.errors = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI_CommandResult): CommandAPI_CommandResult { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes data */ 1: + message.data = reader.bytes(); + break; + case /* repeated MiLaboratories.PL.API.CommandAPI.CmdError errors */ 2: + message.errors.push(CommandAPI_CmdError.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: CommandAPI_CommandResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bytes data = 1; */ + if (message.data.length) + writer.tag(1, WireType.LengthDelimited).bytes(message.data); + /* repeated MiLaboratories.PL.API.CommandAPI.CmdError errors = 2; */ + for (let i = 0; i < message.errors.length; i++) + CommandAPI_CmdError.internalBinaryWrite(message.errors[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 MiLaboratories.PL.API.CommandAPI.CommandResult + */ +export const CommandAPI_CommandResult = new CommandAPI_CommandResult$Type(); /** * @generated ServiceType for protobuf service MiLaboratories.PL.API.Platform */ @@ -20407,5 +20667,7 @@ export const Platform = new ServiceType("MiLaboratories.PL.API.Platform", [ { name: "ListUserResources", serverStreaming: true, options: {}, I: AuthAPI_ListUserResources_Request, O: AuthAPI_ListUserResources_Response }, { name: "ListResourceTypes", options: { "google.api.http": { get: "/v1/resource-types" } }, I: MiscAPI_ListResourceTypes_Request, O: MiscAPI_ListResourceTypes_Response }, { name: "Ping", options: { "google.api.http": { get: "/v1/ping" } }, I: MaintenanceAPI_Ping_Request, O: MaintenanceAPI_Ping_Response }, - { name: "License", options: { "google.api.http": { get: "/v1/license" } }, I: MaintenanceAPI_License_Request, O: MaintenanceAPI_License_Response } + { name: "License", options: { "google.api.http": { get: "/v1/license" } }, I: MaintenanceAPI_License_Request, O: MaintenanceAPI_License_Response }, + { name: "Query", options: { "google.api.http": { post: "/v1/command/query", body: "*" } }, I: CommandAPI_Command, O: CommandAPI_CommandResult }, + { name: "Mutation", options: { "google.api.http": { post: "/v1/command/mutation", body: "*" } }, I: CommandAPI_Command, O: CommandAPI_CommandResult } ]); diff --git a/lib/node/pl-client/src/proto-grpc/google/api/http.ts b/lib/node/pl-client/src/proto-grpc/google/api/http.ts index 5b28d5e649..abbf6eab57 100644 --- a/lib/node/pl-client/src/proto-grpc/google/api/http.ts +++ b/lib/node/pl-client/src/proto-grpc/google/api/http.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3) // tslint:disable // -// Copyright 2025 Google LLC +// Copyright 2015 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -54,7 +54,7 @@ export interface Http { fullyDecodeReservedExpansion: boolean; } /** - * gRPC Transcoding + * # gRPC Transcoding * * gRPC Transcoding is a feature for mapping between a gRPC method and one or * more HTTP REST endpoints. It allows developers to build a single API service @@ -95,8 +95,9 @@ export interface Http { * * This enables an HTTP REST to gRPC mapping as below: * - * - HTTP: `GET /v1/messages/123456` - * - gRPC: `GetMessage(name: "messages/123456")` + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` * * Any fields in the request message which are not bound by the path template * automatically become HTTP query parameters if there is no HTTP request body. @@ -120,9 +121,11 @@ export interface Http { * * This enables a HTTP JSON to RPC mapping as below: * - * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub: - * SubMessage(subfield: "foo"))` + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | + * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: + * "foo"))` * * Note that fields which are mapped to URL query parameters must have a * primitive type or a repeated primitive type or a non-repeated message type. @@ -152,8 +155,10 @@ export interface Http { * representation of the JSON in the request body is determined by * protos JSON encoding: * - * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })` + * HTTP | gRPC + * -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: + * "123456" message { text: "Hi!" })` * * The special name `*` can be used in the body mapping to define that * every field not bound by the path template should be mapped to the @@ -176,8 +181,10 @@ export interface Http { * * The following HTTP JSON to RPC mapping is enabled: * - * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")` + * HTTP | gRPC + * -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: + * "123456" text: "Hi!")` * * Note that when using `*` in the body mapping, it is not possible to * have HTTP parameters, as all fields not bound by the path end in @@ -205,32 +212,29 @@ export interface Http { * * This enables the following two alternative HTTP JSON to RPC mappings: * - * - HTTP: `GET /v1/messages/123456` - * - gRPC: `GetMessage(message_id: "123456")` + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: + * "123456")` * - * - HTTP: `GET /v1/users/me/messages/123456` - * - gRPC: `GetMessage(user_id: "me" message_id: "123456")` - * - * Rules for HTTP mapping + * ## Rules for HTTP mapping * * 1. Leaf request fields (recursive expansion nested messages in the request * message) are classified into three categories: * - Fields referred by the path template. They are passed via the URL path. - * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They - * are passed via the HTTP + * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP * request body. * - All other fields are passed via the URL query parameters, and the * parameter name is the field path in the request message. A repeated * field can be represented as multiple query parameters under the same * name. - * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL - * query parameter, all fields + * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields * are passed via URL path and HTTP request body. - * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP - * request body, all + * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all * fields are passed via URL path and URL query parameters. * - * Path template syntax + * ### Path template syntax * * Template = "/" Segments [ Verb ] ; * Segments = Segment { "/" Segment } ; @@ -269,7 +273,7 @@ export interface Http { * Document](https://developers.google.com/discovery/v1/reference/apis) as * `{+var}`. * - * Using gRPC API Service Configuration + * ## Using gRPC API Service Configuration * * gRPC API Service Configuration (service config) is a configuration language * for configuring a gRPC service to become a user-facing product. The @@ -284,14 +288,15 @@ export interface Http { * specified in the service config will override any matching transcoding * configuration in the proto. * - * The following example selects a gRPC method and applies an `HttpRule` to it: + * Example: * * http: * rules: + * # Selects a gRPC method and applies HttpRule to it. * - selector: example.v1.Messaging.GetMessage * get: /v1/messages/{message_id}/{sub.subfield} * - * Special notes + * ## Special notes * * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the * proto to JSON conversion must follow the [proto3 @@ -325,8 +330,7 @@ export interface HttpRule { /** * Selects a method to which this rule applies. * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax - * details. + * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. * * @generated from protobuf field: string selector = 1 */ diff --git a/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts b/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts index 3c4ff7f9eb..4425ce146b 100644 --- a/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts +++ b/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "google/rpc/code.proto" (package "google.rpc", syntax proto3) // tslint:disable // -// Copyright 2025 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ */ export enum Code { /** - * Not an error; returned on success. + * Not an error; returned on success * * HTTP Mapping: 200 OK * @@ -83,7 +83,7 @@ export enum Code { * Some requested entity (e.g., file or directory) was not found. * * Note to server developers: if a request is denied for an entire class - * of users, such as gradual feature rollout or undocumented allowlist, + * of users, such as gradual feature rollout or undocumented whitelist, * `NOT_FOUND` may be used. If a request is denied for some users within * a class of users, such as user-based access control, `PERMISSION_DENIED` * must be used. @@ -144,11 +144,11 @@ export enum Code { * Service implementors can use the following guidelines to decide * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: * (a) Use `UNAVAILABLE` if the client can retry just the failing call. - * (b) Use `ABORTED` if the client should retry at a higher level. For - * example, when a client-specified test-and-set fails, indicating the - * client should restart a read-modify-write sequence. + * (b) Use `ABORTED` if the client should retry at a higher level + * (e.g., when a client-specified test-and-set fails, indicating the + * client should restart a read-modify-write sequence). * (c) Use `FAILED_PRECONDITION` if the client should not retry until - * the system state has been explicitly fixed. For example, if an "rmdir" + * the system state has been explicitly fixed. E.g., if an "rmdir" * fails because the directory is non-empty, `FAILED_PRECONDITION` * should be returned since the client should not retry unless * the files are deleted from the directory. diff --git a/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts b/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts index 94b830f8b1..3066e19507 100644 --- a/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts +++ b/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "google/rpc/error_details.proto" (package "google.rpc", syntax proto3) // tslint:disable // -// Copyright 2025 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,73 +26,6 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { Duration } from "../protobuf/duration"; -/** - * Describes the cause of the error with structured details. - * - * Example of an error when contacting the "pubsub.googleapis.com" API when it - * is not enabled: - * - * { "reason": "API_DISABLED" - * "domain": "googleapis.com" - * "metadata": { - * "resource": "projects/123", - * "service": "pubsub.googleapis.com" - * } - * } - * - * This response indicates that the pubsub.googleapis.com API is not enabled. - * - * Example of an error that is returned when attempting to create a Spanner - * instance in a region that is out of stock: - * - * { "reason": "STOCKOUT" - * "domain": "spanner.googleapis.com", - * "metadata": { - * "availableRegions": "us-central1,us-east2" - * } - * } - * - * @generated from protobuf message google.rpc.ErrorInfo - */ -export interface ErrorInfo { - /** - * The reason of the error. This is a constant value that identifies the - * proximate cause of the error. Error reasons are unique within a particular - * domain of errors. This should be at most 63 characters and match a - * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents - * UPPER_SNAKE_CASE. - * - * @generated from protobuf field: string reason = 1 - */ - reason: string; - /** - * The logical grouping to which the "reason" belongs. The error domain - * is typically the registered service name of the tool or product that - * generates the error. Example: "pubsub.googleapis.com". If the error is - * generated by some common infrastructure, the error domain must be a - * globally unique value that identifies the infrastructure. For Google API - * infrastructure, the error domain is "googleapis.com". - * - * @generated from protobuf field: string domain = 2 - */ - domain: string; - /** - * Additional structured details about this error. - * - * Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should - * ideally be lowerCamelCase. Also, they must be limited to 64 characters in - * length. When identifying the current value of an exceeded limit, the units - * should be contained in the key, not the value. For example, rather than - * `{"instanceLimit": "100/request"}`, should be returned as, - * `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of - * instances that can be created in a single (batch) request. - * - * @generated from protobuf field: map metadata = 3 - */ - metadata: { - [key: string]: string; - }; -} /** * Describes when the clients can retry a failed request. Clients could ignore * the recommendation here or retry when this information is missing from error @@ -187,91 +120,71 @@ export interface QuotaFailure_Violation { * @generated from protobuf field: string description = 2 */ description: string; +} +/** + * Describes the cause of the error with structured details. + * + * Example of an error when contacting the "pubsub.googleapis.com" API when it + * is not enabled: + * + * { "reason": "API_DISABLED" + * "domain": "googleapis.com" + * "metadata": { + * "resource": "projects/123", + * "service": "pubsub.googleapis.com" + * } + * } + * + * This response indicates that the pubsub.googleapis.com API is not enabled. + * + * Example of an error that is returned when attempting to create a Spanner + * instance in a region that is out of stock: + * + * { "reason": "STOCKOUT" + * "domain": "spanner.googleapis.com", + * "metadata": { + * "availableRegions": "us-central1,us-east2" + * } + * } + * + * @generated from protobuf message google.rpc.ErrorInfo + */ +export interface ErrorInfo { /** - * The API Service from which the `QuotaFailure.Violation` orginates. In - * some cases, Quota issues originate from an API Service other than the one - * that was called. In other words, a dependency of the called API Service - * could be the cause of the `QuotaFailure`, and this field would have the - * dependency API service name. - * - * For example, if the called API is Kubernetes Engine API - * (container.googleapis.com), and a quota violation occurs in the - * Kubernetes Engine API itself, this field would be - * "container.googleapis.com". On the other hand, if the quota violation - * occurs when the Kubernetes Engine API creates VMs in the Compute Engine - * API (compute.googleapis.com), this field would be - * "compute.googleapis.com". - * - * @generated from protobuf field: string api_service = 3 - */ - apiService: string; - /** - * The metric of the violated quota. A quota metric is a named counter to - * measure usage, such as API requests or CPUs. When an activity occurs in a - * service, such as Virtual Machine allocation, one or more quota metrics - * may be affected. - * - * For example, "compute.googleapis.com/cpus_per_vm_family", - * "storage.googleapis.com/internet_egress_bandwidth". + * The reason of the error. This is a constant value that identifies the + * proximate cause of the error. Error reasons are unique within a particular + * domain of errors. This should be at most 63 characters and match + * /[A-Z0-9_]+/. * - * @generated from protobuf field: string quota_metric = 4 + * @generated from protobuf field: string reason = 1 */ - quotaMetric: string; + reason: string; /** - * The id of the violated quota. Also know as "limit name", this is the - * unique identifier of a quota in the context of an API service. - * - * For example, "CPUS-PER-VM-FAMILY-per-project-region". + * The logical grouping to which the "reason" belongs. The error domain + * is typically the registered service name of the tool or product that + * generates the error. Example: "pubsub.googleapis.com". If the error is + * generated by some common infrastructure, the error domain must be a + * globally unique value that identifies the infrastructure. For Google API + * infrastructure, the error domain is "googleapis.com". * - * @generated from protobuf field: string quota_id = 5 + * @generated from protobuf field: string domain = 2 */ - quotaId: string; + domain: string; /** - * The dimensions of the violated quota. Every non-global quota is enforced - * on a set of dimensions. While quota metric defines what to count, the - * dimensions specify for what aspects the counter should be increased. - * - * For example, the quota "CPUs per region per VM family" enforces a limit - * on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions - * "region" and "vm_family". And if the violation occurred in region - * "us-central1" and for VM family "n1", the quota_dimensions would be, - * - * { - * "region": "us-central1", - * "vm_family": "n1", - * } + * Additional structured details about this error. * - * When a quota is enforced globally, the quota_dimensions would always be - * empty. + * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in + * length. When identifying the current value of an exceeded limit, the units + * should be contained in the key, not the value. For example, rather than + * {"instanceLimit": "100/request"}, should be returned as, + * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of + * instances that can be created in a single (batch) request. * - * @generated from protobuf field: map quota_dimensions = 6 + * @generated from protobuf field: map metadata = 3 */ - quotaDimensions: { + metadata: { [key: string]: string; }; - /** - * The enforced quota value at the time of the `QuotaFailure`. - * - * For example, if the enforced quota value at the time of the - * `QuotaFailure` on the number of CPUs is "10", then the value of this - * field would reflect this quantity. - * - * @generated from protobuf field: int64 quota_value = 7 - */ - quotaValue: bigint; - /** - * The new quota value being rolled out at the time of the violation. At the - * completion of the rollout, this value will be enforced in place of - * quota_value. If no rollout is in progress at the time of the violation, - * this field is not set. - * - * For example, if at the time of the violation a rollout is in progress - * changing the number of CPUs quota from 10 to 20, 20 would be the value of - * this field. - * - * @generated from protobuf field: optional int64 future_quota_value = 8 - */ - futureQuotaValue?: bigint; } /** * Describes what preconditions have failed. @@ -343,43 +256,9 @@ export interface BadRequest { */ export interface BadRequest_FieldViolation { /** - * A path that leads to a field in the request body. The value will be a + * A path leading to a field in the request body. The value will be a * sequence of dot-separated identifiers that identify a protocol buffer - * field. - * - * Consider the following: - * - * message CreateContactRequest { - * message EmailAddress { - * enum Type { - * TYPE_UNSPECIFIED = 0; - * HOME = 1; - * WORK = 2; - * } - * - * optional string email = 1; - * repeated EmailType type = 2; - * } - * - * string full_name = 1; - * repeated EmailAddress email_addresses = 2; - * } - * - * In this example, in proto `field` could take one of the following values: - * - * * `full_name` for a violation in the `full_name` value - * * `email_addresses[1].email` for a violation in the `email` field of the - * first `email_addresses` message - * * `email_addresses[3].type[2]` for a violation in the second `type` - * value in the third `email_addresses` message. - * - * In JSON, the same values are represented as: - * - * * `fullName` for a violation in the `fullName` value - * * `emailAddresses[1].email` for a violation in the `email` field of the - * first `emailAddresses` message - * * `emailAddresses[3].type[2]` for a violation in the second `type` - * value in the third `emailAddresses` message. + * field. E.g., "field_violations.field" would identify this field. * * @generated from protobuf field: string field = 1 */ @@ -390,24 +269,6 @@ export interface BadRequest_FieldViolation { * @generated from protobuf field: string description = 2 */ description: string; - /** - * The reason of the field-level error. This is a constant value that - * identifies the proximate cause of the field-level error. It should - * uniquely identify the type of the FieldViolation within the scope of the - * google.rpc.ErrorInfo.domain. This should be at most 63 - * characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, - * which represents UPPER_SNAKE_CASE. - * - * @generated from protobuf field: string reason = 3 - */ - reason: string; - /** - * Provides a localized error message for field-level errors that is safe to - * return to the API consumer. - * - * @generated from protobuf field: google.rpc.LocalizedMessage localized_message = 4 - */ - localizedMessage?: LocalizedMessage; } /** * Contains metadata about the request that clients can attach when filing a bug @@ -448,8 +309,7 @@ export interface ResourceInfo { /** * The name of the resource being accessed. For example, a shared calendar * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - * error is - * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. + * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. * * @generated from protobuf field: string resource_name = 2 */ @@ -516,7 +376,7 @@ export interface Help_Link { export interface LocalizedMessage { /** * The locale used following the specification defined at - * https://www.rfc-editor.org/rfc/bcp/bcp47.txt. + * http://www.rfc-editor.org/rfc/bcp/bcp47.txt. * Examples are: "en-US", "fr-CH", "es-MX" * * @generated from protobuf field: string locale = 1 @@ -530,85 +390,6 @@ export interface LocalizedMessage { message: string; } // @generated message type with reflection information, may provide speed optimized methods -class ErrorInfo$Type extends MessageType { - constructor() { - super("google.rpc.ErrorInfo", [ - { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "domain", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } - ]); - } - create(value?: PartialMessage): ErrorInfo { - const message = globalThis.Object.create((this.messagePrototype!)); - message.reason = ""; - message.domain = ""; - message.metadata = {}; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ErrorInfo): ErrorInfo { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string reason */ 1: - message.reason = reader.string(); - break; - case /* string domain */ 2: - message.domain = reader.string(); - break; - case /* map metadata */ 3: - this.binaryReadMap3(message.metadata, reader, 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; - } - private binaryReadMap3(map: ErrorInfo["metadata"], reader: IBinaryReader, options: BinaryReadOptions): void { - let len = reader.uint32(), end = reader.pos + len, key: keyof ErrorInfo["metadata"] | undefined, val: ErrorInfo["metadata"][any] | undefined; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - key = reader.string(); - break; - case 2: - val = reader.string(); - break; - default: throw new globalThis.Error("unknown map entry field for google.rpc.ErrorInfo.metadata"); - } - } - map[key ?? ""] = val ?? ""; - } - internalBinaryWrite(message: ErrorInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string reason = 1; */ - if (message.reason !== "") - writer.tag(1, WireType.LengthDelimited).string(message.reason); - /* string domain = 2; */ - if (message.domain !== "") - writer.tag(2, WireType.LengthDelimited).string(message.domain); - /* map metadata = 3; */ - for (let k of globalThis.Object.keys(message.metadata)) - writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.rpc.ErrorInfo - */ -export const ErrorInfo = new ErrorInfo$Type(); -// @generated message type with reflection information, may provide speed optimized methods class RetryInfo$Type extends MessageType { constructor() { super("google.rpc.RetryInfo", [ @@ -761,24 +542,13 @@ class QuotaFailure_Violation$Type extends MessageType { constructor() { super("google.rpc.QuotaFailure.Violation", [ { no: 1, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "api_service", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "quota_metric", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 5, name: "quota_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 6, name: "quota_dimensions", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }, - { no: 7, name: "quota_value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 8, name: "future_quota_value", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): QuotaFailure_Violation { const message = globalThis.Object.create((this.messagePrototype!)); message.subject = ""; message.description = ""; - message.apiService = ""; - message.quotaMetric = ""; - message.quotaId = ""; - message.quotaDimensions = {}; - message.quotaValue = 0n; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -794,23 +564,65 @@ class QuotaFailure_Violation$Type extends MessageType { case /* string description */ 2: message.description = reader.string(); break; - case /* string api_service */ 3: - message.apiService = reader.string(); - break; - case /* string quota_metric */ 4: - message.quotaMetric = reader.string(); - break; - case /* string quota_id */ 5: - message.quotaId = reader.string(); - break; - case /* map quota_dimensions */ 6: - this.binaryReadMap6(message.quotaDimensions, reader, options); + 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: QuotaFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string subject = 1; */ + if (message.subject !== "") + writer.tag(1, WireType.LengthDelimited).string(message.subject); + /* string description = 2; */ + if (message.description !== "") + writer.tag(2, WireType.LengthDelimited).string(message.description); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.rpc.QuotaFailure.Violation + */ +export const QuotaFailure_Violation = new QuotaFailure_Violation$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ErrorInfo$Type extends MessageType { + constructor() { + super("google.rpc.ErrorInfo", [ + { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "domain", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } + ]); + } + create(value?: PartialMessage): ErrorInfo { + const message = globalThis.Object.create((this.messagePrototype!)); + message.reason = ""; + message.domain = ""; + message.metadata = {}; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ErrorInfo): ErrorInfo { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string reason */ 1: + message.reason = reader.string(); break; - case /* int64 quota_value */ 7: - message.quotaValue = reader.int64().toBigInt(); + case /* string domain */ 2: + message.domain = reader.string(); break; - case /* optional int64 future_quota_value */ 8: - message.futureQuotaValue = reader.int64().toBigInt(); + case /* map metadata */ 3: + this.binaryReadMap3(message.metadata, reader, options); break; default: let u = options.readUnknownField; @@ -823,8 +635,8 @@ class QuotaFailure_Violation$Type extends MessageType { } return message; } - private binaryReadMap6(map: QuotaFailure_Violation["quotaDimensions"], reader: IBinaryReader, options: BinaryReadOptions): void { - let len = reader.uint32(), end = reader.pos + len, key: keyof QuotaFailure_Violation["quotaDimensions"] | undefined, val: QuotaFailure_Violation["quotaDimensions"][any] | undefined; + private binaryReadMap3(map: ErrorInfo["metadata"], reader: IBinaryReader, options: BinaryReadOptions): void { + let len = reader.uint32(), end = reader.pos + len, key: keyof ErrorInfo["metadata"] | undefined, val: ErrorInfo["metadata"][any] | undefined; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -834,36 +646,21 @@ class QuotaFailure_Violation$Type extends MessageType { case 2: val = reader.string(); break; - default: throw new globalThis.Error("unknown map entry field for google.rpc.QuotaFailure.Violation.quota_dimensions"); + default: throw new globalThis.Error("unknown map entry field for google.rpc.ErrorInfo.metadata"); } } map[key ?? ""] = val ?? ""; } - internalBinaryWrite(message: QuotaFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string subject = 1; */ - if (message.subject !== "") - writer.tag(1, WireType.LengthDelimited).string(message.subject); - /* string description = 2; */ - if (message.description !== "") - writer.tag(2, WireType.LengthDelimited).string(message.description); - /* string api_service = 3; */ - if (message.apiService !== "") - writer.tag(3, WireType.LengthDelimited).string(message.apiService); - /* string quota_metric = 4; */ - if (message.quotaMetric !== "") - writer.tag(4, WireType.LengthDelimited).string(message.quotaMetric); - /* string quota_id = 5; */ - if (message.quotaId !== "") - writer.tag(5, WireType.LengthDelimited).string(message.quotaId); - /* map quota_dimensions = 6; */ - for (let k of globalThis.Object.keys(message.quotaDimensions)) - writer.tag(6, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.quotaDimensions[k]).join(); - /* int64 quota_value = 7; */ - if (message.quotaValue !== 0n) - writer.tag(7, WireType.Varint).int64(message.quotaValue); - /* optional int64 future_quota_value = 8; */ - if (message.futureQuotaValue !== undefined) - writer.tag(8, WireType.Varint).int64(message.futureQuotaValue); + internalBinaryWrite(message: ErrorInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string reason = 1; */ + if (message.reason !== "") + writer.tag(1, WireType.LengthDelimited).string(message.reason); + /* string domain = 2; */ + if (message.domain !== "") + writer.tag(2, WireType.LengthDelimited).string(message.domain); + /* map metadata = 3; */ + for (let k of globalThis.Object.keys(message.metadata)) + writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -871,9 +668,9 @@ class QuotaFailure_Violation$Type extends MessageType { } } /** - * @generated MessageType for protobuf message google.rpc.QuotaFailure.Violation + * @generated MessageType for protobuf message google.rpc.ErrorInfo */ -export const QuotaFailure_Violation = new QuotaFailure_Violation$Type(); +export const ErrorInfo = new ErrorInfo$Type(); // @generated message type with reflection information, may provide speed optimized methods class PreconditionFailure$Type extends MessageType { constructor() { @@ -1036,16 +833,13 @@ class BadRequest_FieldViolation$Type extends MessageType LocalizedMessage } + { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): BadRequest_FieldViolation { const message = globalThis.Object.create((this.messagePrototype!)); message.field = ""; message.description = ""; - message.reason = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -1061,12 +855,6 @@ class BadRequest_FieldViolation$Type extends MessageType Date: Sat, 13 Jun 2026 22:33:27 +0200 Subject: [PATCH 2/4] [MILAB-XXXX]: PF-0 fix: restore 4 unrelated google binding files to canonical state Revert google/rpc/error_details.ts, google/api/http.ts, google/rpc/code.ts, google/rpc/status.ts to their pre-PF-0 (HEAD~1) content. The previous commit accidentally regenerated them from a different cached googleapis .proto vintage (Copyright 2025 vs 2020), violating PF-0's "pure codegen / clean base" requirement. Also add a TRACKING comment to api.proto's Command bus RPCs noting that once PL-0 lands on pl/main, pnpm update-proto should be re-run to confirm the hand-written proto matches the canonical upstream version. --- .../proto/plapi/plapiproto/api.proto | 5 + .../src/proto-grpc/google/api/http.ts | 62 ++- .../src/proto-grpc/google/rpc/code.ts | 14 +- .../proto-grpc/google/rpc/error_details.ts | 482 +++++++++++++----- .../src/proto-grpc/google/rpc/status.ts | 8 +- 5 files changed, 396 insertions(+), 175 deletions(-) diff --git a/lib/node/pl-client/proto/plapi/plapiproto/api.proto b/lib/node/pl-client/proto/plapi/plapiproto/api.proto index 69be70f5de..3ab0285a53 100644 --- a/lib/node/pl-client/proto/plapi/plapiproto/api.proto +++ b/lib/node/pl-client/proto/plapi/plapiproto/api.proto @@ -279,6 +279,11 @@ service Platform { // // Command bus // + // TRACKING: These RPCs were hand-written because PL-0 is not yet merged + // upstream in github.com/milaboratory/pl. Once PL-0 lands on pl/main, + // re-run `pnpm update-proto` (sync-proto.sh) to pull the canonical proto + // and verify this hand-written version byte-matches it — guards against + // silent divergence of the frozen contract. rpc Query(CommandAPI.Command) returns (CommandAPI.CommandResult) { option (google.api.http) = { post: "/v1/command/query" diff --git a/lib/node/pl-client/src/proto-grpc/google/api/http.ts b/lib/node/pl-client/src/proto-grpc/google/api/http.ts index abbf6eab57..5b28d5e649 100644 --- a/lib/node/pl-client/src/proto-grpc/google/api/http.ts +++ b/lib/node/pl-client/src/proto-grpc/google/api/http.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3) // tslint:disable // -// Copyright 2015 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -54,7 +54,7 @@ export interface Http { fullyDecodeReservedExpansion: boolean; } /** - * # gRPC Transcoding + * gRPC Transcoding * * gRPC Transcoding is a feature for mapping between a gRPC method and one or * more HTTP REST endpoints. It allows developers to build a single API service @@ -95,9 +95,8 @@ export interface Http { * * This enables an HTTP REST to gRPC mapping as below: * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` + * - HTTP: `GET /v1/messages/123456` + * - gRPC: `GetMessage(name: "messages/123456")` * * Any fields in the request message which are not bound by the path template * automatically become HTTP query parameters if there is no HTTP request body. @@ -121,11 +120,9 @@ export interface Http { * * This enables a HTTP JSON to RPC mapping as below: * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | - * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: - * "foo"))` + * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` + * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub: + * SubMessage(subfield: "foo"))` * * Note that fields which are mapped to URL query parameters must have a * primitive type or a repeated primitive type or a non-repeated message type. @@ -155,10 +152,8 @@ export interface Http { * representation of the JSON in the request body is determined by * protos JSON encoding: * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" message { text: "Hi!" })` + * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` + * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })` * * The special name `*` can be used in the body mapping to define that * every field not bound by the path template should be mapped to the @@ -181,10 +176,8 @@ export interface Http { * * The following HTTP JSON to RPC mapping is enabled: * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` + * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` + * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")` * * Note that when using `*` in the body mapping, it is not possible to * have HTTP parameters, as all fields not bound by the path end in @@ -212,29 +205,32 @@ export interface Http { * * This enables the following two alternative HTTP JSON to RPC mappings: * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: - * "123456")` + * - HTTP: `GET /v1/messages/123456` + * - gRPC: `GetMessage(message_id: "123456")` * - * ## Rules for HTTP mapping + * - HTTP: `GET /v1/users/me/messages/123456` + * - gRPC: `GetMessage(user_id: "me" message_id: "123456")` + * + * Rules for HTTP mapping * * 1. Leaf request fields (recursive expansion nested messages in the request * message) are classified into three categories: * - Fields referred by the path template. They are passed via the URL path. - * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP + * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They + * are passed via the HTTP * request body. * - All other fields are passed via the URL query parameters, and the * parameter name is the field path in the request message. A repeated * field can be represented as multiple query parameters under the same * name. - * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields + * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL + * query parameter, all fields * are passed via URL path and HTTP request body. - * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all + * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP + * request body, all * fields are passed via URL path and URL query parameters. * - * ### Path template syntax + * Path template syntax * * Template = "/" Segments [ Verb ] ; * Segments = Segment { "/" Segment } ; @@ -273,7 +269,7 @@ export interface Http { * Document](https://developers.google.com/discovery/v1/reference/apis) as * `{+var}`. * - * ## Using gRPC API Service Configuration + * Using gRPC API Service Configuration * * gRPC API Service Configuration (service config) is a configuration language * for configuring a gRPC service to become a user-facing product. The @@ -288,15 +284,14 @@ export interface Http { * specified in the service config will override any matching transcoding * configuration in the proto. * - * Example: + * The following example selects a gRPC method and applies an `HttpRule` to it: * * http: * rules: - * # Selects a gRPC method and applies HttpRule to it. * - selector: example.v1.Messaging.GetMessage * get: /v1/messages/{message_id}/{sub.subfield} * - * ## Special notes + * Special notes * * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the * proto to JSON conversion must follow the [proto3 @@ -330,7 +325,8 @@ export interface HttpRule { /** * Selects a method to which this rule applies. * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + * Refer to [selector][google.api.DocumentationRule.selector] for syntax + * details. * * @generated from protobuf field: string selector = 1 */ diff --git a/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts b/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts index 4425ce146b..3c4ff7f9eb 100644 --- a/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts +++ b/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "google/rpc/code.proto" (package "google.rpc", syntax proto3) // tslint:disable // -// Copyright 2020 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ */ export enum Code { /** - * Not an error; returned on success + * Not an error; returned on success. * * HTTP Mapping: 200 OK * @@ -83,7 +83,7 @@ export enum Code { * Some requested entity (e.g., file or directory) was not found. * * Note to server developers: if a request is denied for an entire class - * of users, such as gradual feature rollout or undocumented whitelist, + * of users, such as gradual feature rollout or undocumented allowlist, * `NOT_FOUND` may be used. If a request is denied for some users within * a class of users, such as user-based access control, `PERMISSION_DENIED` * must be used. @@ -144,11 +144,11 @@ export enum Code { * Service implementors can use the following guidelines to decide * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: * (a) Use `UNAVAILABLE` if the client can retry just the failing call. - * (b) Use `ABORTED` if the client should retry at a higher level - * (e.g., when a client-specified test-and-set fails, indicating the - * client should restart a read-modify-write sequence). + * (b) Use `ABORTED` if the client should retry at a higher level. For + * example, when a client-specified test-and-set fails, indicating the + * client should restart a read-modify-write sequence. * (c) Use `FAILED_PRECONDITION` if the client should not retry until - * the system state has been explicitly fixed. E.g., if an "rmdir" + * the system state has been explicitly fixed. For example, if an "rmdir" * fails because the directory is non-empty, `FAILED_PRECONDITION` * should be returned since the client should not retry unless * the files are deleted from the directory. diff --git a/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts b/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts index 3066e19507..94b830f8b1 100644 --- a/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts +++ b/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "google/rpc/error_details.proto" (package "google.rpc", syntax proto3) // tslint:disable // -// Copyright 2020 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,6 +26,73 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { Duration } from "../protobuf/duration"; +/** + * Describes the cause of the error with structured details. + * + * Example of an error when contacting the "pubsub.googleapis.com" API when it + * is not enabled: + * + * { "reason": "API_DISABLED" + * "domain": "googleapis.com" + * "metadata": { + * "resource": "projects/123", + * "service": "pubsub.googleapis.com" + * } + * } + * + * This response indicates that the pubsub.googleapis.com API is not enabled. + * + * Example of an error that is returned when attempting to create a Spanner + * instance in a region that is out of stock: + * + * { "reason": "STOCKOUT" + * "domain": "spanner.googleapis.com", + * "metadata": { + * "availableRegions": "us-central1,us-east2" + * } + * } + * + * @generated from protobuf message google.rpc.ErrorInfo + */ +export interface ErrorInfo { + /** + * The reason of the error. This is a constant value that identifies the + * proximate cause of the error. Error reasons are unique within a particular + * domain of errors. This should be at most 63 characters and match a + * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents + * UPPER_SNAKE_CASE. + * + * @generated from protobuf field: string reason = 1 + */ + reason: string; + /** + * The logical grouping to which the "reason" belongs. The error domain + * is typically the registered service name of the tool or product that + * generates the error. Example: "pubsub.googleapis.com". If the error is + * generated by some common infrastructure, the error domain must be a + * globally unique value that identifies the infrastructure. For Google API + * infrastructure, the error domain is "googleapis.com". + * + * @generated from protobuf field: string domain = 2 + */ + domain: string; + /** + * Additional structured details about this error. + * + * Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should + * ideally be lowerCamelCase. Also, they must be limited to 64 characters in + * length. When identifying the current value of an exceeded limit, the units + * should be contained in the key, not the value. For example, rather than + * `{"instanceLimit": "100/request"}`, should be returned as, + * `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of + * instances that can be created in a single (batch) request. + * + * @generated from protobuf field: map metadata = 3 + */ + metadata: { + [key: string]: string; + }; +} /** * Describes when the clients can retry a failed request. Clients could ignore * the recommendation here or retry when this information is missing from error @@ -120,71 +187,91 @@ export interface QuotaFailure_Violation { * @generated from protobuf field: string description = 2 */ description: string; -} -/** - * Describes the cause of the error with structured details. - * - * Example of an error when contacting the "pubsub.googleapis.com" API when it - * is not enabled: - * - * { "reason": "API_DISABLED" - * "domain": "googleapis.com" - * "metadata": { - * "resource": "projects/123", - * "service": "pubsub.googleapis.com" - * } - * } - * - * This response indicates that the pubsub.googleapis.com API is not enabled. - * - * Example of an error that is returned when attempting to create a Spanner - * instance in a region that is out of stock: - * - * { "reason": "STOCKOUT" - * "domain": "spanner.googleapis.com", - * "metadata": { - * "availableRegions": "us-central1,us-east2" - * } - * } - * - * @generated from protobuf message google.rpc.ErrorInfo - */ -export interface ErrorInfo { /** - * The reason of the error. This is a constant value that identifies the - * proximate cause of the error. Error reasons are unique within a particular - * domain of errors. This should be at most 63 characters and match - * /[A-Z0-9_]+/. + * The API Service from which the `QuotaFailure.Violation` orginates. In + * some cases, Quota issues originate from an API Service other than the one + * that was called. In other words, a dependency of the called API Service + * could be the cause of the `QuotaFailure`, and this field would have the + * dependency API service name. * - * @generated from protobuf field: string reason = 1 + * For example, if the called API is Kubernetes Engine API + * (container.googleapis.com), and a quota violation occurs in the + * Kubernetes Engine API itself, this field would be + * "container.googleapis.com". On the other hand, if the quota violation + * occurs when the Kubernetes Engine API creates VMs in the Compute Engine + * API (compute.googleapis.com), this field would be + * "compute.googleapis.com". + * + * @generated from protobuf field: string api_service = 3 */ - reason: string; + apiService: string; /** - * The logical grouping to which the "reason" belongs. The error domain - * is typically the registered service name of the tool or product that - * generates the error. Example: "pubsub.googleapis.com". If the error is - * generated by some common infrastructure, the error domain must be a - * globally unique value that identifies the infrastructure. For Google API - * infrastructure, the error domain is "googleapis.com". + * The metric of the violated quota. A quota metric is a named counter to + * measure usage, such as API requests or CPUs. When an activity occurs in a + * service, such as Virtual Machine allocation, one or more quota metrics + * may be affected. * - * @generated from protobuf field: string domain = 2 + * For example, "compute.googleapis.com/cpus_per_vm_family", + * "storage.googleapis.com/internet_egress_bandwidth". + * + * @generated from protobuf field: string quota_metric = 4 */ - domain: string; + quotaMetric: string; /** - * Additional structured details about this error. + * The id of the violated quota. Also know as "limit name", this is the + * unique identifier of a quota in the context of an API service. * - * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in - * length. When identifying the current value of an exceeded limit, the units - * should be contained in the key, not the value. For example, rather than - * {"instanceLimit": "100/request"}, should be returned as, - * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of - * instances that can be created in a single (batch) request. + * For example, "CPUS-PER-VM-FAMILY-per-project-region". * - * @generated from protobuf field: map metadata = 3 + * @generated from protobuf field: string quota_id = 5 */ - metadata: { + quotaId: string; + /** + * The dimensions of the violated quota. Every non-global quota is enforced + * on a set of dimensions. While quota metric defines what to count, the + * dimensions specify for what aspects the counter should be increased. + * + * For example, the quota "CPUs per region per VM family" enforces a limit + * on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions + * "region" and "vm_family". And if the violation occurred in region + * "us-central1" and for VM family "n1", the quota_dimensions would be, + * + * { + * "region": "us-central1", + * "vm_family": "n1", + * } + * + * When a quota is enforced globally, the quota_dimensions would always be + * empty. + * + * @generated from protobuf field: map quota_dimensions = 6 + */ + quotaDimensions: { [key: string]: string; }; + /** + * The enforced quota value at the time of the `QuotaFailure`. + * + * For example, if the enforced quota value at the time of the + * `QuotaFailure` on the number of CPUs is "10", then the value of this + * field would reflect this quantity. + * + * @generated from protobuf field: int64 quota_value = 7 + */ + quotaValue: bigint; + /** + * The new quota value being rolled out at the time of the violation. At the + * completion of the rollout, this value will be enforced in place of + * quota_value. If no rollout is in progress at the time of the violation, + * this field is not set. + * + * For example, if at the time of the violation a rollout is in progress + * changing the number of CPUs quota from 10 to 20, 20 would be the value of + * this field. + * + * @generated from protobuf field: optional int64 future_quota_value = 8 + */ + futureQuotaValue?: bigint; } /** * Describes what preconditions have failed. @@ -256,9 +343,43 @@ export interface BadRequest { */ export interface BadRequest_FieldViolation { /** - * A path leading to a field in the request body. The value will be a + * A path that leads to a field in the request body. The value will be a * sequence of dot-separated identifiers that identify a protocol buffer - * field. E.g., "field_violations.field" would identify this field. + * field. + * + * Consider the following: + * + * message CreateContactRequest { + * message EmailAddress { + * enum Type { + * TYPE_UNSPECIFIED = 0; + * HOME = 1; + * WORK = 2; + * } + * + * optional string email = 1; + * repeated EmailType type = 2; + * } + * + * string full_name = 1; + * repeated EmailAddress email_addresses = 2; + * } + * + * In this example, in proto `field` could take one of the following values: + * + * * `full_name` for a violation in the `full_name` value + * * `email_addresses[1].email` for a violation in the `email` field of the + * first `email_addresses` message + * * `email_addresses[3].type[2]` for a violation in the second `type` + * value in the third `email_addresses` message. + * + * In JSON, the same values are represented as: + * + * * `fullName` for a violation in the `fullName` value + * * `emailAddresses[1].email` for a violation in the `email` field of the + * first `emailAddresses` message + * * `emailAddresses[3].type[2]` for a violation in the second `type` + * value in the third `emailAddresses` message. * * @generated from protobuf field: string field = 1 */ @@ -269,6 +390,24 @@ export interface BadRequest_FieldViolation { * @generated from protobuf field: string description = 2 */ description: string; + /** + * The reason of the field-level error. This is a constant value that + * identifies the proximate cause of the field-level error. It should + * uniquely identify the type of the FieldViolation within the scope of the + * google.rpc.ErrorInfo.domain. This should be at most 63 + * characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, + * which represents UPPER_SNAKE_CASE. + * + * @generated from protobuf field: string reason = 3 + */ + reason: string; + /** + * Provides a localized error message for field-level errors that is safe to + * return to the API consumer. + * + * @generated from protobuf field: google.rpc.LocalizedMessage localized_message = 4 + */ + localizedMessage?: LocalizedMessage; } /** * Contains metadata about the request that clients can attach when filing a bug @@ -309,7 +448,8 @@ export interface ResourceInfo { /** * The name of the resource being accessed. For example, a shared calendar * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. + * error is + * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. * * @generated from protobuf field: string resource_name = 2 */ @@ -376,7 +516,7 @@ export interface Help_Link { export interface LocalizedMessage { /** * The locale used following the specification defined at - * http://www.rfc-editor.org/rfc/bcp/bcp47.txt. + * https://www.rfc-editor.org/rfc/bcp/bcp47.txt. * Examples are: "en-US", "fr-CH", "es-MX" * * @generated from protobuf field: string locale = 1 @@ -390,6 +530,85 @@ export interface LocalizedMessage { message: string; } // @generated message type with reflection information, may provide speed optimized methods +class ErrorInfo$Type extends MessageType { + constructor() { + super("google.rpc.ErrorInfo", [ + { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "domain", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } + ]); + } + create(value?: PartialMessage): ErrorInfo { + const message = globalThis.Object.create((this.messagePrototype!)); + message.reason = ""; + message.domain = ""; + message.metadata = {}; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ErrorInfo): ErrorInfo { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string reason */ 1: + message.reason = reader.string(); + break; + case /* string domain */ 2: + message.domain = reader.string(); + break; + case /* map metadata */ 3: + this.binaryReadMap3(message.metadata, reader, 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; + } + private binaryReadMap3(map: ErrorInfo["metadata"], reader: IBinaryReader, options: BinaryReadOptions): void { + let len = reader.uint32(), end = reader.pos + len, key: keyof ErrorInfo["metadata"] | undefined, val: ErrorInfo["metadata"][any] | undefined; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + key = reader.string(); + break; + case 2: + val = reader.string(); + break; + default: throw new globalThis.Error("unknown map entry field for google.rpc.ErrorInfo.metadata"); + } + } + map[key ?? ""] = val ?? ""; + } + internalBinaryWrite(message: ErrorInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string reason = 1; */ + if (message.reason !== "") + writer.tag(1, WireType.LengthDelimited).string(message.reason); + /* string domain = 2; */ + if (message.domain !== "") + writer.tag(2, WireType.LengthDelimited).string(message.domain); + /* map metadata = 3; */ + for (let k of globalThis.Object.keys(message.metadata)) + writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.rpc.ErrorInfo + */ +export const ErrorInfo = new ErrorInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods class RetryInfo$Type extends MessageType { constructor() { super("google.rpc.RetryInfo", [ @@ -542,13 +761,24 @@ class QuotaFailure_Violation$Type extends MessageType { constructor() { super("google.rpc.QuotaFailure.Violation", [ { no: 1, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "api_service", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "quota_metric", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "quota_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "quota_dimensions", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }, + { no: 7, name: "quota_value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 8, name: "future_quota_value", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } ]); } create(value?: PartialMessage): QuotaFailure_Violation { const message = globalThis.Object.create((this.messagePrototype!)); message.subject = ""; message.description = ""; + message.apiService = ""; + message.quotaMetric = ""; + message.quotaId = ""; + message.quotaDimensions = {}; + message.quotaValue = 0n; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -564,65 +794,23 @@ class QuotaFailure_Violation$Type extends MessageType { case /* string description */ 2: message.description = 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: QuotaFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string subject = 1; */ - if (message.subject !== "") - writer.tag(1, WireType.LengthDelimited).string(message.subject); - /* string description = 2; */ - if (message.description !== "") - writer.tag(2, WireType.LengthDelimited).string(message.description); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.rpc.QuotaFailure.Violation - */ -export const QuotaFailure_Violation = new QuotaFailure_Violation$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ErrorInfo$Type extends MessageType { - constructor() { - super("google.rpc.ErrorInfo", [ - { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "domain", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } - ]); - } - create(value?: PartialMessage): ErrorInfo { - const message = globalThis.Object.create((this.messagePrototype!)); - message.reason = ""; - message.domain = ""; - message.metadata = {}; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ErrorInfo): ErrorInfo { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string reason */ 1: - message.reason = reader.string(); + case /* string api_service */ 3: + message.apiService = reader.string(); break; - case /* string domain */ 2: - message.domain = reader.string(); + case /* string quota_metric */ 4: + message.quotaMetric = reader.string(); break; - case /* map metadata */ 3: - this.binaryReadMap3(message.metadata, reader, options); + case /* string quota_id */ 5: + message.quotaId = reader.string(); + break; + case /* map quota_dimensions */ 6: + this.binaryReadMap6(message.quotaDimensions, reader, options); + break; + case /* int64 quota_value */ 7: + message.quotaValue = reader.int64().toBigInt(); + break; + case /* optional int64 future_quota_value */ 8: + message.futureQuotaValue = reader.int64().toBigInt(); break; default: let u = options.readUnknownField; @@ -635,8 +823,8 @@ class ErrorInfo$Type extends MessageType { } return message; } - private binaryReadMap3(map: ErrorInfo["metadata"], reader: IBinaryReader, options: BinaryReadOptions): void { - let len = reader.uint32(), end = reader.pos + len, key: keyof ErrorInfo["metadata"] | undefined, val: ErrorInfo["metadata"][any] | undefined; + private binaryReadMap6(map: QuotaFailure_Violation["quotaDimensions"], reader: IBinaryReader, options: BinaryReadOptions): void { + let len = reader.uint32(), end = reader.pos + len, key: keyof QuotaFailure_Violation["quotaDimensions"] | undefined, val: QuotaFailure_Violation["quotaDimensions"][any] | undefined; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -646,21 +834,36 @@ class ErrorInfo$Type extends MessageType { case 2: val = reader.string(); break; - default: throw new globalThis.Error("unknown map entry field for google.rpc.ErrorInfo.metadata"); + default: throw new globalThis.Error("unknown map entry field for google.rpc.QuotaFailure.Violation.quota_dimensions"); } } map[key ?? ""] = val ?? ""; } - internalBinaryWrite(message: ErrorInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string reason = 1; */ - if (message.reason !== "") - writer.tag(1, WireType.LengthDelimited).string(message.reason); - /* string domain = 2; */ - if (message.domain !== "") - writer.tag(2, WireType.LengthDelimited).string(message.domain); - /* map metadata = 3; */ - for (let k of globalThis.Object.keys(message.metadata)) - writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join(); + internalBinaryWrite(message: QuotaFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string subject = 1; */ + if (message.subject !== "") + writer.tag(1, WireType.LengthDelimited).string(message.subject); + /* string description = 2; */ + if (message.description !== "") + writer.tag(2, WireType.LengthDelimited).string(message.description); + /* string api_service = 3; */ + if (message.apiService !== "") + writer.tag(3, WireType.LengthDelimited).string(message.apiService); + /* string quota_metric = 4; */ + if (message.quotaMetric !== "") + writer.tag(4, WireType.LengthDelimited).string(message.quotaMetric); + /* string quota_id = 5; */ + if (message.quotaId !== "") + writer.tag(5, WireType.LengthDelimited).string(message.quotaId); + /* map quota_dimensions = 6; */ + for (let k of globalThis.Object.keys(message.quotaDimensions)) + writer.tag(6, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.quotaDimensions[k]).join(); + /* int64 quota_value = 7; */ + if (message.quotaValue !== 0n) + writer.tag(7, WireType.Varint).int64(message.quotaValue); + /* optional int64 future_quota_value = 8; */ + if (message.futureQuotaValue !== undefined) + writer.tag(8, WireType.Varint).int64(message.futureQuotaValue); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -668,9 +871,9 @@ class ErrorInfo$Type extends MessageType { } } /** - * @generated MessageType for protobuf message google.rpc.ErrorInfo + * @generated MessageType for protobuf message google.rpc.QuotaFailure.Violation */ -export const ErrorInfo = new ErrorInfo$Type(); +export const QuotaFailure_Violation = new QuotaFailure_Violation$Type(); // @generated message type with reflection information, may provide speed optimized methods class PreconditionFailure$Type extends MessageType { constructor() { @@ -833,13 +1036,16 @@ class BadRequest_FieldViolation$Type extends MessageType LocalizedMessage } ]); } create(value?: PartialMessage): BadRequest_FieldViolation { const message = globalThis.Object.create((this.messagePrototype!)); message.field = ""; message.description = ""; + message.reason = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -855,6 +1061,12 @@ class BadRequest_FieldViolation$Type extends MessageType Date: Sat, 13 Jun 2026 22:37:13 +0200 Subject: [PATCH 3/4] [MILAB-XXXX]: PF-0: revert hand-authored proto/TS; fix status.ts vintage pollution --- .../proto/plapi/plapiproto/api.proto | 47 ---- .../googleapis/google/rpc/status.ts | 8 +- .../pl/plapi/plapiproto/api.client.ts | 32 --- .../milaboratory/pl/plapi/plapiproto/api.ts | 264 +----------------- 4 files changed, 6 insertions(+), 345 deletions(-) diff --git a/lib/node/pl-client/proto/plapi/plapiproto/api.proto b/lib/node/pl-client/proto/plapi/plapiproto/api.proto index 3ab0285a53..5439d6fe9a 100644 --- a/lib/node/pl-client/proto/plapi/plapiproto/api.proto +++ b/lib/node/pl-client/proto/plapi/plapiproto/api.proto @@ -275,27 +275,6 @@ service Platform { rpc License(MaintenanceAPI.License.Request) returns (MaintenanceAPI.License.Response) { option (google.api.http) = {get: "/v1/license"}; } - - // - // Command bus - // - // TRACKING: These RPCs were hand-written because PL-0 is not yet merged - // upstream in github.com/milaboratory/pl. Once PL-0 lands on pl/main, - // re-run `pnpm update-proto` (sync-proto.sh) to pull the canonical proto - // and verify this hand-written version byte-matches it — guards against - // silent divergence of the frozen contract. - rpc Query(CommandAPI.Command) returns (CommandAPI.CommandResult) { - option (google.api.http) = { - post: "/v1/command/query" - body: "*" - }; - } - rpc Mutation(CommandAPI.Command) returns (CommandAPI.CommandResult) { - option (google.api.http) = { - post: "/v1/command/mutation" - body: "*" - }; - } } // Platform transactions at the API level are implemented as bidirectional @@ -2045,29 +2024,3 @@ message MaintenanceAPI { message Util { message Deprecated {} } - -// Command bus — two standalone RPCs (Query / Mutation) that carry -// arbitrary named commands as JSON payloads. The proto contract is -// frozen: new features register new command names server-side only. -message CommandAPI { - // Command carries the name of a registered handler and an optional - // JSON-encoded argument payload. - message Command { - string name = 1; // required, non-empty - bytes payload = 2; // JSON args, may be omitted - } - - // CmdError is a structured error returned inside a CommandResult. - message CmdError { - string message = 1; - string code = 2; - } - - // CommandResult is the response envelope for both Query and Mutation. - // On success data contains a JSON-encoded result; errors is empty. - // On failure data may be absent and errors carries one or more entries. - message CommandResult { - bytes data = 1; // JSON result - repeated CmdError errors = 2; - } -} diff --git a/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts b/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts index 56d780b598..619459020f 100644 --- a/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts +++ b/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "github.com/googleapis/googleapis/google/rpc/status.proto" (package "google.rpc", syntax proto3) // tslint:disable // -// Copyright 2020 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -39,7 +39,8 @@ import { Any } from "../../../../../google/protobuf/any"; */ export interface Status { /** - * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + * The status code, which should be an enum value of + * [google.rpc.Code][google.rpc.Code]. * * @generated from protobuf field: int32 code = 1 */ @@ -47,7 +48,8 @@ export interface Status { /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the - * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + * [google.rpc.Status.details][google.rpc.Status.details] field, or localized + * by the client. * * @generated from protobuf field: string message = 2 */ diff --git a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts index f4806eed1d..bc619b18a9 100644 --- a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +++ b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts @@ -4,8 +4,6 @@ import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; import { Platform } from "./api"; -import type { CommandAPI_CommandResult } from "./api"; -import type { CommandAPI_Command } from "./api"; import type { MaintenanceAPI_License_Response } from "./api"; import type { MaintenanceAPI_License_Request } from "./api"; import type { MaintenanceAPI_Ping_Response } from "./api"; @@ -306,18 +304,6 @@ export interface IPlatformClient { * @generated from protobuf rpc: License */ license(input: MaintenanceAPI_License_Request, options?: RpcOptions): UnaryCall; - /** - * - * Command bus - * - * - * @generated from protobuf rpc: Query - */ - query(input: CommandAPI_Command, options?: RpcOptions): UnaryCall; - /** - * @generated from protobuf rpc: Mutation - */ - mutation(input: CommandAPI_Command, options?: RpcOptions): UnaryCall; } /** * @generated from protobuf service MiLaboratories.PL.API.Platform @@ -656,22 +642,4 @@ export class PlatformClient implements IPlatformClient, ServiceInfo { const method = this.methods[36], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } - /** - * - * Command bus - * - * - * @generated from protobuf rpc: Query - */ - query(input: CommandAPI_Command, options?: RpcOptions): UnaryCall { - const method = this.methods[37], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); - } - /** - * @generated from protobuf rpc: Mutation - */ - mutation(input: CommandAPI_Command, options?: RpcOptions): UnaryCall { - const method = this.methods[38], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); - } } diff --git a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts index e56884772a..b6113f1bbd 100644 --- a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts +++ b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts @@ -4371,63 +4371,6 @@ export interface Util { */ export interface Util_Deprecated { } -/** - * Command bus — two standalone RPCs (Query / Mutation) that carry - * arbitrary named commands as JSON payloads. The proto contract is - * frozen: new features register new command names server-side only. - * - * @generated from protobuf message MiLaboratories.PL.API.CommandAPI - */ -export interface CommandAPI { -} -/** - * Command carries the name of a registered handler and an optional - * JSON-encoded argument payload. - * - * @generated from protobuf message MiLaboratories.PL.API.CommandAPI.Command - */ -export interface CommandAPI_Command { - /** - * @generated from protobuf field: string name = 1 - */ - name: string; // required, non-empty - /** - * @generated from protobuf field: bytes payload = 2 - */ - payload: Uint8Array; // JSON args, may be omitted -} -/** - * CmdError is a structured error returned inside a CommandResult. - * - * @generated from protobuf message MiLaboratories.PL.API.CommandAPI.CmdError - */ -export interface CommandAPI_CmdError { - /** - * @generated from protobuf field: string message = 1 - */ - message: string; - /** - * @generated from protobuf field: string code = 2 - */ - code: string; -} -/** - * CommandResult is the response envelope for both Query and Mutation. - * On success data contains a JSON-encoded result; errors is empty. - * On failure data may be absent and errors carries one or more entries. - * - * @generated from protobuf message MiLaboratories.PL.API.CommandAPI.CommandResult - */ -export interface CommandAPI_CommandResult { - /** - * @generated from protobuf field: bytes data = 1 - */ - data: Uint8Array; // JSON result - /** - * @generated from protobuf field: repeated MiLaboratories.PL.API.CommandAPI.CmdError errors = 2 - */ - errors: CommandAPI_CmdError[]; -} // @generated message type with reflection information, may provide speed optimized methods class TxAPI$Type extends MessageType { constructor() { @@ -20424,209 +20367,6 @@ class Util_Deprecated$Type extends MessageType { * @generated MessageType for protobuf message MiLaboratories.PL.API.Util.Deprecated */ export const Util_Deprecated = new Util_Deprecated$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class CommandAPI$Type extends MessageType { - constructor() { - super("MiLaboratories.PL.API.CommandAPI", []); - } - create(value?: PartialMessage): CommandAPI { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI): CommandAPI { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - 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: CommandAPI, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message MiLaboratories.PL.API.CommandAPI - */ -export const CommandAPI = new CommandAPI$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class CommandAPI_Command$Type extends MessageType { - constructor() { - super("MiLaboratories.PL.API.CommandAPI.Command", [ - { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "payload", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } - ]); - } - create(value?: PartialMessage): CommandAPI_Command { - const message = globalThis.Object.create((this.messagePrototype!)); - message.name = ""; - message.payload = new Uint8Array(0); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI_Command): CommandAPI_Command { - 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 /* bytes payload */ 2: - message.payload = reader.bytes(); - 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: CommandAPI_Command, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string name = 1; */ - if (message.name !== "") - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* bytes payload = 2; */ - if (message.payload.length) - writer.tag(2, WireType.LengthDelimited).bytes(message.payload); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message MiLaboratories.PL.API.CommandAPI.Command - */ -export const CommandAPI_Command = new CommandAPI_Command$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class CommandAPI_CmdError$Type extends MessageType { - constructor() { - super("MiLaboratories.PL.API.CommandAPI.CmdError", [ - { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "code", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): CommandAPI_CmdError { - const message = globalThis.Object.create((this.messagePrototype!)); - message.message = ""; - message.code = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI_CmdError): CommandAPI_CmdError { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string message */ 1: - message.message = reader.string(); - break; - case /* string code */ 2: - message.code = 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: CommandAPI_CmdError, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string message = 1; */ - if (message.message !== "") - writer.tag(1, WireType.LengthDelimited).string(message.message); - /* string code = 2; */ - if (message.code !== "") - writer.tag(2, WireType.LengthDelimited).string(message.code); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message MiLaboratories.PL.API.CommandAPI.CmdError - */ -export const CommandAPI_CmdError = new CommandAPI_CmdError$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class CommandAPI_CommandResult$Type extends MessageType { - constructor() { - super("MiLaboratories.PL.API.CommandAPI.CommandResult", [ - { no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, - { no: 2, name: "errors", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CommandAPI_CmdError } - ]); - } - create(value?: PartialMessage): CommandAPI_CommandResult { - const message = globalThis.Object.create((this.messagePrototype!)); - message.data = new Uint8Array(0); - message.errors = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI_CommandResult): CommandAPI_CommandResult { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bytes data */ 1: - message.data = reader.bytes(); - break; - case /* repeated MiLaboratories.PL.API.CommandAPI.CmdError errors */ 2: - message.errors.push(CommandAPI_CmdError.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: CommandAPI_CommandResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* bytes data = 1; */ - if (message.data.length) - writer.tag(1, WireType.LengthDelimited).bytes(message.data); - /* repeated MiLaboratories.PL.API.CommandAPI.CmdError errors = 2; */ - for (let i = 0; i < message.errors.length; i++) - CommandAPI_CmdError.internalBinaryWrite(message.errors[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 MiLaboratories.PL.API.CommandAPI.CommandResult - */ -export const CommandAPI_CommandResult = new CommandAPI_CommandResult$Type(); /** * @generated ServiceType for protobuf service MiLaboratories.PL.API.Platform */ @@ -20667,7 +20407,5 @@ export const Platform = new ServiceType("MiLaboratories.PL.API.Platform", [ { name: "ListUserResources", serverStreaming: true, options: {}, I: AuthAPI_ListUserResources_Request, O: AuthAPI_ListUserResources_Response }, { name: "ListResourceTypes", options: { "google.api.http": { get: "/v1/resource-types" } }, I: MiscAPI_ListResourceTypes_Request, O: MiscAPI_ListResourceTypes_Response }, { name: "Ping", options: { "google.api.http": { get: "/v1/ping" } }, I: MaintenanceAPI_Ping_Request, O: MaintenanceAPI_Ping_Response }, - { name: "License", options: { "google.api.http": { get: "/v1/license" } }, I: MaintenanceAPI_License_Request, O: MaintenanceAPI_License_Response }, - { name: "Query", options: { "google.api.http": { post: "/v1/command/query", body: "*" } }, I: CommandAPI_Command, O: CommandAPI_CommandResult }, - { name: "Mutation", options: { "google.api.http": { post: "/v1/command/mutation", body: "*" } }, I: CommandAPI_Command, O: CommandAPI_CommandResult } + { name: "License", options: { "google.api.http": { get: "/v1/license" } }, I: MaintenanceAPI_License_Request, O: MaintenanceAPI_License_Response } ]); From 489db761b1f67f5a5ce2b29c728e0318129d609b Mon Sep 17 00:00:00 2001 From: Vitalii Popov Date: Sat, 13 Jun 2026 23:04:09 +0200 Subject: [PATCH 4/4] [MILAB-XXXX]: PF-0: regen TS gRPC bindings from pl-int with Query/Mutation RPCs --- .../proto/plapi/plapiproto/api.proto | 79 + .../proto/plapi/plapiproto/openapi.yaml | 3584 ++++++------- .../googleapis/google/rpc/status.ts | 8 +- .../pl/plapi/plapiproto/api.client.ts | 65 +- .../milaboratory/pl/plapi/plapiproto/api.ts | 569 +- .../src/proto-grpc/google/api/http.ts | 62 +- .../src/proto-grpc/google/rpc/code.ts | 14 +- .../proto-grpc/google/rpc/error_details.ts | 482 +- .../src/proto-grpc/google/rpc/status.ts | 8 +- lib/node/pl-client/src/proto-rest/plapi.ts | 4609 +++++++++-------- 10 files changed, 5110 insertions(+), 4370 deletions(-) diff --git a/lib/node/pl-client/proto/plapi/plapiproto/api.proto b/lib/node/pl-client/proto/plapi/plapiproto/api.proto index 5439d6fe9a..022cf052db 100644 --- a/lib/node/pl-client/proto/plapi/plapiproto/api.proto +++ b/lib/node/pl-client/proto/plapi/plapiproto/api.proto @@ -259,6 +259,8 @@ service Platform { } rpc ListUserResources(AuthAPI.ListUserResources.Request) returns (stream AuthAPI.ListUserResources.Response) {} + rpc ListUsers(AuthAPI.ListUsers.Request) returns (AuthAPI.ListUsers.Response) {} + // // Other stuff // @@ -275,6 +277,28 @@ service Platform { rpc License(MaintenanceAPI.License.Request) returns (MaintenanceAPI.License.Response) { option (google.api.http) = {get: "/v1/license"}; } + + // + // Command bus (admin panel and future extension points) + // + // Query dispatches a named read-only command. The server opens a read + // transaction, runs the registered handler, and returns a JSON result. + // The dispatcher enforces per-command role requirements before running. + rpc Query(CommandAPI.Command) returns (CommandAPI.CommandResult) { + option (google.api.http) = { + post: "/v1/command/query" + body: "*" + }; + } + // Mutation dispatches a named write command. The server opens a write + // transaction, runs the registered handler, and commits on success. + // The dispatcher enforces per-command role requirements before running. + rpc Mutation(CommandAPI.Command) returns (CommandAPI.CommandResult) { + option (google.api.http) = { + post: "/v1/command/mutation" + body: "*" + }; + } } // Platform transactions at the API level are implemented as bidirectional @@ -483,6 +507,7 @@ message TxAPI { AuthAPI.GrantAccess.Request grant_access = 410; // grant access to a resource within transaction AuthAPI.RevokeAccess.Request revoke_access = 411; // revoke access to a resource within transaction + AuthAPI.ListGrants.Request list_grants = 412; // list grants on a resource within transaction } } @@ -585,6 +610,7 @@ message TxAPI { AuthAPI.GrantAccess.Response grant_access = 410; AuthAPI.RevokeAccess.Response revoke_access = 411; + AuthAPI.ListGrants.TxResponse list_grants = 412; } google.rpc.Status error = 3; @@ -1866,6 +1892,10 @@ message AuthAPI { message Response { Grant grant = 1; // one per stream message } + + message TxResponse { + repeated Grant grants = 1; // all grants for the resource in a single transactional response + } } message Grant { @@ -1948,6 +1978,23 @@ message AuthAPI { Grant.Permissions permissions = 4; } } + + message User { + // login is the stable identifier of the user — the grant target and the + // GetUserRoot key. Further fields (e.g. first name, last name, email) may + // be added later without breaking compatibility. + string login = 1; + } + + message ListUsers { + message Request {} + + // Lists users known to the server. A user becomes known on first login; + // provisioned users who have never logged in do not appear. + message Response { + repeated User users = 1; + } + } } message MiscAPI { @@ -2021,6 +2068,38 @@ message MaintenanceAPI { } } +// CommandAPI groups all message types used by the command-bus RPCs +// (Query and Mutation). The proto contract is frozen; future commands +// are added by registering new handler names on the server — no proto +// changes are needed. +message CommandAPI { + // Command carries a named command with an optional JSON payload. + message Command { + // name identifies the registered handler (e.g. "users.list"). + // Must be non-empty. + string name = 1; + // payload is an opaque JSON object passed verbatim to the handler. + // May be empty when a command takes no arguments. + bytes payload = 2; + } + + // CmdError is a structured application-level error returned inside + // CommandResult. It is separate from gRPC status codes, which are + // reserved for transport-level failures. + message CmdError { + string message = 1; + string code = 2; + } + + // CommandResult carries the JSON response from a handler and any + // application-level errors it produced. + message CommandResult { + // data is the JSON-encoded result. Empty when errors is non-empty. + bytes data = 1; + repeated CmdError errors = 2; + } +} + message Util { message Deprecated {} } diff --git a/lib/node/pl-client/proto/plapi/plapiproto/openapi.yaml b/lib/node/pl-client/proto/plapi/plapiproto/openapi.yaml index 1c72cc0b82..3348b83be0 100644 --- a/lib/node/pl-client/proto/plapi/plapiproto/openapi.yaml +++ b/lib/node/pl-client/proto/plapi/plapiproto/openapi.yaml @@ -3,1749 +3,1853 @@ openapi: 3.0.3 info: - title: Platform API - version: 1.0.0 + title: Platform API + version: 1.0.0 paths: - /v1/auth/grant-access: - post: - tags: - - Platform - operationId: Platform_GrantAccess - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_GrantAccess_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_GrantAccess_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/auth/jwt-token: - post: - tags: - - Platform - description: |- - Deprecated: Use Login for session creation and role transitions, - and RefreshToken for token renewal. Backends implementing this API always return - codes.Unimplemented. Kept here so clients can still call old backends. - operationId: Platform_GetJWTToken - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_GetJWTToken_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_GetJWTToken_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/auth/login: - post: - tags: - - Platform - description: |- - Login authenticates with the given credentials and returns a new Platforma JWT. - Every Login call creates a new session. Use RefreshToken to renew an existing one. - This method is public: no Authorization header is required. - operationId: Platform_Login - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_Login_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_Login_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/auth/methods: - get: - tags: - - Platform - description: Authentication - operationId: Platform_AuthMethods - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_ListMethods_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/auth/mint-signature: - post: - tags: - - Platform - description: |- - MintSignature creates a resource signature bound to a target session. - Controllers use it during workflow bootstrap to pre-sign resources - so the workflow can access them under its own isolated session. - operationId: Platform_MintSignature - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_MintSignature_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_MintSignature_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/auth/refresh: - post: - tags: - - Platform - description: |- - RefreshToken accepts a valid Platforma JWT and re-issues it with the same - session ID and role. Only the token expiration may be changed. - Workflow-scoped tokens cannot be refreshed; call Login instead. - This method is public: no Authorization header is required. - operationId: Platform_RefreshToken - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_RefreshToken_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_RefreshToken_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/auth/revoke-access: - post: - tags: - - Platform - operationId: Platform_RevokeAccess - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_RevokeAccess_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_RevokeAccess_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/auth/session-info: - post: - tags: - - Platform - operationId: Platform_GetSessionInfo - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_GetSessionInfo_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_GetSessionInfo_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/auth/sso/begin-login: - post: - tags: - - Platform - description: |- - BeginSSOLogin returns a fresh one-time nonce that the desktop must place - into the OIDC auth-request before redirecting to the IdP. Used by the SSO - login flow. This method is public: no Authorization header is required. - operationId: Platform_BeginSSOLogin - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_BeginSSOLogin_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_BeginSSOLogin_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/auth/user-root: - post: - tags: - - Platform - operationId: Platform_GetUserRoot - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_GetUserRoot_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AuthAPI_GetUserRoot_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/aliases-and-urls: - post: - tags: - - Platform - operationId: Platform_WriteControllerAliasesAndUrls - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_WriteAliasesAndUrls_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_WriteAliasesAndUrls_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - delete: - tags: - - Platform - operationId: Platform_RemoveControllerAliasesAndUrls - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_RemoveAliasesAndUrls_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_RemoveAliasesAndUrls_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/attach-subscription: - post: - tags: - - Platform - operationId: Platform_ControllerAttachSubscription - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_AttachSubscription_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_AttachSubscription_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/create: - post: - tags: - - Platform - operationId: Platform_ControllerCreate - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Create_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Create_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/deregister: - post: - tags: - - Platform - operationId: Platform_ControllerDeregister - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Deregister_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Deregister_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/exists: - post: - tags: - - Platform - operationId: Platform_ControllerExists - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Exists_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Exists_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/features: - post: - tags: - - Platform - operationId: Platform_ControllerSetFeatures - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_SetFeatures_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_SetFeatures_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - delete: - tags: - - Platform - operationId: Platform_ControllerClearFeatures - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_ClearFeatures_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_ClearFeatures_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/get: - post: - tags: - - Platform - operationId: Platform_ControllerGet - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Get_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Get_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/notifications: - post: - tags: - - Platform - operationId: Platform_GetControllerNotifications - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_GetNotifications_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_GetNotifications_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/register: - post: - tags: - - Platform - description: Controllers - operationId: Platform_ControllerRegister - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Register_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Register_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/update: - post: - tags: - - Platform - operationId: Platform_ControllerUpdate - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Update_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_Update_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/controller/url: - post: - tags: - - Platform - operationId: Platform_GetControllerUrl - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_GetUrl_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ControllerAPI_GetUrl_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/license: - get: - tags: - - Platform - operationId: Platform_License - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/MaintenanceAPI_License_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/locks/lease/create: - post: - tags: - - Platform - description: |- - LeaseResource creates a lease for a resource. A lease is a temporary lock that needs periodic renewal to stay valid. - Leases are a separate mechanism from locks: leases are focused on 'clients', while locks are focused on 'resources'. - To keep the lease active, the client needs the lease ID that is generated when a lease is created and used for lease updates. - operationId: Platform_LeaseResource - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/LocksAPI_Lease_Create_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/LocksAPI_Lease_Create_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/locks/lease/release: - post: - tags: - - Platform - operationId: Platform_ReleaseLease - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/LocksAPI_Lease_Release_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/LocksAPI_Lease_Release_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/locks/lease/update: - post: - tags: - - Platform - operationId: Platform_UpdateLease - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/LocksAPI_Lease_Update_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/LocksAPI_Lease_Update_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/locks/lock/create: - post: - tags: - - Platform - description: |- - LockFieldValues gets the resource and obtains a lock on all resolved values of listed fields: - - get the resource that will take the lock ('FOR' resource) (lock cannot be obtained 'FOR' or 'ON' deleted resource) - - list resource's fields, take fields with names set in request - - get resolved values of listed fields (IDs of 'ON' resources). - - acquire lock on all 'ON' resources, marking 'FOR' resource as an owner. + /v1/auth/grant-access: + post: + tags: + - Platform + operationId: Platform_GrantAccess + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_GrantAccess_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_GrantAccess_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/auth/jwt-token: + post: + tags: + - Platform + description: |- + Deprecated: Use Login for session creation and role transitions, + and RefreshToken for token renewal. Backends implementing this API always return + codes.Unimplemented. Kept here so clients can still call old backends. + operationId: Platform_GetJWTToken + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_GetJWTToken_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_GetJWTToken_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/auth/login: + post: + tags: + - Platform + description: |- + Login authenticates with the given credentials and returns a new Platforma JWT. + Every Login call creates a new session. Use RefreshToken to renew an existing one. + This method is public: no Authorization header is required. + operationId: Platform_Login + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_Login_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_Login_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/auth/methods: + get: + tags: + - Platform + description: Authentication + operationId: Platform_AuthMethods + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_ListMethods_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/auth/mint-signature: + post: + tags: + - Platform + description: |- + MintSignature creates a resource signature bound to a target session. + Controllers use it during workflow bootstrap to pre-sign resources + so the workflow can access them under its own isolated session. + operationId: Platform_MintSignature + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_MintSignature_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_MintSignature_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/auth/refresh: + post: + tags: + - Platform + description: |- + RefreshToken accepts a valid Platforma JWT and re-issues it with the same + session ID and role. Only the token expiration may be changed. + Workflow-scoped tokens cannot be refreshed; call Login instead. + This method is public: no Authorization header is required. + operationId: Platform_RefreshToken + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_RefreshToken_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_RefreshToken_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/auth/revoke-access: + post: + tags: + - Platform + operationId: Platform_RevokeAccess + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_RevokeAccess_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_RevokeAccess_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/auth/session-info: + post: + tags: + - Platform + operationId: Platform_GetSessionInfo + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_GetSessionInfo_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_GetSessionInfo_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/auth/sso/begin-login: + post: + tags: + - Platform + description: |- + BeginSSOLogin returns a fresh one-time nonce that the desktop must place + into the OIDC auth-request before redirecting to the IdP. Used by the SSO + login flow. This method is public: no Authorization header is required. + operationId: Platform_BeginSSOLogin + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_BeginSSOLogin_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_BeginSSOLogin_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/auth/user-root: + post: + tags: + - Platform + operationId: Platform_GetUserRoot + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_GetUserRoot_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthAPI_GetUserRoot_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/command/mutation: + post: + tags: + - Platform + description: |- + Mutation dispatches a named write command. The server opens a write + transaction, runs the registered handler, and commits on success. + The dispatcher enforces per-command role requirements before running. + operationId: Platform_Mutation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommandAPI_Command' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CommandAPI_CommandResult' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/command/query: + post: + tags: + - Platform + description: |- + Command bus (admin panel and future extension points) - Lock logic constraints: - - Locking is optimistic: if two processes try to obtain a lock on the same resource, one of them - succeeds, while the other fails with an error (no long waiting) - - Only resolved reference can be locked: to obtain a lock for a particular field's value, the backend needs to know - the resource ID this field points to. Unless all listed field references are resolved to a final ID, the lock will fail. - - Only an original resource can be locked: if a resource is 'pure' (supports deduplication), it has to pass deduplication before - being lockable. An attempt to lock a resource that has not become original will fail. - - Locking is a one-way operation: it cannot be 'released' or 'revoked'. - operationId: Platform_LockFieldValues - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/LocksAPI_LockFieldValues_Create_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/LocksAPI_LockFieldValues_Create_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/notifications/get: - post: - tags: - - Platform - operationId: Platform_NotificationsGet - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/NotificationAPI_Get_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/NotificationAPI_Get_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/ping: - get: - tags: - - Platform - description: Various service requests - operationId: Platform_Ping - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/MaintenanceAPI_Ping_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/resource-types: - get: - tags: - - Platform - description: Other stuff - operationId: Platform_ListResourceTypes - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/MiscAPI_ListResourceTypes_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/subscription/attach-filter: - post: - tags: - - Platform - description: Subscriptions - operationId: Platform_SubscriptionAttachFilter - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/SubscriptionAPI_AttachFilter_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/SubscriptionAPI_AttachFilter_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/subscription/detach-filter: - post: - tags: - - Platform - operationId: Platform_SubscriptionDetachFilter - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/SubscriptionAPI_DetachFilter_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/SubscriptionAPI_DetachFilter_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" - /v1/tx-sync: - post: - tags: - - Platform - operationId: Platform_TxSync - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/TxAPI_Sync_Request" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/TxAPI_Sync_Response" - default: - description: Default error response - content: - application/json: - schema: - $ref: "#/components/schemas/Status" + Query dispatches a named read-only command. The server opens a read + transaction, runs the registered handler, and returns a JSON result. + The dispatcher enforces per-command role requirements before running. + operationId: Platform_Query + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommandAPI_Command' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CommandAPI_CommandResult' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/aliases-and-urls: + post: + tags: + - Platform + operationId: Platform_WriteControllerAliasesAndUrls + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_WriteAliasesAndUrls_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_WriteAliasesAndUrls_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + delete: + tags: + - Platform + operationId: Platform_RemoveControllerAliasesAndUrls + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_RemoveAliasesAndUrls_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_RemoveAliasesAndUrls_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/attach-subscription: + post: + tags: + - Platform + operationId: Platform_ControllerAttachSubscription + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_AttachSubscription_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_AttachSubscription_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/create: + post: + tags: + - Platform + operationId: Platform_ControllerCreate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Create_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Create_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/deregister: + post: + tags: + - Platform + operationId: Platform_ControllerDeregister + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Deregister_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Deregister_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/exists: + post: + tags: + - Platform + operationId: Platform_ControllerExists + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Exists_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Exists_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/features: + post: + tags: + - Platform + operationId: Platform_ControllerSetFeatures + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_SetFeatures_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_SetFeatures_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + delete: + tags: + - Platform + operationId: Platform_ControllerClearFeatures + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_ClearFeatures_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_ClearFeatures_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/get: + post: + tags: + - Platform + operationId: Platform_ControllerGet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Get_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Get_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/notifications: + post: + tags: + - Platform + operationId: Platform_GetControllerNotifications + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_GetNotifications_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_GetNotifications_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/register: + post: + tags: + - Platform + description: Controllers + operationId: Platform_ControllerRegister + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Register_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Register_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/update: + post: + tags: + - Platform + operationId: Platform_ControllerUpdate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Update_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_Update_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/controller/url: + post: + tags: + - Platform + operationId: Platform_GetControllerUrl + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_GetUrl_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ControllerAPI_GetUrl_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/license: + get: + tags: + - Platform + operationId: Platform_License + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/MaintenanceAPI_License_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/locks/lease/create: + post: + tags: + - Platform + description: |- + LeaseResource creates a lease for a resource. A lease is a temporary lock that needs periodic renewal to stay valid. + Leases are a separate mechanism from locks: leases are focused on 'clients', while locks are focused on 'resources'. + To keep the lease active, the client needs the lease ID that is generated when a lease is created and used for lease updates. + operationId: Platform_LeaseResource + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LocksAPI_Lease_Create_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LocksAPI_Lease_Create_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/locks/lease/release: + post: + tags: + - Platform + operationId: Platform_ReleaseLease + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LocksAPI_Lease_Release_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LocksAPI_Lease_Release_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/locks/lease/update: + post: + tags: + - Platform + operationId: Platform_UpdateLease + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LocksAPI_Lease_Update_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LocksAPI_Lease_Update_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/locks/lock/create: + post: + tags: + - Platform + description: |- + LockFieldValues gets the resource and obtains a lock on all resolved values of listed fields: + - get the resource that will take the lock ('FOR' resource) (lock cannot be obtained 'FOR' or 'ON' deleted resource) + - list resource's fields, take fields with names set in request + - get resolved values of listed fields (IDs of 'ON' resources). + - acquire lock on all 'ON' resources, marking 'FOR' resource as an owner. + + Lock logic constraints: + - Locking is optimistic: if two processes try to obtain a lock on the same resource, one of them + succeeds, while the other fails with an error (no long waiting) + - Only resolved reference can be locked: to obtain a lock for a particular field's value, the backend needs to know + the resource ID this field points to. Unless all listed field references are resolved to a final ID, the lock will fail. + - Only an original resource can be locked: if a resource is 'pure' (supports deduplication), it has to pass deduplication before + being lockable. An attempt to lock a resource that has not become original will fail. + - Locking is a one-way operation: it cannot be 'released' or 'revoked'. + operationId: Platform_LockFieldValues + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LocksAPI_LockFieldValues_Create_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LocksAPI_LockFieldValues_Create_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/notifications/get: + post: + tags: + - Platform + operationId: Platform_NotificationsGet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationAPI_Get_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationAPI_Get_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/ping: + get: + tags: + - Platform + description: Various service requests + operationId: Platform_Ping + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/MaintenanceAPI_Ping_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/resource-types: + get: + tags: + - Platform + description: Other stuff + operationId: Platform_ListResourceTypes + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/MiscAPI_ListResourceTypes_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/subscription/attach-filter: + post: + tags: + - Platform + description: Subscriptions + operationId: Platform_SubscriptionAttachFilter + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionAPI_AttachFilter_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionAPI_AttachFilter_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/subscription/detach-filter: + post: + tags: + - Platform + operationId: Platform_SubscriptionDetachFilter + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionAPI_DetachFilter_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionAPI_DetachFilter_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /v1/tx-sync: + post: + tags: + - Platform + operationId: Platform_TxSync + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TxAPI_Sync_Request' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TxAPI_Sync_Response' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' components: - schemas: - AuthAPI_BeginSSOLogin_PublicPKCE: - type: object - properties: - nonce: - type: string - expiresAt: - type: string - format: date-time - AuthAPI_BeginSSOLogin_Request: - type: object - properties: {} - AuthAPI_BeginSSOLogin_Response: - type: object - properties: - publicPkce: - $ref: "#/components/schemas/AuthAPI_BeginSSOLogin_PublicPKCE" - AuthAPI_GetJWTToken_Request: - type: object - properties: - expiration: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - requestedRole: - type: integer - format: enum - AuthAPI_GetJWTToken_Response: - type: object - properties: - token: - type: string - sessionId: - type: string - description: Session info fields - format: bytes - role: - type: integer - format: enum - AuthAPI_GetSessionInfo_Request: - type: object - properties: {} - AuthAPI_GetSessionInfo_Response: - type: object - properties: - sessionId: - type: string - format: bytes - role: - type: integer - format: enum - AuthAPI_GetUserRoot_Request: - type: object - properties: - login: - type: string - createIfNotExists: - type: boolean - AuthAPI_GetUserRoot_Response: - type: object - properties: - userRoot: - $ref: "#/components/schemas/AuthAPI_UserRoot" - AuthAPI_GrantAccess_Request: - type: object - properties: - resourceId: - type: string - resourceSignature: - type: string - format: bytes - targetUser: - type: string - permissions: - $ref: "#/components/schemas/AuthAPI_Grant_Permissions" - grantType: - type: integer - format: enum - AuthAPI_GrantAccess_Response: - type: object - properties: {} - AuthAPI_Grant_Permissions: - type: object - properties: - writable: - type: boolean - description: Permissions describes access level for a grant. - AuthAPI_ListMethods_BasicAuthMethod: - type: object - properties: {} - AuthAPI_ListMethods_MethodInfo: - type: object - properties: - id: - type: string - description: |- - id is the stable, machine-readable identifier of the login method - instance. Unique across the entire server. - description: - type: string - description: description is the human-readable label in case we'd like to render it in UI. - basic: - $ref: "#/components/schemas/AuthAPI_ListMethods_BasicAuthMethod" - token: - $ref: "#/components/schemas/AuthAPI_ListMethods_TokenAuthMethod" - sso: - $ref: "#/components/schemas/AuthAPI_ListMethods_SSOAuthMethod" - AuthAPI_ListMethods_Response: - type: object - properties: - methods: - type: array - items: - $ref: "#/components/schemas/AuthAPI_ListMethods_MethodInfo" - AuthAPI_ListMethods_SSOAuthMethod: - type: object - properties: - issuer: - type: string - clientId: - type: string - scopes: - type: string - resource: - type: string - prompt: - type: string - redirectPorts: - type: array - items: - type: integer - format: uint32 - subjectTokenSource: - type: string - userIdClaim: - type: string - groupsClaim: - type: string - flowType: - type: integer - format: enum - description: |- - SSOAuthMethod advertises an external IdP-based login flow. The desktop - app uses the contents to drive the PKCE exchange locally, then hands the - resulting IdP token-response back via Login.SSOCredentials. - AuthAPI_ListMethods_TokenAuthMethod: - type: object - properties: {} - AuthAPI_Login_BasicCredentials: - type: object - properties: - login: - type: string - password: - type: string - AuthAPI_Login_Request: - type: object - properties: - basic: - $ref: "#/components/schemas/AuthAPI_Login_BasicCredentials" - token: - $ref: "#/components/schemas/AuthAPI_Login_TokenCredentials" - sso: - $ref: "#/components/schemas/AuthAPI_Login_SSOCredentials" - expiration: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - requestedRole: - type: integer - format: enum - AuthAPI_Login_Response: - type: object - properties: - token: - type: string - sessionId: - type: string - format: bytes - role: - type: integer - format: enum - AuthAPI_Login_SSOCredentials: - type: object - properties: - tokenResponse: - type: string - format: bytes - description: |- - SSOCredentials carries the raw JSON body returned by the IdP's /token - endpoint after the desktop completes a PKCE exchange. - AuthAPI_Login_TokenCredentials: - type: object - properties: - token: - type: string - format: bytes - description: |- - TokenCredentials accepts any opaque bearer-style string: a controller - pre-shared secret, an existing Platforma JWT, or a future OIDC id-token. - AuthAPI_MintSignature_Request: - type: object - properties: - resourceId: - type: string - targetSid: - type: string - format: bytes - color: - $ref: "#/components/schemas/Color" - AuthAPI_MintSignature_Response: - type: object - properties: - resourceId: - type: string - resourceSignature: - type: string - format: bytes - AuthAPI_RefreshToken_Request: - type: object - properties: - token: - type: string - expiration: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - AuthAPI_RefreshToken_Response: - type: object - properties: - token: - type: string - sessionId: - type: string - format: bytes - role: - type: integer - format: enum - AuthAPI_RevokeAccess_Request: - type: object - properties: - resourceId: - type: string - resourceSignature: - type: string - format: bytes - targetUser: - type: string - AuthAPI_RevokeAccess_Response: - type: object - properties: {} - AuthAPI_UserRoot: - type: object - properties: - resourceId: - type: string - resourceSignature: - type: string - format: bytes - Color: - type: object - properties: - root: - type: string - permissions: - type: integer - format: uint32 - Controller: - type: object - properties: - type: - type: string - id: - type: string - subscriptionID: - type: string - ControllerAPI_AttachSubscription_Request: - type: object - properties: - controllerId: - type: string - subscriptionId: - type: string - ControllerAPI_AttachSubscription_Response: - type: object - properties: {} - ControllerAPI_ClearFeatures_Request: - type: object - properties: - controllerType: - type: string - ControllerAPI_ClearFeatures_Response: - type: object - properties: {} - ControllerAPI_Create_Request: - type: object - properties: - id: - type: string - controllerType: - type: string - ControllerAPI_Create_Response: - type: object - properties: - controllerId: - type: string - ControllerAPI_Deregister_Request: - type: object - properties: - controllerType: - type: string - ControllerAPI_Deregister_Response: - type: object - properties: {} - ControllerAPI_Exists_Request: - type: object - properties: - controllerType: - type: string - ControllerAPI_Exists_Response: - type: object - properties: - exists: - type: boolean - ControllerAPI_GetNotifications_Request: - type: object - properties: - controllerType: - type: string - maxNotifications: - type: integer - format: uint32 - ControllerAPI_GetNotifications_Response: - type: object - properties: - notifications: - type: array - items: - $ref: "#/components/schemas/Notification" - ControllerAPI_GetUrl_Request: - type: object - properties: - controllerAlias: - type: string - resourceId: - type: string - ControllerAPI_GetUrl_Response: - type: object - properties: - controllerUrl: - type: string - ControllerAPI_Get_Request: - type: object - properties: - controllerType: - type: string - ControllerAPI_Get_Response: - type: object - properties: - controller: - $ref: "#/components/schemas/Controller" - ControllerAPI_Register_Request: - type: object - properties: - controllerType: - type: string - filters: - type: object - additionalProperties: - $ref: "#/components/schemas/NotificationFilter" - resourceSchemas: - type: array - items: - $ref: "#/components/schemas/ResourceSchema" - ControllerAPI_Register_Response: - type: object - properties: - controllerId: - type: string - subscriptionId: - type: string - ControllerAPI_RemoveAliasesAndUrls_Request: - type: object - properties: - controllerType: - type: string - ControllerAPI_RemoveAliasesAndUrls_Response: - type: object - properties: {} - ControllerAPI_SetFeatures_Request: - type: object - properties: - features: - type: array - items: - $ref: "#/components/schemas/ResourceAPIFeature" - ControllerAPI_SetFeatures_Response: - type: object - properties: {} - ControllerAPI_Update_Request: - type: object - properties: - controllerType: - type: string - filters: - type: object - additionalProperties: - $ref: "#/components/schemas/NotificationFilter" - resourceSchemas: - type: array - items: - $ref: "#/components/schemas/ResourceSchema" - ControllerAPI_Update_Response: - type: object - properties: {} - ControllerAPI_WriteAliasesAndUrls_Request: - type: object - properties: - controllerType: - type: string - aliasesToUrls: - type: object - additionalProperties: - type: string - ControllerAPI_WriteAliasesAndUrls_Response: - type: object - properties: {} - Field: - type: object - properties: - id: - allOf: - - $ref: "#/components/schemas/FieldRef" - description: field ID is always combination of parent resource ID and field name - type: - type: integer - format: enum - features: - $ref: "#/components/schemas/Resource_Features" - value: - type: string - description: |- - _resolved_ value of a field or _assigned_ if the field was assigned to a resource. - If a field refers to another field, it will get - a value only when this chain of references ends up with a direct resource - reference. At that moment, all fields in the chain will get their values - resolved and will start to refer to the same resource directly. - valueSignature: - type: string - description: |- - Signature for value resource ID, inheriting the parent resource's color. - Populated server-side when the parent resource has a known color in the current TX. - format: bytes - valueStatus: - type: integer - description: Whether the value is empty, assigned, or finally resolved. - format: enum - valueIsFinal: - type: boolean - description: If the value is in its final state (ready, duplicate or error) - error: - type: string - description: |- - Error resource ID, if any. - Is intended to report problems _from_ the platform to the client. - errorSignature: - type: string - description: Signature for error resource ID, inheriting the parent resource's color. - format: bytes - FieldRef: - type: object - properties: - resourceId: - type: string - resourceSignature: - type: string - format: bytes - fieldName: - type: string - FieldSchema: - type: object - properties: - type: - type: integer - format: enum - name: - type: string - GoogleProtobufAny: - type: object - properties: - "@type": - type: string - description: The type of the serialized message. - additionalProperties: true - description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. - LocksAPI_Lease_Create_Request: - type: object - properties: - resourceId: - type: string - resourceSignature: - type: string - format: bytes - timeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - name: - type: string - LocksAPI_Lease_Create_Response: - type: object - properties: - leaseId: - type: string - format: bytes - LocksAPI_Lease_Release_Request: - type: object - properties: - resourceId: - type: string - resourceSignature: - type: string - format: bytes - leaseId: - type: string - format: bytes - LocksAPI_Lease_Release_Response: - type: object - properties: {} - LocksAPI_Lease_Update_Request: - type: object - properties: - resourceId: - type: string - resourceSignature: - type: string - format: bytes - leaseId: - type: string - format: bytes - timeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - name: - type: string - LocksAPI_Lease_Update_Response: - type: object - properties: {} - LocksAPI_LockFieldValues_Create_Request: - type: object - properties: - resourceId: - type: string - lockReferencesOf: - type: array - items: - type: string - comment: - type: string - LocksAPI_LockFieldValues_Create_Response: - type: object - properties: - acquired: - type: boolean - description: |- - true when lock was acquired (new, or already owned by the owner) - Client MUST pay attention to this flag, as it shows if lock was successful. - conflictingLocks: - type: array - items: - $ref: "#/components/schemas/LocksAPI_LockFieldValues_Create_Response_LockInfo" - description: |- - Info about why lock was not acquired. - Limited number of conflicts is reported: i.e. if lock operation failed for 20 fields, only first 10 are listed here. - The number '10' is not a fixed contract for external clients. It is just 'somehow truncated'. - conflictsListTruncated: - type: boolean - LocksAPI_LockFieldValues_Create_Response_LockInfo: - type: object - properties: - targetId: - type: string - fieldName: - type: string - lockedBy: - type: string - lockedAt: - type: string - format: date-time - comment: - type: string - MaintenanceAPI_License_Response: - type: object - properties: - status: - type: integer - format: int32 - isOk: - type: boolean - responseBody: - type: string - description: Raw response body as it was received from the license server. - format: bytes - MaintenanceAPI_Ping_Response: - type: object - properties: - coreVersion: - type: string - coreFullVersion: - type: string - compression: - type: integer - format: enum - instanceId: - type: string - description: |- - instanceID is a unique ID that changes when we reset DB state. - If we reset a state and a database, but the address of the backend is still the same, - without instanceID we are not sure if it's the same state or not, - and UI can't detect it and clear its state (e.g. caches of drivers). - platform: - type: string - os: - type: string - arch: - type: string - capabilities: - type: array - items: - type: string - description: |- - Opt-in capabilities advertised by this server instance, used by - clients to pick between fast and fallback code paths without waiting - for a failed RPC. + schemas: + AuthAPI_BeginSSOLogin_PublicPKCE: + type: object + properties: + nonce: + type: string + expiresAt: + type: string + format: date-time + AuthAPI_BeginSSOLogin_Request: + type: object + properties: {} + AuthAPI_BeginSSOLogin_Response: + type: object + properties: + publicPkce: + $ref: '#/components/schemas/AuthAPI_BeginSSOLogin_PublicPKCE' + AuthAPI_GetJWTToken_Request: + type: object + properties: + expiration: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + requestedRole: + type: integer + format: enum + AuthAPI_GetJWTToken_Response: + type: object + properties: + token: + type: string + sessionId: + type: string + description: Session info fields + format: bytes + role: + type: integer + format: enum + AuthAPI_GetSessionInfo_Request: + type: object + properties: {} + AuthAPI_GetSessionInfo_Response: + type: object + properties: + sessionId: + type: string + format: bytes + role: + type: integer + format: enum + AuthAPI_GetUserRoot_Request: + type: object + properties: + login: + type: string + createIfNotExists: + type: boolean + AuthAPI_GetUserRoot_Response: + type: object + properties: + userRoot: + $ref: '#/components/schemas/AuthAPI_UserRoot' + AuthAPI_GrantAccess_Request: + type: object + properties: + resourceId: + type: string + resourceSignature: + type: string + format: bytes + targetUser: + type: string + permissions: + $ref: '#/components/schemas/AuthAPI_Grant_Permissions' + grantType: + type: integer + format: enum + AuthAPI_GrantAccess_Response: + type: object + properties: {} + AuthAPI_Grant_Permissions: + type: object + properties: + writable: + type: boolean + description: Permissions describes access level for a grant. + AuthAPI_ListMethods_BasicAuthMethod: + type: object + properties: {} + AuthAPI_ListMethods_MethodInfo: + type: object + properties: + id: + type: string + description: |- + id is the stable, machine-readable identifier of the login method + instance. Unique across the entire server. + description: + type: string + description: description is the human-readable label in case we'd like to render it in UI. + basic: + $ref: '#/components/schemas/AuthAPI_ListMethods_BasicAuthMethod' + token: + $ref: '#/components/schemas/AuthAPI_ListMethods_TokenAuthMethod' + sso: + $ref: '#/components/schemas/AuthAPI_ListMethods_SSOAuthMethod' + AuthAPI_ListMethods_Response: + type: object + properties: + methods: + type: array + items: + $ref: '#/components/schemas/AuthAPI_ListMethods_MethodInfo' + AuthAPI_ListMethods_SSOAuthMethod: + type: object + properties: + issuer: + type: string + clientId: + type: string + scopes: + type: string + resource: + type: string + prompt: + type: string + redirectPorts: + type: array + items: + type: integer + format: uint32 + subjectTokenSource: + type: string + userIdClaim: + type: string + groupsClaim: + type: string + flowType: + type: integer + format: enum + description: |- + SSOAuthMethod advertises an external IdP-based login flow. The desktop + app uses the contents to drive the PKCE exchange locally, then hands the + resulting IdP token-response back via Login.SSOCredentials. + AuthAPI_ListMethods_TokenAuthMethod: + type: object + properties: {} + AuthAPI_Login_BasicCredentials: + type: object + properties: + login: + type: string + password: + type: string + AuthAPI_Login_Request: + type: object + properties: + basic: + $ref: '#/components/schemas/AuthAPI_Login_BasicCredentials' + token: + $ref: '#/components/schemas/AuthAPI_Login_TokenCredentials' + sso: + $ref: '#/components/schemas/AuthAPI_Login_SSOCredentials' + expiration: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + requestedRole: + type: integer + format: enum + AuthAPI_Login_Response: + type: object + properties: + token: + type: string + sessionId: + type: string + format: bytes + role: + type: integer + format: enum + AuthAPI_Login_SSOCredentials: + type: object + properties: + tokenResponse: + type: string + format: bytes + description: |- + SSOCredentials carries the raw JSON body returned by the IdP's /token + endpoint after the desktop completes a PKCE exchange. + AuthAPI_Login_TokenCredentials: + type: object + properties: + token: + type: string + format: bytes + description: |- + TokenCredentials accepts any opaque bearer-style string: a controller + pre-shared secret, an existing Platforma JWT, or a future OIDC id-token. + AuthAPI_MintSignature_Request: + type: object + properties: + resourceId: + type: string + targetSid: + type: string + format: bytes + color: + $ref: '#/components/schemas/Color' + AuthAPI_MintSignature_Response: + type: object + properties: + resourceId: + type: string + resourceSignature: + type: string + format: bytes + AuthAPI_RefreshToken_Request: + type: object + properties: + token: + type: string + expiration: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + AuthAPI_RefreshToken_Response: + type: object + properties: + token: + type: string + sessionId: + type: string + format: bytes + role: + type: integer + format: enum + AuthAPI_RevokeAccess_Request: + type: object + properties: + resourceId: + type: string + resourceSignature: + type: string + format: bytes + targetUser: + type: string + AuthAPI_RevokeAccess_Response: + type: object + properties: {} + AuthAPI_UserRoot: + type: object + properties: + resourceId: + type: string + resourceSignature: + type: string + format: bytes + Color: + type: object + properties: + root: + type: string + permissions: + type: integer + format: uint32 + CommandAPI_CmdError: + type: object + properties: + message: + type: string + code: + type: string + description: |- + CmdError is a structured application-level error returned inside + CommandResult. It is separate from gRPC status codes, which are + reserved for transport-level failures. + CommandAPI_Command: + type: object + properties: + name: + type: string + description: |- + name identifies the registered handler (e.g. "users.list"). + Must be non-empty. + payload: + type: string + description: |- + payload is an opaque JSON object passed verbatim to the handler. + May be empty when a command takes no arguments. + format: bytes + description: Command carries a named command with an optional JSON payload. + CommandAPI_CommandResult: + type: object + properties: + data: + type: string + description: data is the JSON-encoded result. Empty when errors is non-empty. + format: bytes + errors: + type: array + items: + $ref: '#/components/schemas/CommandAPI_CmdError' + description: |- + CommandResult carries the JSON response from a handler and any + application-level errors it produced. + Controller: + type: object + properties: + type: + type: string + id: + type: string + subscriptionID: + type: string + ControllerAPI_AttachSubscription_Request: + type: object + properties: + controllerId: + type: string + subscriptionId: + type: string + ControllerAPI_AttachSubscription_Response: + type: object + properties: {} + ControllerAPI_ClearFeatures_Request: + type: object + properties: + controllerType: + type: string + ControllerAPI_ClearFeatures_Response: + type: object + properties: {} + ControllerAPI_Create_Request: + type: object + properties: + id: + type: string + controllerType: + type: string + ControllerAPI_Create_Response: + type: object + properties: + controllerId: + type: string + ControllerAPI_Deregister_Request: + type: object + properties: + controllerType: + type: string + ControllerAPI_Deregister_Response: + type: object + properties: {} + ControllerAPI_Exists_Request: + type: object + properties: + controllerType: + type: string + ControllerAPI_Exists_Response: + type: object + properties: + exists: + type: boolean + ControllerAPI_GetNotifications_Request: + type: object + properties: + controllerType: + type: string + maxNotifications: + type: integer + format: uint32 + ControllerAPI_GetNotifications_Response: + type: object + properties: + notifications: + type: array + items: + $ref: '#/components/schemas/Notification' + ControllerAPI_GetUrl_Request: + type: object + properties: + controllerAlias: + type: string + resourceId: + type: string + ControllerAPI_GetUrl_Response: + type: object + properties: + controllerUrl: + type: string + ControllerAPI_Get_Request: + type: object + properties: + controllerType: + type: string + ControllerAPI_Get_Response: + type: object + properties: + controller: + $ref: '#/components/schemas/Controller' + ControllerAPI_Register_Request: + type: object + properties: + controllerType: + type: string + filters: + type: object + additionalProperties: + $ref: '#/components/schemas/NotificationFilter' + resourceSchemas: + type: array + items: + $ref: '#/components/schemas/ResourceSchema' + ControllerAPI_Register_Response: + type: object + properties: + controllerId: + type: string + subscriptionId: + type: string + ControllerAPI_RemoveAliasesAndUrls_Request: + type: object + properties: + controllerType: + type: string + ControllerAPI_RemoveAliasesAndUrls_Response: + type: object + properties: {} + ControllerAPI_SetFeatures_Request: + type: object + properties: + features: + type: array + items: + $ref: '#/components/schemas/ResourceAPIFeature' + ControllerAPI_SetFeatures_Response: + type: object + properties: {} + ControllerAPI_Update_Request: + type: object + properties: + controllerType: + type: string + filters: + type: object + additionalProperties: + $ref: '#/components/schemas/NotificationFilter' + resourceSchemas: + type: array + items: + $ref: '#/components/schemas/ResourceSchema' + ControllerAPI_Update_Response: + type: object + properties: {} + ControllerAPI_WriteAliasesAndUrls_Request: + type: object + properties: + controllerType: + type: string + aliasesToUrls: + type: object + additionalProperties: + type: string + ControllerAPI_WriteAliasesAndUrls_Response: + type: object + properties: {} + Field: + type: object + properties: + id: + allOf: + - $ref: '#/components/schemas/FieldRef' + description: field ID is always combination of parent resource ID and field name + type: + type: integer + format: enum + features: + $ref: '#/components/schemas/Resource_Features' + value: + type: string + description: |- + _resolved_ value of a field or _assigned_ if the field was assigned to a resource. + If a field refers to another field, it will get + a value only when this chain of references ends up with a direct resource + reference. At that moment, all fields in the chain will get their values + resolved and will start to refer to the same resource directly. + valueSignature: + type: string + description: |- + Signature for value resource ID, inheriting the parent resource's color. + Populated server-side when the parent resource has a known color in the current TX. + format: bytes + valueStatus: + type: integer + description: Whether the value is empty, assigned, or finally resolved. + format: enum + valueIsFinal: + type: boolean + description: If the value is in its final state (ready, duplicate or error) + error: + type: string + description: |- + Error resource ID, if any. + Is intended to report problems _from_ the platform to the client. + errorSignature: + type: string + description: Signature for error resource ID, inheriting the parent resource's color. + format: bytes + FieldRef: + type: object + properties: + resourceId: + type: string + resourceSignature: + type: string + format: bytes + fieldName: + type: string + FieldSchema: + type: object + properties: + type: + type: integer + format: enum + name: + type: string + GoogleProtobufAny: + type: object + properties: + '@type': + type: string + description: The type of the serialized message. + additionalProperties: true + description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + LocksAPI_Lease_Create_Request: + type: object + properties: + resourceId: + type: string + resourceSignature: + type: string + format: bytes + timeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + name: + type: string + LocksAPI_Lease_Create_Response: + type: object + properties: + leaseId: + type: string + format: bytes + LocksAPI_Lease_Release_Request: + type: object + properties: + resourceId: + type: string + resourceSignature: + type: string + format: bytes + leaseId: + type: string + format: bytes + LocksAPI_Lease_Release_Response: + type: object + properties: {} + LocksAPI_Lease_Update_Request: + type: object + properties: + resourceId: + type: string + resourceSignature: + type: string + format: bytes + leaseId: + type: string + format: bytes + timeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + name: + type: string + LocksAPI_Lease_Update_Response: + type: object + properties: {} + LocksAPI_LockFieldValues_Create_Request: + type: object + properties: + resourceId: + type: string + lockReferencesOf: + type: array + items: + type: string + comment: + type: string + LocksAPI_LockFieldValues_Create_Response: + type: object + properties: + acquired: + type: boolean + description: |- + true when lock was acquired (new, or already owned by the owner) + Client MUST pay attention to this flag, as it shows if lock was successful. + conflictingLocks: + type: array + items: + $ref: '#/components/schemas/LocksAPI_LockFieldValues_Create_Response_LockInfo' + description: |- + Info about why lock was not acquired. + Limited number of conflicts is reported: i.e. if lock operation failed for 20 fields, only first 10 are listed here. + The number '10' is not a fixed contract for external clients. It is just 'somehow truncated'. + conflictsListTruncated: + type: boolean + LocksAPI_LockFieldValues_Create_Response_LockInfo: + type: object + properties: + targetId: + type: string + fieldName: + type: string + lockedBy: + type: string + lockedAt: + type: string + format: date-time + comment: + type: string + MaintenanceAPI_License_Response: + type: object + properties: + status: + type: integer + format: int32 + isOk: + type: boolean + responseBody: + type: string + description: Raw response body as it was received from the license server. + format: bytes + MaintenanceAPI_Ping_Response: + type: object + properties: + coreVersion: + type: string + coreFullVersion: + type: string + compression: + type: integer + format: enum + instanceId: + type: string + description: |- + instanceID is a unique ID that changes when we reset DB state. + If we reset a state and a database, but the address of the backend is still the same, + without instanceID we are not sure if it's the same state or not, + and UI can't detect it and clear its state (e.g. caches of drivers). + platform: + type: string + os: + type: string + arch: + type: string + capabilities: + type: array + items: + type: string + description: |- + Opt-in capabilities advertised by this server instance. Two + client-side usage modes share this same wire field, decided + per-token by the client: + - Optimization hint. Client picks between a fast path and a + fallback without probing by trial-and-error; missing tokens + just cause the fallback to run (e.g. "treeFilter:v2"). + - Install-time gate. Client refuses to install a block whose + manifest declares a required capability the server doesn't + advertise; missing tokens fail closed (e.g. "wasm:v1"). - Each entry is an opaque token ":" (e.g. - "loadSubtree:v1"). Unrecognized tokens are ignored by the client. - The field is unset on servers predating this mechanism, which the - client treats as "no optional capabilities advertised". + Each entry is an opaque token ":" (e.g. + "treeFilter:v2"). The field is unset on servers predating this + mechanism, which the client treats as "no optional capabilities + advertised" — fallback for hints, fail-closed for gates. - All list see pl/platform/api/plapiserver/server_capabilities.go - MiscAPI_ListResourceTypes_Response: - type: object - properties: - types: - type: array - items: - $ref: "#/components/schemas/ResourceType" - Notification: - type: object - properties: - subscriptionId: - type: string - eventId: - type: string - resourceId: - type: string - resourceType: - $ref: "#/components/schemas/ResourceType" - events: - $ref: "#/components/schemas/Notification_Events" - fieldChanges: - type: object - additionalProperties: - $ref: "#/components/schemas/Notification_FieldChange" - payload: - $ref: "#/components/schemas/NotificationFilter_Payload" - filterName: - type: string - txSpan: - $ref: "#/components/schemas/SpanInfo" - NotificationAPI_Get_Request: - type: object - properties: - subscription: - type: string - maxNotifications: - type: integer - format: uint32 - NotificationAPI_Get_Response: - type: object - properties: - notifications: - type: array - items: - $ref: "#/components/schemas/Notification" - NotificationFilter: - type: object - properties: - resourceType: - $ref: "#/components/schemas/ResourceType" - resourceId: - type: string - eventFilter: - $ref: "#/components/schemas/NotificationFilter_EventFilter" - payload: - $ref: "#/components/schemas/NotificationFilter_Payload" - NotificationFilter_EventFilter: - type: object - properties: - all: - type: boolean - resourceCreated: - type: boolean - resourceDeleted: - type: boolean - resourceReady: - type: boolean - resourceRecovered: - type: boolean - resourceDuplicate: - type: boolean - resourceError: - type: boolean - inputsLocked: - type: boolean - description: Field events - outputsLocked: - type: boolean - fieldCreated: - type: boolean - fieldGotError: - type: boolean - inputSet: - type: boolean - allInputsSet: - type: boolean - outputSet: - type: boolean - allOutputsSet: - type: boolean - genericOtwSet: - type: boolean - dynamicChanged: - type: boolean - NotificationFilter_Payload: - type: object - properties: - values: - type: object - additionalProperties: - type: string - format: bytes - Notification_Events: - type: object - properties: - resourceCreated: - type: boolean - resourceDeleted: - type: boolean - resourceReady: - type: boolean - resourceDuplicate: - type: boolean - resourceError: - type: boolean - inputsLocked: - type: boolean - outputsLocked: - type: boolean - fieldCreated: - type: boolean - fieldGotError: - type: boolean - inputSet: - type: boolean - allInputsSet: - type: boolean - outputSet: - type: boolean - allOutputsSet: - type: boolean - genericOtwSet: - type: boolean - dynamicChanged: - type: boolean - resourceRecovered: - type: boolean - Notification_FieldChange: - type: object - properties: - old: - $ref: "#/components/schemas/Field" - new: - $ref: "#/components/schemas/Field" - ResourceAPIFeature: - type: object - properties: - controllerType: - type: string - featureName: - type: string - resourceType: - $ref: "#/components/schemas/ResourceType" - endpoint: - type: string - ResourceSchema: - type: object - properties: - type: - $ref: "#/components/schemas/ResourceType" - fields: - type: array - items: - $ref: "#/components/schemas/FieldSchema" - accessFlags: - allOf: - - $ref: "#/components/schemas/ResourceSchema_AccessFlags" - description: Access restriction flags for non-controller roles - freeInputs: - type: boolean - freeOutputs: - type: boolean - ResourceSchema_AccessFlags: - type: object - properties: - createResource: - type: boolean - description: |- - Deny-list approach: default = allowed (true) - Controllers set these to false to restrict non-controller roles (role='u', role='w') - readFields: - type: boolean - description: "IMPORTANT: read_fields=false with write_fields=true is a forbidden combination" - writeFields: - type: boolean - readKv: - type: boolean - description: "IMPORTANT: read_kv=false with write_kv=true is a forbidden combination" - writeKv: - type: boolean - readByFieldType: - type: object - additionalProperties: - type: boolean - description: |- - Per-field-type overrides (map: field_type → bool) - When defined for a field type, overrides resource-level flags - writeByFieldType: - type: object - additionalProperties: - type: boolean - ResourceType: - type: object - properties: - name: - type: string - version: - type: string - Resource_Features: - type: object - properties: - ephemeral: - type: boolean - SpanInfo: - type: object - properties: - path: - type: string - carrier: - type: object - additionalProperties: - type: string - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - details: - type: array - items: - $ref: "#/components/schemas/GoogleProtobufAny" - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - description: "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)." - SubscriptionAPI_AttachFilter_Request: - type: object - properties: - subscriptionId: - type: string - filterName: - type: string - filterId: - type: string - SubscriptionAPI_AttachFilter_Response: - type: object - properties: {} - SubscriptionAPI_DetachFilter_Request: - type: object - properties: - subscriptionId: - type: string - filterName: - type: string - SubscriptionAPI_DetachFilter_Response: - type: object - properties: {} - TxAPI_Sync_Request: - type: object - properties: - txId: - type: string - TxAPI_Sync_Response: - type: object - properties: {} + All list see pl/platform/api/plapiserver/server_capabilities.go + MiscAPI_ListResourceTypes_Response: + type: object + properties: + types: + type: array + items: + $ref: '#/components/schemas/ResourceType' + Notification: + type: object + properties: + subscriptionId: + type: string + eventId: + type: string + resourceId: + type: string + resourceType: + $ref: '#/components/schemas/ResourceType' + events: + $ref: '#/components/schemas/Notification_Events' + fieldChanges: + type: object + additionalProperties: + $ref: '#/components/schemas/Notification_FieldChange' + payload: + $ref: '#/components/schemas/NotificationFilter_Payload' + filterName: + type: string + txSpan: + $ref: '#/components/schemas/SpanInfo' + NotificationAPI_Get_Request: + type: object + properties: + subscription: + type: string + maxNotifications: + type: integer + format: uint32 + NotificationAPI_Get_Response: + type: object + properties: + notifications: + type: array + items: + $ref: '#/components/schemas/Notification' + NotificationFilter: + type: object + properties: + resourceType: + $ref: '#/components/schemas/ResourceType' + resourceId: + type: string + eventFilter: + $ref: '#/components/schemas/NotificationFilter_EventFilter' + payload: + $ref: '#/components/schemas/NotificationFilter_Payload' + NotificationFilter_EventFilter: + type: object + properties: + all: + type: boolean + resourceCreated: + type: boolean + resourceDeleted: + type: boolean + resourceReady: + type: boolean + resourceRecovered: + type: boolean + resourceDuplicate: + type: boolean + resourceError: + type: boolean + inputsLocked: + type: boolean + description: Field events + outputsLocked: + type: boolean + fieldCreated: + type: boolean + fieldGotError: + type: boolean + inputSet: + type: boolean + allInputsSet: + type: boolean + outputSet: + type: boolean + allOutputsSet: + type: boolean + genericOtwSet: + type: boolean + dynamicChanged: + type: boolean + NotificationFilter_Payload: + type: object + properties: + values: + type: object + additionalProperties: + type: string + format: bytes + Notification_Events: + type: object + properties: + resourceCreated: + type: boolean + resourceDeleted: + type: boolean + resourceReady: + type: boolean + resourceDuplicate: + type: boolean + resourceError: + type: boolean + inputsLocked: + type: boolean + outputsLocked: + type: boolean + fieldCreated: + type: boolean + fieldGotError: + type: boolean + inputSet: + type: boolean + allInputsSet: + type: boolean + outputSet: + type: boolean + allOutputsSet: + type: boolean + genericOtwSet: + type: boolean + dynamicChanged: + type: boolean + resourceRecovered: + type: boolean + Notification_FieldChange: + type: object + properties: + old: + $ref: '#/components/schemas/Field' + new: + $ref: '#/components/schemas/Field' + ResourceAPIFeature: + type: object + properties: + controllerType: + type: string + featureName: + type: string + resourceType: + $ref: '#/components/schemas/ResourceType' + endpoint: + type: string + ResourceSchema: + type: object + properties: + type: + $ref: '#/components/schemas/ResourceType' + fields: + type: array + items: + $ref: '#/components/schemas/FieldSchema' + accessFlags: + allOf: + - $ref: '#/components/schemas/ResourceSchema_AccessFlags' + description: Access restriction flags for non-controller roles + freeInputs: + type: boolean + freeOutputs: + type: boolean + ResourceSchema_AccessFlags: + type: object + properties: + createResource: + type: boolean + description: |- + Deny-list approach: default = allowed (true) + Controllers set these to false to restrict non-controller roles (role='u', role='w') + readFields: + type: boolean + description: 'IMPORTANT: read_fields=false with write_fields=true is a forbidden combination' + writeFields: + type: boolean + readKv: + type: boolean + description: 'IMPORTANT: read_kv=false with write_kv=true is a forbidden combination' + writeKv: + type: boolean + readByFieldType: + type: object + additionalProperties: + type: boolean + description: |- + Per-field-type overrides (map: field_type → bool) + When defined for a field type, overrides resource-level flags + writeByFieldType: + type: object + additionalProperties: + type: boolean + ResourceType: + type: object + properties: + name: + type: string + version: + type: string + Resource_Features: + type: object + properties: + ephemeral: + type: boolean + SpanInfo: + type: object + properties: + path: + type: string + carrier: + type: object + additionalProperties: + type: string + Status: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).' + SubscriptionAPI_AttachFilter_Request: + type: object + properties: + subscriptionId: + type: string + filterName: + type: string + filterId: + type: string + SubscriptionAPI_AttachFilter_Response: + type: object + properties: {} + SubscriptionAPI_DetachFilter_Request: + type: object + properties: + subscriptionId: + type: string + filterName: + type: string + SubscriptionAPI_DetachFilter_Response: + type: object + properties: {} + TxAPI_Sync_Request: + type: object + properties: + txId: + type: string + TxAPI_Sync_Response: + type: object + properties: {} tags: - - name: Platform + - name: Platform diff --git a/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts b/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts index 619459020f..56d780b598 100644 --- a/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts +++ b/lib/node/pl-client/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "github.com/googleapis/googleapis/google/rpc/status.proto" (package "google.rpc", syntax proto3) // tslint:disable // -// Copyright 2025 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -39,8 +39,7 @@ import { Any } from "../../../../../google/protobuf/any"; */ export interface Status { /** - * The status code, which should be an enum value of - * [google.rpc.Code][google.rpc.Code]. + * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. * * @generated from protobuf field: int32 code = 1 */ @@ -48,8 +47,7 @@ export interface Status { /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the - * [google.rpc.Status.details][google.rpc.Status.details] field, or localized - * by the client. + * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. * * @generated from protobuf field: string message = 2 */ diff --git a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts index bc619b18a9..980641a8a4 100644 --- a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +++ b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts @@ -4,12 +4,16 @@ import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; import { Platform } from "./api"; +import type { CommandAPI_CommandResult } from "./api"; +import type { CommandAPI_Command } from "./api"; import type { MaintenanceAPI_License_Response } from "./api"; import type { MaintenanceAPI_License_Request } from "./api"; import type { MaintenanceAPI_Ping_Response } from "./api"; import type { MaintenanceAPI_Ping_Request } from "./api"; import type { MiscAPI_ListResourceTypes_Response } from "./api"; import type { MiscAPI_ListResourceTypes_Request } from "./api"; +import type { AuthAPI_ListUsers_Response } from "./api"; +import type { AuthAPI_ListUsers_Request } from "./api"; import type { AuthAPI_ListUserResources_Response } from "./api"; import type { AuthAPI_ListUserResources_Request } from "./api"; import type { AuthAPI_GetUserRoot_Response } from "./api"; @@ -284,6 +288,10 @@ export interface IPlatformClient { * @generated from protobuf rpc: ListUserResources */ listUserResources(input: AuthAPI_ListUserResources_Request, options?: RpcOptions): ServerStreamingCall; + /** + * @generated from protobuf rpc: ListUsers + */ + listUsers(input: AuthAPI_ListUsers_Request, options?: RpcOptions): UnaryCall; /** * * Other stuff @@ -304,6 +312,25 @@ export interface IPlatformClient { * @generated from protobuf rpc: License */ license(input: MaintenanceAPI_License_Request, options?: RpcOptions): UnaryCall; + /** + * + * Command bus (admin panel and future extension points) + * + * Query dispatches a named read-only command. The server opens a read + * transaction, runs the registered handler, and returns a JSON result. + * The dispatcher enforces per-command role requirements before running. + * + * @generated from protobuf rpc: Query + */ + query(input: CommandAPI_Command, options?: RpcOptions): UnaryCall; + /** + * Mutation dispatches a named write command. The server opens a write + * transaction, runs the registered handler, and commits on success. + * The dispatcher enforces per-command role requirements before running. + * + * @generated from protobuf rpc: Mutation + */ + mutation(input: CommandAPI_Command, options?: RpcOptions): UnaryCall; } /** * @generated from protobuf service MiLaboratories.PL.API.Platform @@ -613,6 +640,13 @@ export class PlatformClient implements IPlatformClient, ServiceInfo { const method = this.methods[33], opt = this._transport.mergeOptions(options); return stackIntercept("serverStreaming", this._transport, method, opt, input); } + /** + * @generated from protobuf rpc: ListUsers + */ + listUsers(input: AuthAPI_ListUsers_Request, options?: RpcOptions): UnaryCall { + const method = this.methods[34], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } /** * * Other stuff @@ -621,7 +655,7 @@ export class PlatformClient implements IPlatformClient, ServiceInfo { * @generated from protobuf rpc: ListResourceTypes */ listResourceTypes(input: MiscAPI_ListResourceTypes_Request, options?: RpcOptions): UnaryCall { - const method = this.methods[34], opt = this._transport.mergeOptions(options); + const method = this.methods[35], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** @@ -632,14 +666,39 @@ export class PlatformClient implements IPlatformClient, ServiceInfo { * @generated from protobuf rpc: Ping */ ping(input: MaintenanceAPI_Ping_Request, options?: RpcOptions): UnaryCall { - const method = this.methods[35], opt = this._transport.mergeOptions(options); + const method = this.methods[36], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: License */ license(input: MaintenanceAPI_License_Request, options?: RpcOptions): UnaryCall { - const method = this.methods[36], opt = this._transport.mergeOptions(options); + const method = this.methods[37], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } + /** + * + * Command bus (admin panel and future extension points) + * + * Query dispatches a named read-only command. The server opens a read + * transaction, runs the registered handler, and returns a JSON result. + * The dispatcher enforces per-command role requirements before running. + * + * @generated from protobuf rpc: Query + */ + query(input: CommandAPI_Command, options?: RpcOptions): UnaryCall { + const method = this.methods[38], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * Mutation dispatches a named write command. The server opens a write + * transaction, runs the registered handler, and commits on success. + * The dispatcher enforces per-command role requirements before running. + * + * @generated from protobuf rpc: Mutation + */ + mutation(input: CommandAPI_Command, options?: RpcOptions): UnaryCall { + const method = this.methods[39], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } } diff --git a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts index b6113f1bbd..b01c5994f4 100644 --- a/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts +++ b/lib/node/pl-client/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts @@ -539,6 +539,12 @@ export interface TxAPI_ClientMessage { * @generated from protobuf field: MiLaboratories.PL.API.AuthAPI.RevokeAccess.Request revoke_access = 411 */ revokeAccess: AuthAPI_RevokeAccess_Request; // revoke access to a resource within transaction + } | { + oneofKind: "listGrants"; + /** + * @generated from protobuf field: MiLaboratories.PL.API.AuthAPI.ListGrants.Request list_grants = 412 + */ + listGrants: AuthAPI_ListGrants_Request; // list grants on a resource within transaction } | { oneofKind: undefined; }; @@ -928,6 +934,12 @@ export interface TxAPI_ServerMessage { * @generated from protobuf field: MiLaboratories.PL.API.AuthAPI.RevokeAccess.Response revoke_access = 411 */ revokeAccess: AuthAPI_RevokeAccess_Response; + } | { + oneofKind: "listGrants"; + /** + * @generated from protobuf field: MiLaboratories.PL.API.AuthAPI.ListGrants.TxResponse list_grants = 412 + */ + listGrants: AuthAPI_ListGrants_TxResponse; } | { oneofKind: undefined; }; @@ -3991,6 +4003,15 @@ export interface AuthAPI_ListGrants_Response { */ grant?: AuthAPI_Grant; // one per stream message } +/** + * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.ListGrants.TxResponse + */ +export interface AuthAPI_ListGrants_TxResponse { + /** + * @generated from protobuf field: repeated MiLaboratories.PL.API.AuthAPI.Grant grants = 1 + */ + grants: AuthAPI_Grant[]; // all grants for the resource in a single transactional response +} /** * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.Grant */ @@ -4188,6 +4209,41 @@ export interface AuthAPI_ListUserResources_SharedResource { */ permissions?: AuthAPI_Grant_Permissions; } +/** + * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.User + */ +export interface AuthAPI_User { + /** + * login is the stable identifier of the user — the grant target and the + * GetUserRoot key. Further fields (e.g. first name, last name, email) may + * be added later without breaking compatibility. + * + * @generated from protobuf field: string login = 1 + */ + login: string; +} +/** + * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.ListUsers + */ +export interface AuthAPI_ListUsers { +} +/** + * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.ListUsers.Request + */ +export interface AuthAPI_ListUsers_Request { +} +/** + * Lists users known to the server. A user becomes known on first login; + * provisioned users who have never logged in do not appear. + * + * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.ListUsers.Response + */ +export interface AuthAPI_ListUsers_Response { + /** + * @generated from protobuf field: repeated MiLaboratories.PL.API.AuthAPI.User users = 1 + */ + users: AuthAPI_User[]; +} /** * @generated from protobuf enum MiLaboratories.PL.API.AuthAPI.Role */ @@ -4361,6 +4417,72 @@ export interface MaintenanceAPI_License_Response { */ responseBody: Uint8Array; } +/** + * CommandAPI groups all message types used by the command-bus RPCs + * (Query and Mutation). The proto contract is frozen; future commands + * are added by registering new handler names on the server — no proto + * changes are needed. + * + * @generated from protobuf message MiLaboratories.PL.API.CommandAPI + */ +export interface CommandAPI { +} +/** + * Command carries a named command with an optional JSON payload. + * + * @generated from protobuf message MiLaboratories.PL.API.CommandAPI.Command + */ +export interface CommandAPI_Command { + /** + * name identifies the registered handler (e.g. "users.list"). + * Must be non-empty. + * + * @generated from protobuf field: string name = 1 + */ + name: string; + /** + * payload is an opaque JSON object passed verbatim to the handler. + * May be empty when a command takes no arguments. + * + * @generated from protobuf field: bytes payload = 2 + */ + payload: Uint8Array; +} +/** + * CmdError is a structured application-level error returned inside + * CommandResult. It is separate from gRPC status codes, which are + * reserved for transport-level failures. + * + * @generated from protobuf message MiLaboratories.PL.API.CommandAPI.CmdError + */ +export interface CommandAPI_CmdError { + /** + * @generated from protobuf field: string message = 1 + */ + message: string; + /** + * @generated from protobuf field: string code = 2 + */ + code: string; +} +/** + * CommandResult carries the JSON response from a handler and any + * application-level errors it produced. + * + * @generated from protobuf message MiLaboratories.PL.API.CommandAPI.CommandResult + */ +export interface CommandAPI_CommandResult { + /** + * data is the JSON-encoded result. Empty when errors is non-empty. + * + * @generated from protobuf field: bytes data = 1 + */ + data: Uint8Array; + /** + * @generated from protobuf field: repeated MiLaboratories.PL.API.CommandAPI.CmdError errors = 2 + */ + errors: CommandAPI_CmdError[]; +} /** * @generated from protobuf message MiLaboratories.PL.API.Util */ @@ -4474,7 +4596,8 @@ class TxAPI_ClientMessage$Type extends MessageType { { no: 351, name: "controller_features_clear", kind: "message", oneof: "request", T: () => ControllerAPI_ClearFeatures_Request }, { no: 400, name: "set_default_color", kind: "message", oneof: "request", T: () => TxAPI_SetDefaultColor_Request }, { no: 410, name: "grant_access", kind: "message", oneof: "request", T: () => AuthAPI_GrantAccess_Request }, - { no: 411, name: "revoke_access", kind: "message", oneof: "request", T: () => AuthAPI_RevokeAccess_Request } + { no: 411, name: "revoke_access", kind: "message", oneof: "request", T: () => AuthAPI_RevokeAccess_Request }, + { no: 412, name: "list_grants", kind: "message", oneof: "request", T: () => AuthAPI_ListGrants_Request } ]); } create(value?: PartialMessage): TxAPI_ClientMessage { @@ -4859,6 +4982,12 @@ class TxAPI_ClientMessage$Type extends MessageType { revokeAccess: AuthAPI_RevokeAccess_Request.internalBinaryRead(reader, reader.uint32(), options, (message.request as any).revokeAccess) }; break; + case /* MiLaboratories.PL.API.AuthAPI.ListGrants.Request list_grants */ 412: + message.request = { + oneofKind: "listGrants", + listGrants: AuthAPI_ListGrants_Request.internalBinaryRead(reader, reader.uint32(), options, (message.request as any).listGrants) + }; + break; default: let u = options.readUnknownField; if (u === "throw") @@ -5057,6 +5186,9 @@ class TxAPI_ClientMessage$Type extends MessageType { /* MiLaboratories.PL.API.AuthAPI.RevokeAccess.Request revoke_access = 411; */ if (message.request.oneofKind === "revokeAccess") AuthAPI_RevokeAccess_Request.internalBinaryWrite(message.request.revokeAccess, writer.tag(411, WireType.LengthDelimited).fork(), options).join(); + /* MiLaboratories.PL.API.AuthAPI.ListGrants.Request list_grants = 412; */ + if (message.request.oneofKind === "listGrants") + AuthAPI_ListGrants_Request.internalBinaryWrite(message.request.listGrants, writer.tag(412, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -5134,6 +5266,7 @@ class TxAPI_ServerMessage$Type extends MessageType { { no: 400, name: "set_default_color", kind: "message", oneof: "response", T: () => TxAPI_SetDefaultColor_Response }, { no: 410, name: "grant_access", kind: "message", oneof: "response", T: () => AuthAPI_GrantAccess_Response }, { no: 411, name: "revoke_access", kind: "message", oneof: "response", T: () => AuthAPI_RevokeAccess_Response }, + { no: 412, name: "list_grants", kind: "message", oneof: "response", T: () => AuthAPI_ListGrants_TxResponse }, { no: 3, name: "error", kind: "message", T: () => Status } ]); } @@ -5522,6 +5655,12 @@ class TxAPI_ServerMessage$Type extends MessageType { revokeAccess: AuthAPI_RevokeAccess_Response.internalBinaryRead(reader, reader.uint32(), options, (message.response as any).revokeAccess) }; break; + case /* MiLaboratories.PL.API.AuthAPI.ListGrants.TxResponse list_grants */ 412: + message.response = { + oneofKind: "listGrants", + listGrants: AuthAPI_ListGrants_TxResponse.internalBinaryRead(reader, reader.uint32(), options, (message.response as any).listGrants) + }; + break; case /* google.rpc.Status error */ 3: message.error = Status.internalBinaryRead(reader, reader.uint32(), options, message.error); break; @@ -5729,6 +5868,9 @@ class TxAPI_ServerMessage$Type extends MessageType { /* MiLaboratories.PL.API.AuthAPI.RevokeAccess.Response revoke_access = 411; */ if (message.response.oneofKind === "revokeAccess") AuthAPI_RevokeAccess_Response.internalBinaryWrite(message.response.revokeAccess, writer.tag(411, WireType.LengthDelimited).fork(), options).join(); + /* MiLaboratories.PL.API.AuthAPI.ListGrants.TxResponse list_grants = 412; */ + if (message.response.oneofKind === "listGrants") + AuthAPI_ListGrants_TxResponse.internalBinaryWrite(message.response.listGrants, writer.tag(412, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -19063,6 +19205,53 @@ class AuthAPI_ListGrants_Response$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.AuthAPI.ListGrants.TxResponse", [ + { no: 1, name: "grants", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AuthAPI_Grant } + ]); + } + create(value?: PartialMessage): AuthAPI_ListGrants_TxResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.grants = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthAPI_ListGrants_TxResponse): AuthAPI_ListGrants_TxResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated MiLaboratories.PL.API.AuthAPI.Grant grants */ 1: + message.grants.push(AuthAPI_Grant.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: AuthAPI_ListGrants_TxResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated MiLaboratories.PL.API.AuthAPI.Grant grants = 1; */ + for (let i = 0; i < message.grants.length; i++) + AuthAPI_Grant.internalBinaryWrite(message.grants[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 MiLaboratories.PL.API.AuthAPI.ListGrants.TxResponse + */ +export const AuthAPI_ListGrants_TxResponse = new AuthAPI_ListGrants_TxResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods class AuthAPI_Grant$Type extends MessageType { constructor() { super("MiLaboratories.PL.API.AuthAPI.Grant", [ @@ -19775,6 +19964,176 @@ class AuthAPI_ListUserResources_SharedResource$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.AuthAPI.User", [ + { no: 1, name: "login", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AuthAPI_User { + const message = globalThis.Object.create((this.messagePrototype!)); + message.login = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthAPI_User): AuthAPI_User { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string login */ 1: + message.login = 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: AuthAPI_User, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string login = 1; */ + if (message.login !== "") + writer.tag(1, WireType.LengthDelimited).string(message.login); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message MiLaboratories.PL.API.AuthAPI.User + */ +export const AuthAPI_User = new AuthAPI_User$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AuthAPI_ListUsers$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.AuthAPI.ListUsers", []); + } + create(value?: PartialMessage): AuthAPI_ListUsers { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthAPI_ListUsers): AuthAPI_ListUsers { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + 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: AuthAPI_ListUsers, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message MiLaboratories.PL.API.AuthAPI.ListUsers + */ +export const AuthAPI_ListUsers = new AuthAPI_ListUsers$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AuthAPI_ListUsers_Request$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.AuthAPI.ListUsers.Request", []); + } + create(value?: PartialMessage): AuthAPI_ListUsers_Request { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthAPI_ListUsers_Request): AuthAPI_ListUsers_Request { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + 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: AuthAPI_ListUsers_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message MiLaboratories.PL.API.AuthAPI.ListUsers.Request + */ +export const AuthAPI_ListUsers_Request = new AuthAPI_ListUsers_Request$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AuthAPI_ListUsers_Response$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.AuthAPI.ListUsers.Response", [ + { no: 1, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AuthAPI_User } + ]); + } + create(value?: PartialMessage): AuthAPI_ListUsers_Response { + const message = globalThis.Object.create((this.messagePrototype!)); + message.users = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthAPI_ListUsers_Response): AuthAPI_ListUsers_Response { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated MiLaboratories.PL.API.AuthAPI.User users */ 1: + message.users.push(AuthAPI_User.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: AuthAPI_ListUsers_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated MiLaboratories.PL.API.AuthAPI.User users = 1; */ + for (let i = 0; i < message.users.length; i++) + AuthAPI_User.internalBinaryWrite(message.users[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 MiLaboratories.PL.API.AuthAPI.ListUsers.Response + */ +export const AuthAPI_ListUsers_Response = new AuthAPI_ListUsers_Response$Type(); +// @generated message type with reflection information, may provide speed optimized methods class MiscAPI$Type extends MessageType { constructor() { super("MiLaboratories.PL.API.MiscAPI", []); @@ -20292,6 +20651,209 @@ class MaintenanceAPI_License_Response$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.CommandAPI", []); + } + create(value?: PartialMessage): CommandAPI { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI): CommandAPI { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + 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: CommandAPI, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message MiLaboratories.PL.API.CommandAPI + */ +export const CommandAPI = new CommandAPI$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CommandAPI_Command$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.CommandAPI.Command", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "payload", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } + create(value?: PartialMessage): CommandAPI_Command { + const message = globalThis.Object.create((this.messagePrototype!)); + message.name = ""; + message.payload = new Uint8Array(0); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI_Command): CommandAPI_Command { + 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 /* bytes payload */ 2: + message.payload = reader.bytes(); + 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: CommandAPI_Command, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* bytes payload = 2; */ + if (message.payload.length) + writer.tag(2, WireType.LengthDelimited).bytes(message.payload); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message MiLaboratories.PL.API.CommandAPI.Command + */ +export const CommandAPI_Command = new CommandAPI_Command$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CommandAPI_CmdError$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.CommandAPI.CmdError", [ + { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "code", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): CommandAPI_CmdError { + const message = globalThis.Object.create((this.messagePrototype!)); + message.message = ""; + message.code = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI_CmdError): CommandAPI_CmdError { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string message */ 1: + message.message = reader.string(); + break; + case /* string code */ 2: + message.code = 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: CommandAPI_CmdError, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string message = 1; */ + if (message.message !== "") + writer.tag(1, WireType.LengthDelimited).string(message.message); + /* string code = 2; */ + if (message.code !== "") + writer.tag(2, WireType.LengthDelimited).string(message.code); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message MiLaboratories.PL.API.CommandAPI.CmdError + */ +export const CommandAPI_CmdError = new CommandAPI_CmdError$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CommandAPI_CommandResult$Type extends MessageType { + constructor() { + super("MiLaboratories.PL.API.CommandAPI.CommandResult", [ + { no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "errors", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CommandAPI_CmdError } + ]); + } + create(value?: PartialMessage): CommandAPI_CommandResult { + const message = globalThis.Object.create((this.messagePrototype!)); + message.data = new Uint8Array(0); + message.errors = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CommandAPI_CommandResult): CommandAPI_CommandResult { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes data */ 1: + message.data = reader.bytes(); + break; + case /* repeated MiLaboratories.PL.API.CommandAPI.CmdError errors */ 2: + message.errors.push(CommandAPI_CmdError.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: CommandAPI_CommandResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bytes data = 1; */ + if (message.data.length) + writer.tag(1, WireType.LengthDelimited).bytes(message.data); + /* repeated MiLaboratories.PL.API.CommandAPI.CmdError errors = 2; */ + for (let i = 0; i < message.errors.length; i++) + CommandAPI_CmdError.internalBinaryWrite(message.errors[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 MiLaboratories.PL.API.CommandAPI.CommandResult + */ +export const CommandAPI_CommandResult = new CommandAPI_CommandResult$Type(); +// @generated message type with reflection information, may provide speed optimized methods class Util$Type extends MessageType { constructor() { super("MiLaboratories.PL.API.Util", []); @@ -20405,7 +20967,10 @@ export const Platform = new ServiceType("MiLaboratories.PL.API.Platform", [ { name: "MintSignature", options: { "google.api.http": { post: "/v1/auth/mint-signature", body: "*" } }, I: AuthAPI_MintSignature_Request, O: AuthAPI_MintSignature_Response }, { name: "GetUserRoot", options: { "google.api.http": { post: "/v1/auth/user-root", body: "*" } }, I: AuthAPI_GetUserRoot_Request, O: AuthAPI_GetUserRoot_Response }, { name: "ListUserResources", serverStreaming: true, options: {}, I: AuthAPI_ListUserResources_Request, O: AuthAPI_ListUserResources_Response }, + { name: "ListUsers", options: {}, I: AuthAPI_ListUsers_Request, O: AuthAPI_ListUsers_Response }, { name: "ListResourceTypes", options: { "google.api.http": { get: "/v1/resource-types" } }, I: MiscAPI_ListResourceTypes_Request, O: MiscAPI_ListResourceTypes_Response }, { name: "Ping", options: { "google.api.http": { get: "/v1/ping" } }, I: MaintenanceAPI_Ping_Request, O: MaintenanceAPI_Ping_Response }, - { name: "License", options: { "google.api.http": { get: "/v1/license" } }, I: MaintenanceAPI_License_Request, O: MaintenanceAPI_License_Response } + { name: "License", options: { "google.api.http": { get: "/v1/license" } }, I: MaintenanceAPI_License_Request, O: MaintenanceAPI_License_Response }, + { name: "Query", options: { "google.api.http": { post: "/v1/command/query", body: "*" } }, I: CommandAPI_Command, O: CommandAPI_CommandResult }, + { name: "Mutation", options: { "google.api.http": { post: "/v1/command/mutation", body: "*" } }, I: CommandAPI_Command, O: CommandAPI_CommandResult } ]); diff --git a/lib/node/pl-client/src/proto-grpc/google/api/http.ts b/lib/node/pl-client/src/proto-grpc/google/api/http.ts index 5b28d5e649..abbf6eab57 100644 --- a/lib/node/pl-client/src/proto-grpc/google/api/http.ts +++ b/lib/node/pl-client/src/proto-grpc/google/api/http.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3) // tslint:disable // -// Copyright 2025 Google LLC +// Copyright 2015 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -54,7 +54,7 @@ export interface Http { fullyDecodeReservedExpansion: boolean; } /** - * gRPC Transcoding + * # gRPC Transcoding * * gRPC Transcoding is a feature for mapping between a gRPC method and one or * more HTTP REST endpoints. It allows developers to build a single API service @@ -95,8 +95,9 @@ export interface Http { * * This enables an HTTP REST to gRPC mapping as below: * - * - HTTP: `GET /v1/messages/123456` - * - gRPC: `GetMessage(name: "messages/123456")` + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` * * Any fields in the request message which are not bound by the path template * automatically become HTTP query parameters if there is no HTTP request body. @@ -120,9 +121,11 @@ export interface Http { * * This enables a HTTP JSON to RPC mapping as below: * - * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub: - * SubMessage(subfield: "foo"))` + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | + * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: + * "foo"))` * * Note that fields which are mapped to URL query parameters must have a * primitive type or a repeated primitive type or a non-repeated message type. @@ -152,8 +155,10 @@ export interface Http { * representation of the JSON in the request body is determined by * protos JSON encoding: * - * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })` + * HTTP | gRPC + * -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: + * "123456" message { text: "Hi!" })` * * The special name `*` can be used in the body mapping to define that * every field not bound by the path template should be mapped to the @@ -176,8 +181,10 @@ export interface Http { * * The following HTTP JSON to RPC mapping is enabled: * - * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")` + * HTTP | gRPC + * -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: + * "123456" text: "Hi!")` * * Note that when using `*` in the body mapping, it is not possible to * have HTTP parameters, as all fields not bound by the path end in @@ -205,32 +212,29 @@ export interface Http { * * This enables the following two alternative HTTP JSON to RPC mappings: * - * - HTTP: `GET /v1/messages/123456` - * - gRPC: `GetMessage(message_id: "123456")` + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: + * "123456")` * - * - HTTP: `GET /v1/users/me/messages/123456` - * - gRPC: `GetMessage(user_id: "me" message_id: "123456")` - * - * Rules for HTTP mapping + * ## Rules for HTTP mapping * * 1. Leaf request fields (recursive expansion nested messages in the request * message) are classified into three categories: * - Fields referred by the path template. They are passed via the URL path. - * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They - * are passed via the HTTP + * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP * request body. * - All other fields are passed via the URL query parameters, and the * parameter name is the field path in the request message. A repeated * field can be represented as multiple query parameters under the same * name. - * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL - * query parameter, all fields + * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields * are passed via URL path and HTTP request body. - * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP - * request body, all + * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all * fields are passed via URL path and URL query parameters. * - * Path template syntax + * ### Path template syntax * * Template = "/" Segments [ Verb ] ; * Segments = Segment { "/" Segment } ; @@ -269,7 +273,7 @@ export interface Http { * Document](https://developers.google.com/discovery/v1/reference/apis) as * `{+var}`. * - * Using gRPC API Service Configuration + * ## Using gRPC API Service Configuration * * gRPC API Service Configuration (service config) is a configuration language * for configuring a gRPC service to become a user-facing product. The @@ -284,14 +288,15 @@ export interface Http { * specified in the service config will override any matching transcoding * configuration in the proto. * - * The following example selects a gRPC method and applies an `HttpRule` to it: + * Example: * * http: * rules: + * # Selects a gRPC method and applies HttpRule to it. * - selector: example.v1.Messaging.GetMessage * get: /v1/messages/{message_id}/{sub.subfield} * - * Special notes + * ## Special notes * * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the * proto to JSON conversion must follow the [proto3 @@ -325,8 +330,7 @@ export interface HttpRule { /** * Selects a method to which this rule applies. * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax - * details. + * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. * * @generated from protobuf field: string selector = 1 */ diff --git a/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts b/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts index 3c4ff7f9eb..4425ce146b 100644 --- a/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts +++ b/lib/node/pl-client/src/proto-grpc/google/rpc/code.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "google/rpc/code.proto" (package "google.rpc", syntax proto3) // tslint:disable // -// Copyright 2025 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ */ export enum Code { /** - * Not an error; returned on success. + * Not an error; returned on success * * HTTP Mapping: 200 OK * @@ -83,7 +83,7 @@ export enum Code { * Some requested entity (e.g., file or directory) was not found. * * Note to server developers: if a request is denied for an entire class - * of users, such as gradual feature rollout or undocumented allowlist, + * of users, such as gradual feature rollout or undocumented whitelist, * `NOT_FOUND` may be used. If a request is denied for some users within * a class of users, such as user-based access control, `PERMISSION_DENIED` * must be used. @@ -144,11 +144,11 @@ export enum Code { * Service implementors can use the following guidelines to decide * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: * (a) Use `UNAVAILABLE` if the client can retry just the failing call. - * (b) Use `ABORTED` if the client should retry at a higher level. For - * example, when a client-specified test-and-set fails, indicating the - * client should restart a read-modify-write sequence. + * (b) Use `ABORTED` if the client should retry at a higher level + * (e.g., when a client-specified test-and-set fails, indicating the + * client should restart a read-modify-write sequence). * (c) Use `FAILED_PRECONDITION` if the client should not retry until - * the system state has been explicitly fixed. For example, if an "rmdir" + * the system state has been explicitly fixed. E.g., if an "rmdir" * fails because the directory is non-empty, `FAILED_PRECONDITION` * should be returned since the client should not retry unless * the files are deleted from the directory. diff --git a/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts b/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts index 94b830f8b1..3066e19507 100644 --- a/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts +++ b/lib/node/pl-client/src/proto-grpc/google/rpc/error_details.ts @@ -2,7 +2,7 @@ // @generated from protobuf file "google/rpc/error_details.proto" (package "google.rpc", syntax proto3) // tslint:disable // -// Copyright 2025 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,73 +26,6 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { Duration } from "../protobuf/duration"; -/** - * Describes the cause of the error with structured details. - * - * Example of an error when contacting the "pubsub.googleapis.com" API when it - * is not enabled: - * - * { "reason": "API_DISABLED" - * "domain": "googleapis.com" - * "metadata": { - * "resource": "projects/123", - * "service": "pubsub.googleapis.com" - * } - * } - * - * This response indicates that the pubsub.googleapis.com API is not enabled. - * - * Example of an error that is returned when attempting to create a Spanner - * instance in a region that is out of stock: - * - * { "reason": "STOCKOUT" - * "domain": "spanner.googleapis.com", - * "metadata": { - * "availableRegions": "us-central1,us-east2" - * } - * } - * - * @generated from protobuf message google.rpc.ErrorInfo - */ -export interface ErrorInfo { - /** - * The reason of the error. This is a constant value that identifies the - * proximate cause of the error. Error reasons are unique within a particular - * domain of errors. This should be at most 63 characters and match a - * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents - * UPPER_SNAKE_CASE. - * - * @generated from protobuf field: string reason = 1 - */ - reason: string; - /** - * The logical grouping to which the "reason" belongs. The error domain - * is typically the registered service name of the tool or product that - * generates the error. Example: "pubsub.googleapis.com". If the error is - * generated by some common infrastructure, the error domain must be a - * globally unique value that identifies the infrastructure. For Google API - * infrastructure, the error domain is "googleapis.com". - * - * @generated from protobuf field: string domain = 2 - */ - domain: string; - /** - * Additional structured details about this error. - * - * Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should - * ideally be lowerCamelCase. Also, they must be limited to 64 characters in - * length. When identifying the current value of an exceeded limit, the units - * should be contained in the key, not the value. For example, rather than - * `{"instanceLimit": "100/request"}`, should be returned as, - * `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of - * instances that can be created in a single (batch) request. - * - * @generated from protobuf field: map metadata = 3 - */ - metadata: { - [key: string]: string; - }; -} /** * Describes when the clients can retry a failed request. Clients could ignore * the recommendation here or retry when this information is missing from error @@ -187,91 +120,71 @@ export interface QuotaFailure_Violation { * @generated from protobuf field: string description = 2 */ description: string; +} +/** + * Describes the cause of the error with structured details. + * + * Example of an error when contacting the "pubsub.googleapis.com" API when it + * is not enabled: + * + * { "reason": "API_DISABLED" + * "domain": "googleapis.com" + * "metadata": { + * "resource": "projects/123", + * "service": "pubsub.googleapis.com" + * } + * } + * + * This response indicates that the pubsub.googleapis.com API is not enabled. + * + * Example of an error that is returned when attempting to create a Spanner + * instance in a region that is out of stock: + * + * { "reason": "STOCKOUT" + * "domain": "spanner.googleapis.com", + * "metadata": { + * "availableRegions": "us-central1,us-east2" + * } + * } + * + * @generated from protobuf message google.rpc.ErrorInfo + */ +export interface ErrorInfo { /** - * The API Service from which the `QuotaFailure.Violation` orginates. In - * some cases, Quota issues originate from an API Service other than the one - * that was called. In other words, a dependency of the called API Service - * could be the cause of the `QuotaFailure`, and this field would have the - * dependency API service name. - * - * For example, if the called API is Kubernetes Engine API - * (container.googleapis.com), and a quota violation occurs in the - * Kubernetes Engine API itself, this field would be - * "container.googleapis.com". On the other hand, if the quota violation - * occurs when the Kubernetes Engine API creates VMs in the Compute Engine - * API (compute.googleapis.com), this field would be - * "compute.googleapis.com". - * - * @generated from protobuf field: string api_service = 3 - */ - apiService: string; - /** - * The metric of the violated quota. A quota metric is a named counter to - * measure usage, such as API requests or CPUs. When an activity occurs in a - * service, such as Virtual Machine allocation, one or more quota metrics - * may be affected. - * - * For example, "compute.googleapis.com/cpus_per_vm_family", - * "storage.googleapis.com/internet_egress_bandwidth". + * The reason of the error. This is a constant value that identifies the + * proximate cause of the error. Error reasons are unique within a particular + * domain of errors. This should be at most 63 characters and match + * /[A-Z0-9_]+/. * - * @generated from protobuf field: string quota_metric = 4 + * @generated from protobuf field: string reason = 1 */ - quotaMetric: string; + reason: string; /** - * The id of the violated quota. Also know as "limit name", this is the - * unique identifier of a quota in the context of an API service. - * - * For example, "CPUS-PER-VM-FAMILY-per-project-region". + * The logical grouping to which the "reason" belongs. The error domain + * is typically the registered service name of the tool or product that + * generates the error. Example: "pubsub.googleapis.com". If the error is + * generated by some common infrastructure, the error domain must be a + * globally unique value that identifies the infrastructure. For Google API + * infrastructure, the error domain is "googleapis.com". * - * @generated from protobuf field: string quota_id = 5 + * @generated from protobuf field: string domain = 2 */ - quotaId: string; + domain: string; /** - * The dimensions of the violated quota. Every non-global quota is enforced - * on a set of dimensions. While quota metric defines what to count, the - * dimensions specify for what aspects the counter should be increased. - * - * For example, the quota "CPUs per region per VM family" enforces a limit - * on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions - * "region" and "vm_family". And if the violation occurred in region - * "us-central1" and for VM family "n1", the quota_dimensions would be, - * - * { - * "region": "us-central1", - * "vm_family": "n1", - * } + * Additional structured details about this error. * - * When a quota is enforced globally, the quota_dimensions would always be - * empty. + * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in + * length. When identifying the current value of an exceeded limit, the units + * should be contained in the key, not the value. For example, rather than + * {"instanceLimit": "100/request"}, should be returned as, + * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of + * instances that can be created in a single (batch) request. * - * @generated from protobuf field: map quota_dimensions = 6 + * @generated from protobuf field: map metadata = 3 */ - quotaDimensions: { + metadata: { [key: string]: string; }; - /** - * The enforced quota value at the time of the `QuotaFailure`. - * - * For example, if the enforced quota value at the time of the - * `QuotaFailure` on the number of CPUs is "10", then the value of this - * field would reflect this quantity. - * - * @generated from protobuf field: int64 quota_value = 7 - */ - quotaValue: bigint; - /** - * The new quota value being rolled out at the time of the violation. At the - * completion of the rollout, this value will be enforced in place of - * quota_value. If no rollout is in progress at the time of the violation, - * this field is not set. - * - * For example, if at the time of the violation a rollout is in progress - * changing the number of CPUs quota from 10 to 20, 20 would be the value of - * this field. - * - * @generated from protobuf field: optional int64 future_quota_value = 8 - */ - futureQuotaValue?: bigint; } /** * Describes what preconditions have failed. @@ -343,43 +256,9 @@ export interface BadRequest { */ export interface BadRequest_FieldViolation { /** - * A path that leads to a field in the request body. The value will be a + * A path leading to a field in the request body. The value will be a * sequence of dot-separated identifiers that identify a protocol buffer - * field. - * - * Consider the following: - * - * message CreateContactRequest { - * message EmailAddress { - * enum Type { - * TYPE_UNSPECIFIED = 0; - * HOME = 1; - * WORK = 2; - * } - * - * optional string email = 1; - * repeated EmailType type = 2; - * } - * - * string full_name = 1; - * repeated EmailAddress email_addresses = 2; - * } - * - * In this example, in proto `field` could take one of the following values: - * - * * `full_name` for a violation in the `full_name` value - * * `email_addresses[1].email` for a violation in the `email` field of the - * first `email_addresses` message - * * `email_addresses[3].type[2]` for a violation in the second `type` - * value in the third `email_addresses` message. - * - * In JSON, the same values are represented as: - * - * * `fullName` for a violation in the `fullName` value - * * `emailAddresses[1].email` for a violation in the `email` field of the - * first `emailAddresses` message - * * `emailAddresses[3].type[2]` for a violation in the second `type` - * value in the third `emailAddresses` message. + * field. E.g., "field_violations.field" would identify this field. * * @generated from protobuf field: string field = 1 */ @@ -390,24 +269,6 @@ export interface BadRequest_FieldViolation { * @generated from protobuf field: string description = 2 */ description: string; - /** - * The reason of the field-level error. This is a constant value that - * identifies the proximate cause of the field-level error. It should - * uniquely identify the type of the FieldViolation within the scope of the - * google.rpc.ErrorInfo.domain. This should be at most 63 - * characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, - * which represents UPPER_SNAKE_CASE. - * - * @generated from protobuf field: string reason = 3 - */ - reason: string; - /** - * Provides a localized error message for field-level errors that is safe to - * return to the API consumer. - * - * @generated from protobuf field: google.rpc.LocalizedMessage localized_message = 4 - */ - localizedMessage?: LocalizedMessage; } /** * Contains metadata about the request that clients can attach when filing a bug @@ -448,8 +309,7 @@ export interface ResourceInfo { /** * The name of the resource being accessed. For example, a shared calendar * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - * error is - * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. + * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. * * @generated from protobuf field: string resource_name = 2 */ @@ -516,7 +376,7 @@ export interface Help_Link { export interface LocalizedMessage { /** * The locale used following the specification defined at - * https://www.rfc-editor.org/rfc/bcp/bcp47.txt. + * http://www.rfc-editor.org/rfc/bcp/bcp47.txt. * Examples are: "en-US", "fr-CH", "es-MX" * * @generated from protobuf field: string locale = 1 @@ -530,85 +390,6 @@ export interface LocalizedMessage { message: string; } // @generated message type with reflection information, may provide speed optimized methods -class ErrorInfo$Type extends MessageType { - constructor() { - super("google.rpc.ErrorInfo", [ - { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "domain", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } - ]); - } - create(value?: PartialMessage): ErrorInfo { - const message = globalThis.Object.create((this.messagePrototype!)); - message.reason = ""; - message.domain = ""; - message.metadata = {}; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ErrorInfo): ErrorInfo { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string reason */ 1: - message.reason = reader.string(); - break; - case /* string domain */ 2: - message.domain = reader.string(); - break; - case /* map metadata */ 3: - this.binaryReadMap3(message.metadata, reader, 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; - } - private binaryReadMap3(map: ErrorInfo["metadata"], reader: IBinaryReader, options: BinaryReadOptions): void { - let len = reader.uint32(), end = reader.pos + len, key: keyof ErrorInfo["metadata"] | undefined, val: ErrorInfo["metadata"][any] | undefined; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - key = reader.string(); - break; - case 2: - val = reader.string(); - break; - default: throw new globalThis.Error("unknown map entry field for google.rpc.ErrorInfo.metadata"); - } - } - map[key ?? ""] = val ?? ""; - } - internalBinaryWrite(message: ErrorInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string reason = 1; */ - if (message.reason !== "") - writer.tag(1, WireType.LengthDelimited).string(message.reason); - /* string domain = 2; */ - if (message.domain !== "") - writer.tag(2, WireType.LengthDelimited).string(message.domain); - /* map metadata = 3; */ - for (let k of globalThis.Object.keys(message.metadata)) - writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.rpc.ErrorInfo - */ -export const ErrorInfo = new ErrorInfo$Type(); -// @generated message type with reflection information, may provide speed optimized methods class RetryInfo$Type extends MessageType { constructor() { super("google.rpc.RetryInfo", [ @@ -761,24 +542,13 @@ class QuotaFailure_Violation$Type extends MessageType { constructor() { super("google.rpc.QuotaFailure.Violation", [ { no: 1, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "api_service", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "quota_metric", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 5, name: "quota_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 6, name: "quota_dimensions", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }, - { no: 7, name: "quota_value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 8, name: "future_quota_value", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): QuotaFailure_Violation { const message = globalThis.Object.create((this.messagePrototype!)); message.subject = ""; message.description = ""; - message.apiService = ""; - message.quotaMetric = ""; - message.quotaId = ""; - message.quotaDimensions = {}; - message.quotaValue = 0n; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -794,23 +564,65 @@ class QuotaFailure_Violation$Type extends MessageType { case /* string description */ 2: message.description = reader.string(); break; - case /* string api_service */ 3: - message.apiService = reader.string(); - break; - case /* string quota_metric */ 4: - message.quotaMetric = reader.string(); - break; - case /* string quota_id */ 5: - message.quotaId = reader.string(); - break; - case /* map quota_dimensions */ 6: - this.binaryReadMap6(message.quotaDimensions, reader, options); + 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: QuotaFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string subject = 1; */ + if (message.subject !== "") + writer.tag(1, WireType.LengthDelimited).string(message.subject); + /* string description = 2; */ + if (message.description !== "") + writer.tag(2, WireType.LengthDelimited).string(message.description); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.rpc.QuotaFailure.Violation + */ +export const QuotaFailure_Violation = new QuotaFailure_Violation$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ErrorInfo$Type extends MessageType { + constructor() { + super("google.rpc.ErrorInfo", [ + { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "domain", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } + ]); + } + create(value?: PartialMessage): ErrorInfo { + const message = globalThis.Object.create((this.messagePrototype!)); + message.reason = ""; + message.domain = ""; + message.metadata = {}; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ErrorInfo): ErrorInfo { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string reason */ 1: + message.reason = reader.string(); break; - case /* int64 quota_value */ 7: - message.quotaValue = reader.int64().toBigInt(); + case /* string domain */ 2: + message.domain = reader.string(); break; - case /* optional int64 future_quota_value */ 8: - message.futureQuotaValue = reader.int64().toBigInt(); + case /* map metadata */ 3: + this.binaryReadMap3(message.metadata, reader, options); break; default: let u = options.readUnknownField; @@ -823,8 +635,8 @@ class QuotaFailure_Violation$Type extends MessageType { } return message; } - private binaryReadMap6(map: QuotaFailure_Violation["quotaDimensions"], reader: IBinaryReader, options: BinaryReadOptions): void { - let len = reader.uint32(), end = reader.pos + len, key: keyof QuotaFailure_Violation["quotaDimensions"] | undefined, val: QuotaFailure_Violation["quotaDimensions"][any] | undefined; + private binaryReadMap3(map: ErrorInfo["metadata"], reader: IBinaryReader, options: BinaryReadOptions): void { + let len = reader.uint32(), end = reader.pos + len, key: keyof ErrorInfo["metadata"] | undefined, val: ErrorInfo["metadata"][any] | undefined; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -834,36 +646,21 @@ class QuotaFailure_Violation$Type extends MessageType { case 2: val = reader.string(); break; - default: throw new globalThis.Error("unknown map entry field for google.rpc.QuotaFailure.Violation.quota_dimensions"); + default: throw new globalThis.Error("unknown map entry field for google.rpc.ErrorInfo.metadata"); } } map[key ?? ""] = val ?? ""; } - internalBinaryWrite(message: QuotaFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string subject = 1; */ - if (message.subject !== "") - writer.tag(1, WireType.LengthDelimited).string(message.subject); - /* string description = 2; */ - if (message.description !== "") - writer.tag(2, WireType.LengthDelimited).string(message.description); - /* string api_service = 3; */ - if (message.apiService !== "") - writer.tag(3, WireType.LengthDelimited).string(message.apiService); - /* string quota_metric = 4; */ - if (message.quotaMetric !== "") - writer.tag(4, WireType.LengthDelimited).string(message.quotaMetric); - /* string quota_id = 5; */ - if (message.quotaId !== "") - writer.tag(5, WireType.LengthDelimited).string(message.quotaId); - /* map quota_dimensions = 6; */ - for (let k of globalThis.Object.keys(message.quotaDimensions)) - writer.tag(6, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.quotaDimensions[k]).join(); - /* int64 quota_value = 7; */ - if (message.quotaValue !== 0n) - writer.tag(7, WireType.Varint).int64(message.quotaValue); - /* optional int64 future_quota_value = 8; */ - if (message.futureQuotaValue !== undefined) - writer.tag(8, WireType.Varint).int64(message.futureQuotaValue); + internalBinaryWrite(message: ErrorInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string reason = 1; */ + if (message.reason !== "") + writer.tag(1, WireType.LengthDelimited).string(message.reason); + /* string domain = 2; */ + if (message.domain !== "") + writer.tag(2, WireType.LengthDelimited).string(message.domain); + /* map metadata = 3; */ + for (let k of globalThis.Object.keys(message.metadata)) + writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -871,9 +668,9 @@ class QuotaFailure_Violation$Type extends MessageType { } } /** - * @generated MessageType for protobuf message google.rpc.QuotaFailure.Violation + * @generated MessageType for protobuf message google.rpc.ErrorInfo */ -export const QuotaFailure_Violation = new QuotaFailure_Violation$Type(); +export const ErrorInfo = new ErrorInfo$Type(); // @generated message type with reflection information, may provide speed optimized methods class PreconditionFailure$Type extends MessageType { constructor() { @@ -1036,16 +833,13 @@ class BadRequest_FieldViolation$Type extends MessageType LocalizedMessage } + { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): BadRequest_FieldViolation { const message = globalThis.Object.create((this.messagePrototype!)); message.field = ""; message.description = ""; - message.reason = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -1061,12 +855,6 @@ class BadRequest_FieldViolation$Type extends MessageType; export interface components { - schemas: { - AuthAPI_BeginSSOLogin_PublicPKCE: { - nonce: string; - /** Format: date-time */ - expiresAt: string; - }; - AuthAPI_BeginSSOLogin_Request: Record; - AuthAPI_BeginSSOLogin_Response: { - publicPkce: components["schemas"]["AuthAPI_BeginSSOLogin_PublicPKCE"]; - }; - AuthAPI_GetJWTToken_Request: { - expiration: string; - /** Format: enum */ - requestedRole: number; - }; - AuthAPI_GetJWTToken_Response: { - token: string; - /** - * Format: bytes - * @description Session info fields - */ - sessionId: string; - /** Format: enum */ - role: number; - }; - AuthAPI_GetSessionInfo_Request: Record; - AuthAPI_GetSessionInfo_Response: { - /** Format: bytes */ - sessionId: string; - /** Format: enum */ - role: number; - }; - AuthAPI_GetUserRoot_Request: { - login: string; - createIfNotExists: boolean; - }; - AuthAPI_GetUserRoot_Response: { - userRoot: components["schemas"]["AuthAPI_UserRoot"]; - }; - AuthAPI_GrantAccess_Request: { - resourceId: string; - /** Format: bytes */ - resourceSignature: string; - targetUser: string; - permissions: components["schemas"]["AuthAPI_Grant_Permissions"]; - /** Format: enum */ - grantType: number; - }; - AuthAPI_GrantAccess_Response: Record; - /** @description Permissions describes access level for a grant. */ - AuthAPI_Grant_Permissions: { - writable: boolean; - }; - AuthAPI_ListMethods_BasicAuthMethod: Record; - AuthAPI_ListMethods_MethodInfo: { - /** - * @description id is the stable, machine-readable identifier of the login method - * instance. Unique across the entire server. - */ - id: string; - /** @description description is the human-readable label in case we'd like to render it in UI. */ - description: string; - basic: components["schemas"]["AuthAPI_ListMethods_BasicAuthMethod"]; - token: components["schemas"]["AuthAPI_ListMethods_TokenAuthMethod"]; - sso: components["schemas"]["AuthAPI_ListMethods_SSOAuthMethod"]; - }; - AuthAPI_ListMethods_Response: { - methods: components["schemas"]["AuthAPI_ListMethods_MethodInfo"][]; - }; - /** - * @description SSOAuthMethod advertises an external IdP-based login flow. The desktop - * app uses the contents to drive the PKCE exchange locally, then hands the - * resulting IdP token-response back via Login.SSOCredentials. - */ - AuthAPI_ListMethods_SSOAuthMethod: { - issuer: string; - clientId: string; - scopes: string; - resource: string; - prompt: string; - redirectPorts: number[]; - subjectTokenSource: string; - userIdClaim: string; - groupsClaim: string; - /** Format: enum */ - flowType: number; - }; - AuthAPI_ListMethods_TokenAuthMethod: Record; - AuthAPI_Login_BasicCredentials: { - login: string; - password: string; - }; - AuthAPI_Login_Request: { - basic: components["schemas"]["AuthAPI_Login_BasicCredentials"]; - token: components["schemas"]["AuthAPI_Login_TokenCredentials"]; - sso: components["schemas"]["AuthAPI_Login_SSOCredentials"]; - expiration: string; - /** Format: enum */ - requestedRole: number; - }; - AuthAPI_Login_Response: { - token: string; - /** Format: bytes */ - sessionId: string; - /** Format: enum */ - role: number; - }; - /** - * @description SSOCredentials carries the raw JSON body returned by the IdP's /token - * endpoint after the desktop completes a PKCE exchange. - */ - AuthAPI_Login_SSOCredentials: { - /** Format: bytes */ - tokenResponse: string; - }; - /** - * @description TokenCredentials accepts any opaque bearer-style string: a controller - * pre-shared secret, an existing Platforma JWT, or a future OIDC id-token. - */ - AuthAPI_Login_TokenCredentials: { - /** Format: bytes */ - token: string; - }; - AuthAPI_MintSignature_Request: { - resourceId: string; - /** Format: bytes */ - targetSid: string; - color: components["schemas"]["Color"]; - }; - AuthAPI_MintSignature_Response: { - resourceId: string; - /** Format: bytes */ - resourceSignature: string; - }; - AuthAPI_RefreshToken_Request: { - token: string; - expiration: string; - }; - AuthAPI_RefreshToken_Response: { - token: string; - /** Format: bytes */ - sessionId: string; - /** Format: enum */ - role: number; - }; - AuthAPI_RevokeAccess_Request: { - resourceId: string; - /** Format: bytes */ - resourceSignature: string; - targetUser: string; - }; - AuthAPI_RevokeAccess_Response: Record; - AuthAPI_UserRoot: { - resourceId: string; - /** Format: bytes */ - resourceSignature: string; - }; - Color: { - root: string; - /** Format: uint32 */ - permissions: number; - }; - Controller: { - type: string; - id: string; - subscriptionID: string; - }; - ControllerAPI_AttachSubscription_Request: { - controllerId: string; - subscriptionId: string; - }; - ControllerAPI_AttachSubscription_Response: Record; - ControllerAPI_ClearFeatures_Request: { - controllerType: string; - }; - ControllerAPI_ClearFeatures_Response: Record; - ControllerAPI_Create_Request: { - id: string; - controllerType: string; - }; - ControllerAPI_Create_Response: { - controllerId: string; - }; - ControllerAPI_Deregister_Request: { - controllerType: string; - }; - ControllerAPI_Deregister_Response: Record; - ControllerAPI_Exists_Request: { - controllerType: string; - }; - ControllerAPI_Exists_Response: { - exists: boolean; - }; - ControllerAPI_GetNotifications_Request: { - controllerType: string; - /** Format: uint32 */ - maxNotifications: number; - }; - ControllerAPI_GetNotifications_Response: { - notifications: components["schemas"]["Notification"][]; - }; - ControllerAPI_GetUrl_Request: { - controllerAlias: string; - resourceId: string; - }; - ControllerAPI_GetUrl_Response: { - controllerUrl: string; - }; - ControllerAPI_Get_Request: { - controllerType: string; - }; - ControllerAPI_Get_Response: { - controller: components["schemas"]["Controller"]; - }; - ControllerAPI_Register_Request: { - controllerType: string; - filters: { - [key: string]: components["schemas"]["NotificationFilter"]; - }; - resourceSchemas: components["schemas"]["ResourceSchema"][]; - }; - ControllerAPI_Register_Response: { - controllerId: string; - subscriptionId: string; - }; - ControllerAPI_RemoveAliasesAndUrls_Request: { - controllerType: string; - }; - ControllerAPI_RemoveAliasesAndUrls_Response: Record; - ControllerAPI_SetFeatures_Request: { - features: components["schemas"]["ResourceAPIFeature"][]; - }; - ControllerAPI_SetFeatures_Response: Record; - ControllerAPI_Update_Request: { - controllerType: string; - filters: { - [key: string]: components["schemas"]["NotificationFilter"]; - }; - resourceSchemas: components["schemas"]["ResourceSchema"][]; - }; - ControllerAPI_Update_Response: Record; - ControllerAPI_WriteAliasesAndUrls_Request: { - controllerType: string; - aliasesToUrls: { - [key: string]: string; - }; - }; - ControllerAPI_WriteAliasesAndUrls_Response: Record; - Field: { - /** @description field ID is always combination of parent resource ID and field name */ - id: components["schemas"]["FieldRef"]; - /** Format: enum */ - type: number; - features: components["schemas"]["Resource_Features"]; - /** - * @description _resolved_ value of a field or _assigned_ if the field was assigned to a resource. - * If a field refers to another field, it will get - * a value only when this chain of references ends up with a direct resource - * reference. At that moment, all fields in the chain will get their values - * resolved and will start to refer to the same resource directly. - */ - value: string; - /** - * Format: bytes - * @description Signature for value resource ID, inheriting the parent resource's color. - * Populated server-side when the parent resource has a known color in the current TX. - */ - valueSignature: string; - /** - * Format: enum - * @description Whether the value is empty, assigned, or finally resolved. - */ - valueStatus: number; - /** @description If the value is in its final state (ready, duplicate or error) */ - valueIsFinal: boolean; - /** - * @description Error resource ID, if any. - * Is intended to report problems _from_ the platform to the client. - */ - error: string; - /** - * Format: bytes - * @description Signature for error resource ID, inheriting the parent resource's color. - */ - errorSignature: string; - }; - FieldRef: { - resourceId: string; - /** Format: bytes */ - resourceSignature: string; - fieldName: string; - }; - FieldSchema: { - /** Format: enum */ - type: number; - name: string; - }; - /** @description Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. */ - GoogleProtobufAny: { - /** @description The type of the serialized message. */ - "@type": string; - } & { - [key: string]: unknown; - }; - LocksAPI_Lease_Create_Request: { - resourceId: string; - /** Format: bytes */ - resourceSignature: string; - timeout: string; - name: string; - }; - LocksAPI_Lease_Create_Response: { - /** Format: bytes */ - leaseId: string; - }; - LocksAPI_Lease_Release_Request: { - resourceId: string; - /** Format: bytes */ - resourceSignature: string; - /** Format: bytes */ - leaseId: string; - }; - LocksAPI_Lease_Release_Response: Record; - LocksAPI_Lease_Update_Request: { - resourceId: string; - /** Format: bytes */ - resourceSignature: string; - /** Format: bytes */ - leaseId: string; - timeout: string; - name: string; - }; - LocksAPI_Lease_Update_Response: Record; - LocksAPI_LockFieldValues_Create_Request: { - resourceId: string; - lockReferencesOf: string[]; - comment: string; - }; - LocksAPI_LockFieldValues_Create_Response: { - /** - * @description true when lock was acquired (new, or already owned by the owner) - * Client MUST pay attention to this flag, as it shows if lock was successful. - */ - acquired: boolean; - /** - * @description Info about why lock was not acquired. - * Limited number of conflicts is reported: i.e. if lock operation failed for 20 fields, only first 10 are listed here. - * The number '10' is not a fixed contract for external clients. It is just 'somehow truncated'. - */ - conflictingLocks: components["schemas"]["LocksAPI_LockFieldValues_Create_Response_LockInfo"][]; - conflictsListTruncated: boolean; - }; - LocksAPI_LockFieldValues_Create_Response_LockInfo: { - targetId: string; - fieldName: string; - lockedBy: string; - /** Format: date-time */ - lockedAt: string; - comment: string; - }; - MaintenanceAPI_License_Response: { - /** Format: int32 */ - status: number; - isOk: boolean; - /** - * Format: bytes - * @description Raw response body as it was received from the license server. - */ - responseBody: string; - }; - MaintenanceAPI_Ping_Response: { - coreVersion: string; - coreFullVersion: string; - /** Format: enum */ - compression: number; - /** - * @description instanceID is a unique ID that changes when we reset DB state. - * If we reset a state and a database, but the address of the backend is still the same, - * without instanceID we are not sure if it's the same state or not, - * and UI can't detect it and clear its state (e.g. caches of drivers). - */ - instanceId: string; - platform: string; - os: string; - arch: string; - /** - * @description Opt-in capabilities advertised by this server instance, used by - * clients to pick between fast and fallback code paths without waiting - * for a failed RPC. - * - * Each entry is an opaque token ":" (e.g. - * "loadSubtree:v1"). Unrecognized tokens are ignored by the client. - * The field is unset on servers predating this mechanism, which the - * client treats as "no optional capabilities advertised". - * - * All list see pl/platform/api/plapiserver/server_capabilities.go - */ - capabilities: string[]; - }; - MiscAPI_ListResourceTypes_Response: { - types: components["schemas"]["ResourceType"][]; - }; - Notification: { - subscriptionId: string; - eventId: string; - resourceId: string; - resourceType: components["schemas"]["ResourceType"]; - events: components["schemas"]["Notification_Events"]; - fieldChanges: { - [key: string]: components["schemas"]["Notification_FieldChange"]; - }; - payload: components["schemas"]["NotificationFilter_Payload"]; - filterName: string; - txSpan: components["schemas"]["SpanInfo"]; - }; - NotificationAPI_Get_Request: { - subscription: string; - /** Format: uint32 */ - maxNotifications: number; - }; - NotificationAPI_Get_Response: { - notifications: components["schemas"]["Notification"][]; - }; - NotificationFilter: { - resourceType: components["schemas"]["ResourceType"]; - resourceId: string; - eventFilter: components["schemas"]["NotificationFilter_EventFilter"]; - payload: components["schemas"]["NotificationFilter_Payload"]; - }; - NotificationFilter_EventFilter: { - all: boolean; - resourceCreated: boolean; - resourceDeleted: boolean; - resourceReady: boolean; - resourceRecovered: boolean; - resourceDuplicate: boolean; - resourceError: boolean; - /** @description Field events */ - inputsLocked: boolean; - outputsLocked: boolean; - fieldCreated: boolean; - fieldGotError: boolean; - inputSet: boolean; - allInputsSet: boolean; - outputSet: boolean; - allOutputsSet: boolean; - genericOtwSet: boolean; - dynamicChanged: boolean; - }; - NotificationFilter_Payload: { - values: { - [key: string]: string; - }; - }; - Notification_Events: { - resourceCreated: boolean; - resourceDeleted: boolean; - resourceReady: boolean; - resourceDuplicate: boolean; - resourceError: boolean; - inputsLocked: boolean; - outputsLocked: boolean; - fieldCreated: boolean; - fieldGotError: boolean; - inputSet: boolean; - allInputsSet: boolean; - outputSet: boolean; - allOutputsSet: boolean; - genericOtwSet: boolean; - dynamicChanged: boolean; - resourceRecovered: boolean; - }; - Notification_FieldChange: { - old: components["schemas"]["Field"]; - new: components["schemas"]["Field"]; - }; - ResourceAPIFeature: { - controllerType: string; - featureName: string; - resourceType: components["schemas"]["ResourceType"]; - endpoint: string; - }; - ResourceSchema: { - type: components["schemas"]["ResourceType"]; - fields: components["schemas"]["FieldSchema"][]; - /** @description Access restriction flags for non-controller roles */ - accessFlags: components["schemas"]["ResourceSchema_AccessFlags"]; - freeInputs: boolean; - freeOutputs: boolean; - }; - ResourceSchema_AccessFlags: { - /** - * @description Deny-list approach: default = allowed (true) - * Controllers set these to false to restrict non-controller roles (role='u', role='w') - */ - createResource: boolean; - /** @description IMPORTANT: read_fields=false with write_fields=true is a forbidden combination */ - readFields: boolean; - writeFields: boolean; - /** @description IMPORTANT: read_kv=false with write_kv=true is a forbidden combination */ - readKv: boolean; - writeKv: boolean; - /** - * @description Per-field-type overrides (map: field_type → bool) - * When defined for a field type, overrides resource-level flags - */ - readByFieldType: { - [key: string]: boolean; - }; - writeByFieldType: { - [key: string]: boolean; - }; - }; - ResourceType: { - name: string; - version: string; - }; - Resource_Features: { - ephemeral: boolean; - }; - SpanInfo: { - path: string; - carrier: { - [key: string]: string; - }; - }; - /** @description The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ - Status: { - /** - * Format: int32 - * @description The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - */ - code: number; - /** @description A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. */ - message: string; - /** @description A list of messages that carry the error details. There is a common set of message types for APIs to use. */ - details: components["schemas"]["GoogleProtobufAny"][]; - }; - SubscriptionAPI_AttachFilter_Request: { - subscriptionId: string; - filterName: string; - filterId: string; - }; - SubscriptionAPI_AttachFilter_Response: Record; - SubscriptionAPI_DetachFilter_Request: { - subscriptionId: string; - filterName: string; - }; - SubscriptionAPI_DetachFilter_Response: Record; - TxAPI_Sync_Request: { - txId: string; - }; - TxAPI_Sync_Response: Record; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + AuthAPI_BeginSSOLogin_PublicPKCE: { + nonce: string; + /** Format: date-time */ + expiresAt: string; + }; + AuthAPI_BeginSSOLogin_Request: Record; + AuthAPI_BeginSSOLogin_Response: { + publicPkce: components["schemas"]["AuthAPI_BeginSSOLogin_PublicPKCE"]; + }; + AuthAPI_GetJWTToken_Request: { + expiration: string; + /** Format: enum */ + requestedRole: number; + }; + AuthAPI_GetJWTToken_Response: { + token: string; + /** + * Format: bytes + * @description Session info fields + */ + sessionId: string; + /** Format: enum */ + role: number; + }; + AuthAPI_GetSessionInfo_Request: Record; + AuthAPI_GetSessionInfo_Response: { + /** Format: bytes */ + sessionId: string; + /** Format: enum */ + role: number; + }; + AuthAPI_GetUserRoot_Request: { + login: string; + createIfNotExists: boolean; + }; + AuthAPI_GetUserRoot_Response: { + userRoot: components["schemas"]["AuthAPI_UserRoot"]; + }; + AuthAPI_GrantAccess_Request: { + resourceId: string; + /** Format: bytes */ + resourceSignature: string; + targetUser: string; + permissions: components["schemas"]["AuthAPI_Grant_Permissions"]; + /** Format: enum */ + grantType: number; + }; + AuthAPI_GrantAccess_Response: Record; + /** @description Permissions describes access level for a grant. */ + AuthAPI_Grant_Permissions: { + writable: boolean; + }; + AuthAPI_ListMethods_BasicAuthMethod: Record; + AuthAPI_ListMethods_MethodInfo: { + /** + * @description id is the stable, machine-readable identifier of the login method + * instance. Unique across the entire server. + */ + id: string; + /** @description description is the human-readable label in case we'd like to render it in UI. */ + description: string; + basic: components["schemas"]["AuthAPI_ListMethods_BasicAuthMethod"]; + token: components["schemas"]["AuthAPI_ListMethods_TokenAuthMethod"]; + sso: components["schemas"]["AuthAPI_ListMethods_SSOAuthMethod"]; + }; + AuthAPI_ListMethods_Response: { + methods: components["schemas"]["AuthAPI_ListMethods_MethodInfo"][]; + }; + /** + * @description SSOAuthMethod advertises an external IdP-based login flow. The desktop + * app uses the contents to drive the PKCE exchange locally, then hands the + * resulting IdP token-response back via Login.SSOCredentials. + */ + AuthAPI_ListMethods_SSOAuthMethod: { + issuer: string; + clientId: string; + scopes: string; + resource: string; + prompt: string; + redirectPorts: number[]; + subjectTokenSource: string; + userIdClaim: string; + groupsClaim: string; + /** Format: enum */ + flowType: number; + }; + AuthAPI_ListMethods_TokenAuthMethod: Record; + AuthAPI_Login_BasicCredentials: { + login: string; + password: string; + }; + AuthAPI_Login_Request: { + basic: components["schemas"]["AuthAPI_Login_BasicCredentials"]; + token: components["schemas"]["AuthAPI_Login_TokenCredentials"]; + sso: components["schemas"]["AuthAPI_Login_SSOCredentials"]; + expiration: string; + /** Format: enum */ + requestedRole: number; + }; + AuthAPI_Login_Response: { + token: string; + /** Format: bytes */ + sessionId: string; + /** Format: enum */ + role: number; + }; + /** + * @description SSOCredentials carries the raw JSON body returned by the IdP's /token + * endpoint after the desktop completes a PKCE exchange. + */ + AuthAPI_Login_SSOCredentials: { + /** Format: bytes */ + tokenResponse: string; + }; + /** + * @description TokenCredentials accepts any opaque bearer-style string: a controller + * pre-shared secret, an existing Platforma JWT, or a future OIDC id-token. + */ + AuthAPI_Login_TokenCredentials: { + /** Format: bytes */ + token: string; + }; + AuthAPI_MintSignature_Request: { + resourceId: string; + /** Format: bytes */ + targetSid: string; + color: components["schemas"]["Color"]; + }; + AuthAPI_MintSignature_Response: { + resourceId: string; + /** Format: bytes */ + resourceSignature: string; + }; + AuthAPI_RefreshToken_Request: { + token: string; + expiration: string; + }; + AuthAPI_RefreshToken_Response: { + token: string; + /** Format: bytes */ + sessionId: string; + /** Format: enum */ + role: number; + }; + AuthAPI_RevokeAccess_Request: { + resourceId: string; + /** Format: bytes */ + resourceSignature: string; + targetUser: string; + }; + AuthAPI_RevokeAccess_Response: Record; + AuthAPI_UserRoot: { + resourceId: string; + /** Format: bytes */ + resourceSignature: string; + }; + Color: { + root: string; + /** Format: uint32 */ + permissions: number; + }; + /** + * @description CmdError is a structured application-level error returned inside + * CommandResult. It is separate from gRPC status codes, which are + * reserved for transport-level failures. + */ + CommandAPI_CmdError: { + message: string; + code: string; + }; + /** @description Command carries a named command with an optional JSON payload. */ + CommandAPI_Command: { + /** + * @description name identifies the registered handler (e.g. "users.list"). + * Must be non-empty. + */ + name: string; + /** + * Format: bytes + * @description payload is an opaque JSON object passed verbatim to the handler. + * May be empty when a command takes no arguments. + */ + payload: string; + }; + /** + * @description CommandResult carries the JSON response from a handler and any + * application-level errors it produced. + */ + CommandAPI_CommandResult: { + /** + * Format: bytes + * @description data is the JSON-encoded result. Empty when errors is non-empty. + */ + data: string; + errors: components["schemas"]["CommandAPI_CmdError"][]; + }; + Controller: { + type: string; + id: string; + subscriptionID: string; + }; + ControllerAPI_AttachSubscription_Request: { + controllerId: string; + subscriptionId: string; + }; + ControllerAPI_AttachSubscription_Response: Record; + ControllerAPI_ClearFeatures_Request: { + controllerType: string; + }; + ControllerAPI_ClearFeatures_Response: Record; + ControllerAPI_Create_Request: { + id: string; + controllerType: string; + }; + ControllerAPI_Create_Response: { + controllerId: string; + }; + ControllerAPI_Deregister_Request: { + controllerType: string; + }; + ControllerAPI_Deregister_Response: Record; + ControllerAPI_Exists_Request: { + controllerType: string; + }; + ControllerAPI_Exists_Response: { + exists: boolean; + }; + ControllerAPI_GetNotifications_Request: { + controllerType: string; + /** Format: uint32 */ + maxNotifications: number; + }; + ControllerAPI_GetNotifications_Response: { + notifications: components["schemas"]["Notification"][]; + }; + ControllerAPI_GetUrl_Request: { + controllerAlias: string; + resourceId: string; + }; + ControllerAPI_GetUrl_Response: { + controllerUrl: string; + }; + ControllerAPI_Get_Request: { + controllerType: string; + }; + ControllerAPI_Get_Response: { + controller: components["schemas"]["Controller"]; + }; + ControllerAPI_Register_Request: { + controllerType: string; + filters: { + [key: string]: components["schemas"]["NotificationFilter"]; + }; + resourceSchemas: components["schemas"]["ResourceSchema"][]; + }; + ControllerAPI_Register_Response: { + controllerId: string; + subscriptionId: string; + }; + ControllerAPI_RemoveAliasesAndUrls_Request: { + controllerType: string; + }; + ControllerAPI_RemoveAliasesAndUrls_Response: Record; + ControllerAPI_SetFeatures_Request: { + features: components["schemas"]["ResourceAPIFeature"][]; + }; + ControllerAPI_SetFeatures_Response: Record; + ControllerAPI_Update_Request: { + controllerType: string; + filters: { + [key: string]: components["schemas"]["NotificationFilter"]; + }; + resourceSchemas: components["schemas"]["ResourceSchema"][]; + }; + ControllerAPI_Update_Response: Record; + ControllerAPI_WriteAliasesAndUrls_Request: { + controllerType: string; + aliasesToUrls: { + [key: string]: string; + }; + }; + ControllerAPI_WriteAliasesAndUrls_Response: Record; + Field: { + /** @description field ID is always combination of parent resource ID and field name */ + id: components["schemas"]["FieldRef"]; + /** Format: enum */ + type: number; + features: components["schemas"]["Resource_Features"]; + /** + * @description _resolved_ value of a field or _assigned_ if the field was assigned to a resource. + * If a field refers to another field, it will get + * a value only when this chain of references ends up with a direct resource + * reference. At that moment, all fields in the chain will get their values + * resolved and will start to refer to the same resource directly. + */ + value: string; + /** + * Format: bytes + * @description Signature for value resource ID, inheriting the parent resource's color. + * Populated server-side when the parent resource has a known color in the current TX. + */ + valueSignature: string; + /** + * Format: enum + * @description Whether the value is empty, assigned, or finally resolved. + */ + valueStatus: number; + /** @description If the value is in its final state (ready, duplicate or error) */ + valueIsFinal: boolean; + /** + * @description Error resource ID, if any. + * Is intended to report problems _from_ the platform to the client. + */ + error: string; + /** + * Format: bytes + * @description Signature for error resource ID, inheriting the parent resource's color. + */ + errorSignature: string; + }; + FieldRef: { + resourceId: string; + /** Format: bytes */ + resourceSignature: string; + fieldName: string; + }; + FieldSchema: { + /** Format: enum */ + type: number; + name: string; + }; + /** @description Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. */ + GoogleProtobufAny: { + /** @description The type of the serialized message. */ + "@type": string; + } & { + [key: string]: unknown; + }; + LocksAPI_Lease_Create_Request: { + resourceId: string; + /** Format: bytes */ + resourceSignature: string; + timeout: string; + name: string; + }; + LocksAPI_Lease_Create_Response: { + /** Format: bytes */ + leaseId: string; + }; + LocksAPI_Lease_Release_Request: { + resourceId: string; + /** Format: bytes */ + resourceSignature: string; + /** Format: bytes */ + leaseId: string; + }; + LocksAPI_Lease_Release_Response: Record; + LocksAPI_Lease_Update_Request: { + resourceId: string; + /** Format: bytes */ + resourceSignature: string; + /** Format: bytes */ + leaseId: string; + timeout: string; + name: string; + }; + LocksAPI_Lease_Update_Response: Record; + LocksAPI_LockFieldValues_Create_Request: { + resourceId: string; + lockReferencesOf: string[]; + comment: string; + }; + LocksAPI_LockFieldValues_Create_Response: { + /** + * @description true when lock was acquired (new, or already owned by the owner) + * Client MUST pay attention to this flag, as it shows if lock was successful. + */ + acquired: boolean; + /** + * @description Info about why lock was not acquired. + * Limited number of conflicts is reported: i.e. if lock operation failed for 20 fields, only first 10 are listed here. + * The number '10' is not a fixed contract for external clients. It is just 'somehow truncated'. + */ + conflictingLocks: components["schemas"]["LocksAPI_LockFieldValues_Create_Response_LockInfo"][]; + conflictsListTruncated: boolean; + }; + LocksAPI_LockFieldValues_Create_Response_LockInfo: { + targetId: string; + fieldName: string; + lockedBy: string; + /** Format: date-time */ + lockedAt: string; + comment: string; + }; + MaintenanceAPI_License_Response: { + /** Format: int32 */ + status: number; + isOk: boolean; + /** + * Format: bytes + * @description Raw response body as it was received from the license server. + */ + responseBody: string; + }; + MaintenanceAPI_Ping_Response: { + coreVersion: string; + coreFullVersion: string; + /** Format: enum */ + compression: number; + /** + * @description instanceID is a unique ID that changes when we reset DB state. + * If we reset a state and a database, but the address of the backend is still the same, + * without instanceID we are not sure if it's the same state or not, + * and UI can't detect it and clear its state (e.g. caches of drivers). + */ + instanceId: string; + platform: string; + os: string; + arch: string; + /** + * @description Opt-in capabilities advertised by this server instance. Two + * client-side usage modes share this same wire field, decided + * per-token by the client: + * - Optimization hint. Client picks between a fast path and a + * fallback without probing by trial-and-error; missing tokens + * just cause the fallback to run (e.g. "treeFilter:v2"). + * - Install-time gate. Client refuses to install a block whose + * manifest declares a required capability the server doesn't + * advertise; missing tokens fail closed (e.g. "wasm:v1"). + * + * Each entry is an opaque token ":" (e.g. + * "treeFilter:v2"). The field is unset on servers predating this + * mechanism, which the client treats as "no optional capabilities + * advertised" — fallback for hints, fail-closed for gates. + * + * All list see pl/platform/api/plapiserver/server_capabilities.go + */ + capabilities: string[]; + }; + MiscAPI_ListResourceTypes_Response: { + types: components["schemas"]["ResourceType"][]; + }; + Notification: { + subscriptionId: string; + eventId: string; + resourceId: string; + resourceType: components["schemas"]["ResourceType"]; + events: components["schemas"]["Notification_Events"]; + fieldChanges: { + [key: string]: components["schemas"]["Notification_FieldChange"]; + }; + payload: components["schemas"]["NotificationFilter_Payload"]; + filterName: string; + txSpan: components["schemas"]["SpanInfo"]; + }; + NotificationAPI_Get_Request: { + subscription: string; + /** Format: uint32 */ + maxNotifications: number; + }; + NotificationAPI_Get_Response: { + notifications: components["schemas"]["Notification"][]; + }; + NotificationFilter: { + resourceType: components["schemas"]["ResourceType"]; + resourceId: string; + eventFilter: components["schemas"]["NotificationFilter_EventFilter"]; + payload: components["schemas"]["NotificationFilter_Payload"]; + }; + NotificationFilter_EventFilter: { + all: boolean; + resourceCreated: boolean; + resourceDeleted: boolean; + resourceReady: boolean; + resourceRecovered: boolean; + resourceDuplicate: boolean; + resourceError: boolean; + /** @description Field events */ + inputsLocked: boolean; + outputsLocked: boolean; + fieldCreated: boolean; + fieldGotError: boolean; + inputSet: boolean; + allInputsSet: boolean; + outputSet: boolean; + allOutputsSet: boolean; + genericOtwSet: boolean; + dynamicChanged: boolean; + }; + NotificationFilter_Payload: { + values: { + [key: string]: string; + }; + }; + Notification_Events: { + resourceCreated: boolean; + resourceDeleted: boolean; + resourceReady: boolean; + resourceDuplicate: boolean; + resourceError: boolean; + inputsLocked: boolean; + outputsLocked: boolean; + fieldCreated: boolean; + fieldGotError: boolean; + inputSet: boolean; + allInputsSet: boolean; + outputSet: boolean; + allOutputsSet: boolean; + genericOtwSet: boolean; + dynamicChanged: boolean; + resourceRecovered: boolean; + }; + Notification_FieldChange: { + old: components["schemas"]["Field"]; + new: components["schemas"]["Field"]; + }; + ResourceAPIFeature: { + controllerType: string; + featureName: string; + resourceType: components["schemas"]["ResourceType"]; + endpoint: string; + }; + ResourceSchema: { + type: components["schemas"]["ResourceType"]; + fields: components["schemas"]["FieldSchema"][]; + /** @description Access restriction flags for non-controller roles */ + accessFlags: components["schemas"]["ResourceSchema_AccessFlags"]; + freeInputs: boolean; + freeOutputs: boolean; + }; + ResourceSchema_AccessFlags: { + /** + * @description Deny-list approach: default = allowed (true) + * Controllers set these to false to restrict non-controller roles (role='u', role='w') + */ + createResource: boolean; + /** @description IMPORTANT: read_fields=false with write_fields=true is a forbidden combination */ + readFields: boolean; + writeFields: boolean; + /** @description IMPORTANT: read_kv=false with write_kv=true is a forbidden combination */ + readKv: boolean; + writeKv: boolean; + /** + * @description Per-field-type overrides (map: field_type → bool) + * When defined for a field type, overrides resource-level flags + */ + readByFieldType: { + [key: string]: boolean; + }; + writeByFieldType: { + [key: string]: boolean; + }; + }; + ResourceType: { + name: string; + version: string; + }; + Resource_Features: { + ephemeral: boolean; + }; + SpanInfo: { + path: string; + carrier: { + [key: string]: string; + }; + }; + /** @description The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ + Status: { + /** + * Format: int32 + * @description The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + */ + code: number; + /** @description A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. */ + message: string; + /** @description A list of messages that carry the error details. There is a common set of message types for APIs to use. */ + details: components["schemas"]["GoogleProtobufAny"][]; + }; + SubscriptionAPI_AttachFilter_Request: { + subscriptionId: string; + filterName: string; + filterId: string; + }; + SubscriptionAPI_AttachFilter_Response: Record; + SubscriptionAPI_DetachFilter_Request: { + subscriptionId: string; + filterName: string; + }; + SubscriptionAPI_DetachFilter_Response: Record; + TxAPI_Sync_Request: { + txId: string; + }; + TxAPI_Sync_Response: Record; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export interface operations { - Platform_GrantAccess: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthAPI_GrantAccess_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_GrantAccess_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_GetJWTToken: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthAPI_GetJWTToken_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_GetJWTToken_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_Login: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthAPI_Login_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_Login_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_AuthMethods: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_ListMethods_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_MintSignature: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthAPI_MintSignature_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_MintSignature_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_RefreshToken: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthAPI_RefreshToken_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_RefreshToken_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_RevokeAccess: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthAPI_RevokeAccess_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_RevokeAccess_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_GetSessionInfo: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthAPI_GetSessionInfo_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_GetSessionInfo_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_BeginSSOLogin: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthAPI_BeginSSOLogin_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_BeginSSOLogin_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_GetUserRoot: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthAPI_GetUserRoot_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AuthAPI_GetUserRoot_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_WriteControllerAliasesAndUrls: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_WriteAliasesAndUrls_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_WriteAliasesAndUrls_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_RemoveControllerAliasesAndUrls: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_RemoveAliasesAndUrls_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_RemoveAliasesAndUrls_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ControllerAttachSubscription: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_AttachSubscription_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_AttachSubscription_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ControllerCreate: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_Create_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_Create_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ControllerDeregister: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_Deregister_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_Deregister_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ControllerExists: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_Exists_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_Exists_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ControllerSetFeatures: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_SetFeatures_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_SetFeatures_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ControllerClearFeatures: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_ClearFeatures_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_ClearFeatures_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ControllerGet: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_Get_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_Get_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_GetControllerNotifications: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_GetNotifications_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_GetNotifications_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ControllerRegister: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_Register_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_Register_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ControllerUpdate: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_Update_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_Update_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_GetControllerUrl: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ControllerAPI_GetUrl_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ControllerAPI_GetUrl_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_License: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MaintenanceAPI_License_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_LeaseResource: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["LocksAPI_Lease_Create_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["LocksAPI_Lease_Create_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ReleaseLease: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["LocksAPI_Lease_Release_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["LocksAPI_Lease_Release_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_UpdateLease: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["LocksAPI_Lease_Update_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["LocksAPI_Lease_Update_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_LockFieldValues: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["LocksAPI_LockFieldValues_Create_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["LocksAPI_LockFieldValues_Create_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_NotificationsGet: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["NotificationAPI_Get_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["NotificationAPI_Get_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_Ping: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MaintenanceAPI_Ping_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_ListResourceTypes: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MiscAPI_ListResourceTypes_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_SubscriptionAttachFilter: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SubscriptionAPI_AttachFilter_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SubscriptionAPI_AttachFilter_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_SubscriptionDetachFilter: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SubscriptionAPI_DetachFilter_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SubscriptionAPI_DetachFilter_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; - Platform_TxSync: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["TxAPI_Sync_Request"]; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["TxAPI_Sync_Response"]; - }; - }; - /** @description Default error response */ - default: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Status"]; - }; - }; - }; - }; + Platform_GrantAccess: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthAPI_GrantAccess_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_GrantAccess_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_GetJWTToken: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthAPI_GetJWTToken_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_GetJWTToken_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_Login: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthAPI_Login_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_Login_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_AuthMethods: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_ListMethods_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_MintSignature: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthAPI_MintSignature_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_MintSignature_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_RefreshToken: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthAPI_RefreshToken_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_RefreshToken_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_RevokeAccess: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthAPI_RevokeAccess_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_RevokeAccess_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_GetSessionInfo: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthAPI_GetSessionInfo_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_GetSessionInfo_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_BeginSSOLogin: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthAPI_BeginSSOLogin_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_BeginSSOLogin_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_GetUserRoot: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthAPI_GetUserRoot_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthAPI_GetUserRoot_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_Mutation: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CommandAPI_Command"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["CommandAPI_CommandResult"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_Query: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CommandAPI_Command"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["CommandAPI_CommandResult"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_WriteControllerAliasesAndUrls: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_WriteAliasesAndUrls_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_WriteAliasesAndUrls_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_RemoveControllerAliasesAndUrls: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_RemoveAliasesAndUrls_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_RemoveAliasesAndUrls_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ControllerAttachSubscription: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_AttachSubscription_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_AttachSubscription_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ControllerCreate: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_Create_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_Create_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ControllerDeregister: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_Deregister_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_Deregister_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ControllerExists: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_Exists_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_Exists_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ControllerSetFeatures: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_SetFeatures_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_SetFeatures_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ControllerClearFeatures: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_ClearFeatures_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_ClearFeatures_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ControllerGet: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_Get_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_Get_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_GetControllerNotifications: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_GetNotifications_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_GetNotifications_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ControllerRegister: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_Register_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_Register_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ControllerUpdate: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_Update_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_Update_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_GetControllerUrl: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ControllerAPI_GetUrl_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ControllerAPI_GetUrl_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_License: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MaintenanceAPI_License_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_LeaseResource: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["LocksAPI_Lease_Create_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["LocksAPI_Lease_Create_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ReleaseLease: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["LocksAPI_Lease_Release_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["LocksAPI_Lease_Release_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_UpdateLease: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["LocksAPI_Lease_Update_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["LocksAPI_Lease_Update_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_LockFieldValues: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["LocksAPI_LockFieldValues_Create_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["LocksAPI_LockFieldValues_Create_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_NotificationsGet: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["NotificationAPI_Get_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["NotificationAPI_Get_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_Ping: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MaintenanceAPI_Ping_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_ListResourceTypes: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MiscAPI_ListResourceTypes_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_SubscriptionAttachFilter: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["SubscriptionAPI_AttachFilter_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SubscriptionAPI_AttachFilter_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_SubscriptionDetachFilter: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["SubscriptionAPI_DetachFilter_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SubscriptionAPI_DetachFilter_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; + Platform_TxSync: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["TxAPI_Sync_Request"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TxAPI_Sync_Response"]; + }; + }; + /** @description Default error response */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Status"]; + }; + }; + }; + }; }