mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-19 01:58:44 +08:00
Generate TypeScript protobuf files (#37009)
* Specify the path for protoc-gen-ts so it doesn't use @protobuf-ts/plugin * Add TypeScript protobuf generation * Add the TypeScript generated protobufs to gitattributes * Add the generated TypeScript protobuf files * Add `gen/proto/ts` everywhere `gen/proto/js` is referenced * Use npm exec to avoid a hard-coded path * Add --yes flag to npm exec * Also update JS generation to use npm exec * Specify version number in buf config * Re-run make grpc
This commit is contained in:
@@ -6,3 +6,5 @@ docs/theme/js/theme.js linguist-vendored=false
|
||||
# https://github.com/github/linguist/blob/v7.23.0/lib/linguist/generated.rb#L349-L358
|
||||
*_pb.js linguist-generated
|
||||
*_pb.d.ts linguist-generated
|
||||
*_pb.ts linguist-generated
|
||||
*_pb.grpc-*.ts linguist-generated
|
||||
|
||||
@@ -16,10 +16,12 @@ on:
|
||||
paths-ignore:
|
||||
- 'web/**'
|
||||
- 'gen/proto/js/**'
|
||||
- 'gen/proto/ts/**'
|
||||
merge_group:
|
||||
paths-ignore:
|
||||
- 'web/**'
|
||||
- 'gen/proto/js/**'
|
||||
- 'gen/proto/ts/**'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
||||
@@ -6,10 +6,12 @@ on:
|
||||
paths:
|
||||
- 'web/**'
|
||||
- 'gen/proto/js/**'
|
||||
- 'gen/proto/ts/**'
|
||||
merge_group:
|
||||
paths:
|
||||
- 'web/**'
|
||||
- 'gen/proto/js/**'
|
||||
- 'gen/proto/ts/**'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
||||
@@ -17,11 +17,13 @@ on:
|
||||
- '.github/workflows/unit-tests-ui.yaml'
|
||||
- 'web/**'
|
||||
- 'gen/proto/js/**'
|
||||
- 'gen/proto/ts/**'
|
||||
merge_group:
|
||||
paths-ignore:
|
||||
- '.github/workflows/unit-tests-ui.yaml'
|
||||
- 'web/**'
|
||||
- 'gen/proto/js/**'
|
||||
- 'gen/proto/ts/**'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
||||
@@ -7,11 +7,13 @@ on:
|
||||
- '.github/workflows/unit-tests-ui.yaml'
|
||||
- 'web/**'
|
||||
- 'gen/proto/js/**'
|
||||
- 'gen/proto/ts/**'
|
||||
merge_group:
|
||||
paths:
|
||||
- '.github/workflows/unit-tests-ui.yaml'
|
||||
- 'web/**'
|
||||
- 'gen/proto/js/**'
|
||||
- 'gen/proto/ts/**'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
@@ -18,4 +18,11 @@ plugins:
|
||||
- name: ts
|
||||
strategy: all
|
||||
out: gen/proto/js
|
||||
path:
|
||||
- npm
|
||||
- exec
|
||||
- --yes
|
||||
- --package=grpc_tools_node_protoc_ts@5.0.1
|
||||
- --
|
||||
- protoc-gen-ts
|
||||
opt: "service=grpc-node"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
version: v1
|
||||
plugins:
|
||||
- name: typescript
|
||||
out: gen/proto/ts
|
||||
opt: long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
path:
|
||||
- npm
|
||||
- exec
|
||||
- --yes
|
||||
- --package=@protobuf-ts/plugin@2.9.3
|
||||
- --
|
||||
- protoc-gen-ts
|
||||
strategy: all
|
||||
@@ -73,6 +73,7 @@ main() {
|
||||
--path=proto/prehog/
|
||||
|
||||
# Generate JS protos.
|
||||
# TODO(ryan): remove once Connect has migrated to the TS protobufs.
|
||||
[[ $skip_js -eq 0 ]] && echoed buf generate --template=buf-js.gen.yaml \
|
||||
--path=proto/prehog/ \
|
||||
--path=proto/teleport/lib/teleterm/ \
|
||||
@@ -80,6 +81,15 @@ main() {
|
||||
--path=api/proto/teleport/accesslist/ \
|
||||
--path=api/proto/teleport/trait/ \
|
||||
--path=api/proto/teleport/header/
|
||||
|
||||
# Generate TS protos.
|
||||
[[ $skip_js -eq 0 ]] && echoed buf generate --template=buf-ts.gen.yaml \
|
||||
--path=proto/prehog/ \
|
||||
--path=proto/teleport/lib/teleterm/ \
|
||||
--path=api/proto/teleport/userpreferences/ \
|
||||
--path=api/proto/teleport/accesslist/ \
|
||||
--path=api/proto/teleport/trait/ \
|
||||
--path=api/proto/teleport/header/
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
+4511
File diff suppressed because it is too large
Load Diff
+232
@@ -0,0 +1,232 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "google/protobuf/duration.proto" (package "google.protobuf", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { typeofJsonValue } from "@protobuf-ts/runtime";
|
||||
import type { JsonValue } from "@protobuf-ts/runtime";
|
||||
import type { JsonReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
|
||||
import { PbLong } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* A Duration represents a signed, fixed-length span of time represented
|
||||
* as a count of seconds and fractions of seconds at nanosecond
|
||||
* resolution. It is independent of any calendar and concepts like "day"
|
||||
* or "month". It is related to Timestamp in that the difference between
|
||||
* two Timestamp values is a Duration and it can be added or subtracted
|
||||
* from a Timestamp. Range is approximately +-10,000 years.
|
||||
*
|
||||
* # Examples
|
||||
*
|
||||
* Example 1: Compute Duration from two Timestamps in pseudo code.
|
||||
*
|
||||
* Timestamp start = ...;
|
||||
* Timestamp end = ...;
|
||||
* Duration duration = ...;
|
||||
*
|
||||
* duration.seconds = end.seconds - start.seconds;
|
||||
* duration.nanos = end.nanos - start.nanos;
|
||||
*
|
||||
* if (duration.seconds < 0 && duration.nanos > 0) {
|
||||
* duration.seconds += 1;
|
||||
* duration.nanos -= 1000000000;
|
||||
* } else if (duration.seconds > 0 && duration.nanos < 0) {
|
||||
* duration.seconds -= 1;
|
||||
* duration.nanos += 1000000000;
|
||||
* }
|
||||
*
|
||||
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
||||
*
|
||||
* Timestamp start = ...;
|
||||
* Duration duration = ...;
|
||||
* Timestamp end = ...;
|
||||
*
|
||||
* end.seconds = start.seconds + duration.seconds;
|
||||
* end.nanos = start.nanos + duration.nanos;
|
||||
*
|
||||
* if (end.nanos < 0) {
|
||||
* end.seconds -= 1;
|
||||
* end.nanos += 1000000000;
|
||||
* } else if (end.nanos >= 1000000000) {
|
||||
* end.seconds += 1;
|
||||
* end.nanos -= 1000000000;
|
||||
* }
|
||||
*
|
||||
* Example 3: Compute Duration from datetime.timedelta in Python.
|
||||
*
|
||||
* td = datetime.timedelta(days=3, minutes=10)
|
||||
* duration = Duration()
|
||||
* duration.FromTimedelta(td)
|
||||
*
|
||||
* # JSON Mapping
|
||||
*
|
||||
* In JSON format, the Duration type is encoded as a string rather than an
|
||||
* object, where the string ends in the suffix "s" (indicating seconds) and
|
||||
* is preceded by the number of seconds, with nanoseconds expressed as
|
||||
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
||||
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
||||
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
||||
* microsecond should be expressed in JSON format as "3.000001s".
|
||||
*
|
||||
*
|
||||
* @generated from protobuf message google.protobuf.Duration
|
||||
*/
|
||||
export interface Duration {
|
||||
/**
|
||||
* Signed seconds of the span of time. Must be from -315,576,000,000
|
||||
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
||||
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
||||
*
|
||||
* @generated from protobuf field: int64 seconds = 1;
|
||||
*/
|
||||
seconds: number;
|
||||
/**
|
||||
* Signed fractions of a second at nanosecond resolution of the span
|
||||
* of time. Durations less than one second are represented with a 0
|
||||
* `seconds` field and a positive or negative `nanos` field. For durations
|
||||
* of one second or more, a non-zero value for the `nanos` field must be
|
||||
* of the same sign as the `seconds` field. Must be from -999,999,999
|
||||
* to +999,999,999 inclusive.
|
||||
*
|
||||
* @generated from protobuf field: int32 nanos = 2;
|
||||
*/
|
||||
nanos: number;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Duration$Type extends MessageType<Duration> {
|
||||
constructor() {
|
||||
super("google.protobuf.Duration", [
|
||||
{ no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
||||
]);
|
||||
}
|
||||
/**
|
||||
* Encode `Duration` to JSON string like "3.000001s".
|
||||
*/
|
||||
internalJsonWrite(message: Duration, options: JsonWriteOptions): JsonValue {
|
||||
let s = PbLong.from(message.seconds).toNumber();
|
||||
if (s > 315576000000 || s < -315576000000)
|
||||
throw new Error("Duration value out of range.");
|
||||
let text = message.seconds.toString();
|
||||
if (s === 0 && message.nanos < 0)
|
||||
text = "-" + text;
|
||||
if (message.nanos !== 0) {
|
||||
let nanosStr = Math.abs(message.nanos).toString();
|
||||
nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
|
||||
if (nanosStr.substring(3) === "000000")
|
||||
nanosStr = nanosStr.substring(0, 3);
|
||||
else if (nanosStr.substring(6) === "000")
|
||||
nanosStr = nanosStr.substring(0, 6);
|
||||
text += "." + nanosStr;
|
||||
}
|
||||
return text + "s";
|
||||
}
|
||||
/**
|
||||
* Decode `Duration` from JSON string like "3.000001s"
|
||||
*/
|
||||
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Duration): Duration {
|
||||
if (typeof json !== "string")
|
||||
throw new Error("Unable to parse Duration from JSON " + typeofJsonValue(json) + ". Expected string.");
|
||||
let match = json.match(/^(-?)([0-9]+)(?:\.([0-9]+))?s/);
|
||||
if (match === null)
|
||||
throw new Error("Unable to parse Duration from JSON string. Invalid format.");
|
||||
if (!target)
|
||||
target = this.create();
|
||||
let [, sign, secs, nanos] = match;
|
||||
let longSeconds = PbLong.from(sign + secs);
|
||||
if (longSeconds.toNumber() > 315576000000 || longSeconds.toNumber() < -315576000000)
|
||||
throw new Error("Unable to parse Duration from JSON string. Value out of range.");
|
||||
target.seconds = longSeconds.toNumber();
|
||||
if (typeof nanos == "string") {
|
||||
let nanosStr = sign + nanos + "0".repeat(9 - nanos.length);
|
||||
target.nanos = parseInt(nanosStr);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
create(value?: PartialMessage<Duration>): Duration {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.seconds = 0;
|
||||
message.nanos = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Duration>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Duration): Duration {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* int64 seconds */ 1:
|
||||
message.seconds = reader.int64().toNumber();
|
||||
break;
|
||||
case /* int32 nanos */ 2:
|
||||
message.nanos = reader.int32();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: Duration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* int64 seconds = 1; */
|
||||
if (message.seconds !== 0)
|
||||
writer.tag(1, WireType.Varint).int64(message.seconds);
|
||||
/* int32 nanos = 2; */
|
||||
if (message.nanos !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.nanos);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message google.protobuf.Duration
|
||||
*/
|
||||
export const Duration = new Duration$Type();
|
||||
Generated
+83
@@ -0,0 +1,83 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "google/protobuf/empty.proto" (package "google.protobuf", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* A generic empty message that you can re-use to avoid defining duplicated
|
||||
* empty messages in your APIs. A typical example is to use it as the request
|
||||
* or the response type of an API method. For instance:
|
||||
*
|
||||
* service Foo {
|
||||
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
* }
|
||||
*
|
||||
*
|
||||
* @generated from protobuf message google.protobuf.Empty
|
||||
*/
|
||||
export interface Empty {
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Empty$Type extends MessageType<Empty> {
|
||||
constructor() {
|
||||
super("google.protobuf.Empty", []);
|
||||
}
|
||||
create(value?: PartialMessage<Empty>): Empty {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Empty>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Empty): Empty {
|
||||
return target ?? this.create();
|
||||
}
|
||||
internalBinaryWrite(message: Empty, 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 google.protobuf.Empty
|
||||
*/
|
||||
export const Empty = new Empty$Type();
|
||||
+289
@@ -0,0 +1,289 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "google/protobuf/timestamp.proto" (package "google.protobuf", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { typeofJsonValue } from "@protobuf-ts/runtime";
|
||||
import type { JsonValue } from "@protobuf-ts/runtime";
|
||||
import type { JsonReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
|
||||
import { PbLong } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* A Timestamp represents a point in time independent of any time zone or local
|
||||
* calendar, encoded as a count of seconds and fractions of seconds at
|
||||
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
||||
* January 1, 1970, in the proleptic Gregorian calendar which extends the
|
||||
* Gregorian calendar backwards to year one.
|
||||
*
|
||||
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
||||
* second table is needed for interpretation, using a [24-hour linear
|
||||
* smear](https://developers.google.com/time/smear).
|
||||
*
|
||||
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
||||
* restricting to that range, we ensure that we can convert to and from [RFC
|
||||
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
||||
*
|
||||
* # Examples
|
||||
*
|
||||
* Example 1: Compute Timestamp from POSIX `time()`.
|
||||
*
|
||||
* Timestamp timestamp;
|
||||
* timestamp.set_seconds(time(NULL));
|
||||
* timestamp.set_nanos(0);
|
||||
*
|
||||
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
||||
*
|
||||
* struct timeval tv;
|
||||
* gettimeofday(&tv, NULL);
|
||||
*
|
||||
* Timestamp timestamp;
|
||||
* timestamp.set_seconds(tv.tv_sec);
|
||||
* timestamp.set_nanos(tv.tv_usec * 1000);
|
||||
*
|
||||
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
||||
*
|
||||
* FILETIME ft;
|
||||
* GetSystemTimeAsFileTime(&ft);
|
||||
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
||||
*
|
||||
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
||||
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
||||
* Timestamp timestamp;
|
||||
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
||||
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
||||
*
|
||||
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
||||
*
|
||||
* long millis = System.currentTimeMillis();
|
||||
*
|
||||
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
||||
* .setNanos((int) ((millis % 1000) * 1000000)).build();
|
||||
*
|
||||
* Example 5: Compute Timestamp from Java `Instant.now()`.
|
||||
*
|
||||
* Instant now = Instant.now();
|
||||
*
|
||||
* Timestamp timestamp =
|
||||
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
||||
* .setNanos(now.getNano()).build();
|
||||
*
|
||||
* Example 6: Compute Timestamp from current time in Python.
|
||||
*
|
||||
* timestamp = Timestamp()
|
||||
* timestamp.GetCurrentTime()
|
||||
*
|
||||
* # JSON Mapping
|
||||
*
|
||||
* In JSON format, the Timestamp type is encoded as a string in the
|
||||
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
||||
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
|
||||
* where {year} is always expressed using four digits while {month}, {day},
|
||||
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
||||
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
||||
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
||||
* is required. A proto3 JSON serializer should always use UTC (as indicated by
|
||||
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
||||
* able to accept both UTC and other timezones (as indicated by an offset).
|
||||
*
|
||||
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
||||
* 01:30 UTC on January 15, 2017.
|
||||
*
|
||||
* In JavaScript, one can convert a Date object to this format using the
|
||||
* standard
|
||||
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
||||
* method. In Python, a standard `datetime.datetime` object can be converted
|
||||
* to this format using
|
||||
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
||||
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
||||
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
||||
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
||||
* ) to obtain a formatter capable of generating timestamps in this format.
|
||||
*
|
||||
*
|
||||
* @generated from protobuf message google.protobuf.Timestamp
|
||||
*/
|
||||
export interface Timestamp {
|
||||
/**
|
||||
* Represents seconds of UTC time since Unix epoch
|
||||
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
||||
* 9999-12-31T23:59:59Z inclusive.
|
||||
*
|
||||
* @generated from protobuf field: int64 seconds = 1;
|
||||
*/
|
||||
seconds: number;
|
||||
/**
|
||||
* Non-negative fractions of a second at nanosecond resolution. Negative
|
||||
* second values with fractions must still have non-negative nanos values
|
||||
* that count forward in time. Must be from 0 to 999,999,999
|
||||
* inclusive.
|
||||
*
|
||||
* @generated from protobuf field: int32 nanos = 2;
|
||||
*/
|
||||
nanos: number;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Timestamp$Type extends MessageType<Timestamp> {
|
||||
constructor() {
|
||||
super("google.protobuf.Timestamp", [
|
||||
{ no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
||||
]);
|
||||
}
|
||||
/**
|
||||
* Creates a new `Timestamp` for the current time.
|
||||
*/
|
||||
now(): Timestamp {
|
||||
const msg = this.create();
|
||||
const ms = Date.now();
|
||||
msg.seconds = PbLong.from(Math.floor(ms / 1000)).toNumber();
|
||||
msg.nanos = (ms % 1000) * 1000000;
|
||||
return msg;
|
||||
}
|
||||
/**
|
||||
* Converts a `Timestamp` to a JavaScript Date.
|
||||
*/
|
||||
toDate(message: Timestamp): Date {
|
||||
return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));
|
||||
}
|
||||
/**
|
||||
* Converts a JavaScript Date to a `Timestamp`.
|
||||
*/
|
||||
fromDate(date: Date): Timestamp {
|
||||
const msg = this.create();
|
||||
const ms = date.getTime();
|
||||
msg.seconds = PbLong.from(Math.floor(ms / 1000)).toNumber();
|
||||
msg.nanos = (ms % 1000) * 1000000;
|
||||
return msg;
|
||||
}
|
||||
/**
|
||||
* In JSON format, the `Timestamp` type is encoded as a string
|
||||
* in the RFC 3339 format.
|
||||
*/
|
||||
internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {
|
||||
let ms = PbLong.from(message.seconds).toNumber() * 1000;
|
||||
if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
|
||||
throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
|
||||
if (message.nanos < 0)
|
||||
throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");
|
||||
let z = "Z";
|
||||
if (message.nanos > 0) {
|
||||
let nanosStr = (message.nanos + 1000000000).toString().substring(1);
|
||||
if (nanosStr.substring(3) === "000000")
|
||||
z = "." + nanosStr.substring(0, 3) + "Z";
|
||||
else if (nanosStr.substring(6) === "000")
|
||||
z = "." + nanosStr.substring(0, 6) + "Z";
|
||||
else
|
||||
z = "." + nanosStr + "Z";
|
||||
}
|
||||
return new Date(ms).toISOString().replace(".000Z", z);
|
||||
}
|
||||
/**
|
||||
* In JSON format, the `Timestamp` type is encoded as a string
|
||||
* in the RFC 3339 format.
|
||||
*/
|
||||
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {
|
||||
if (typeof json !== "string")
|
||||
throw new Error("Unable to parse Timestamp from JSON " + typeofJsonValue(json) + ".");
|
||||
let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
|
||||
if (!matches)
|
||||
throw new Error("Unable to parse Timestamp from JSON. Invalid format.");
|
||||
let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
|
||||
if (Number.isNaN(ms))
|
||||
throw new Error("Unable to parse Timestamp from JSON. Invalid value.");
|
||||
if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
|
||||
throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
|
||||
if (!target)
|
||||
target = this.create();
|
||||
target.seconds = PbLong.from(ms / 1000).toNumber();
|
||||
target.nanos = 0;
|
||||
if (matches[7])
|
||||
target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000);
|
||||
return target;
|
||||
}
|
||||
create(value?: PartialMessage<Timestamp>): Timestamp {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.seconds = 0;
|
||||
message.nanos = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Timestamp>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* int64 seconds */ 1:
|
||||
message.seconds = reader.int64().toNumber();
|
||||
break;
|
||||
case /* int32 nanos */ 2:
|
||||
message.nanos = reader.int32();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* int64 seconds = 1; */
|
||||
if (message.seconds !== 0)
|
||||
writer.tag(1, WireType.Varint).int64(message.seconds);
|
||||
/* int32 nanos = 2; */
|
||||
if (message.nanos !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.nanos);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message google.protobuf.Timestamp
|
||||
*/
|
||||
export const Timestamp = new Timestamp$Type();
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1/teleport.proto" (package "prehog.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { TeleportReportingService } from "./teleport_pb";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { SubmitUsageReportsResponse } from "./teleport_pb";
|
||||
import type { SubmitUsageReportsRequest } from "./teleport_pb";
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1.TeleportReportingService
|
||||
*/
|
||||
export interface ITeleportReportingServiceClient {
|
||||
/**
|
||||
* encodes and forwards usage reports to the PostHog event database; each
|
||||
* event is annotated with some properties that depend on the identity of the
|
||||
* caller:
|
||||
* - tp.account_id (UUID in string form, can be empty if missing from the
|
||||
* license)
|
||||
* - tp.license_name (should always be a UUID)
|
||||
* - tp.license_authority (name of the authority that signed the license file
|
||||
* used for authentication)
|
||||
* - tp.is_cloud (boolean)
|
||||
*
|
||||
* @generated from protobuf rpc: SubmitUsageReports(prehog.v1.SubmitUsageReportsRequest) returns (prehog.v1.SubmitUsageReportsResponse);
|
||||
*/
|
||||
submitUsageReports(input: SubmitUsageReportsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void): grpc.ClientUnaryCall;
|
||||
submitUsageReports(input: SubmitUsageReportsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void): grpc.ClientUnaryCall;
|
||||
submitUsageReports(input: SubmitUsageReportsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void): grpc.ClientUnaryCall;
|
||||
submitUsageReports(input: SubmitUsageReportsRequest, callback: (err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1.TeleportReportingService
|
||||
*/
|
||||
export class TeleportReportingServiceClient extends grpc.Client implements ITeleportReportingServiceClient {
|
||||
private readonly _binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions>;
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions> = {}) {
|
||||
super(address, credentials, options);
|
||||
this._binaryOptions = binaryOptions;
|
||||
}
|
||||
/**
|
||||
* encodes and forwards usage reports to the PostHog event database; each
|
||||
* event is annotated with some properties that depend on the identity of the
|
||||
* caller:
|
||||
* - tp.account_id (UUID in string form, can be empty if missing from the
|
||||
* license)
|
||||
* - tp.license_name (should always be a UUID)
|
||||
* - tp.license_authority (name of the authority that signed the license file
|
||||
* used for authentication)
|
||||
* - tp.is_cloud (boolean)
|
||||
*
|
||||
* @generated from protobuf rpc: SubmitUsageReports(prehog.v1.SubmitUsageReportsRequest) returns (prehog.v1.SubmitUsageReportsResponse);
|
||||
*/
|
||||
submitUsageReports(input: SubmitUsageReportsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TeleportReportingService.methods[0];
|
||||
return this.makeUnaryRequest<SubmitUsageReportsRequest, SubmitUsageReportsResponse>(`/${TeleportReportingService.typeName}/${method.name}`, (value: SubmitUsageReportsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitUsageReportsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1/teleport.proto" (package "prehog.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { SubmitUsageReportsResponse } from "./teleport_pb";
|
||||
import { SubmitUsageReportsRequest } from "./teleport_pb";
|
||||
import type * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1.TeleportReportingService
|
||||
*/
|
||||
export interface ITeleportReportingService extends grpc.UntypedServiceImplementation {
|
||||
/**
|
||||
* encodes and forwards usage reports to the PostHog event database; each
|
||||
* event is annotated with some properties that depend on the identity of the
|
||||
* caller:
|
||||
* - tp.account_id (UUID in string form, can be empty if missing from the
|
||||
* license)
|
||||
* - tp.license_name (should always be a UUID)
|
||||
* - tp.license_authority (name of the authority that signed the license file
|
||||
* used for authentication)
|
||||
* - tp.is_cloud (boolean)
|
||||
*
|
||||
* @generated from protobuf rpc: SubmitUsageReports(prehog.v1.SubmitUsageReportsRequest) returns (prehog.v1.SubmitUsageReportsResponse);
|
||||
*/
|
||||
submitUsageReports: grpc.handleUnaryCall<SubmitUsageReportsRequest, SubmitUsageReportsResponse>;
|
||||
}
|
||||
/**
|
||||
* @grpc/grpc-js definition for the protobuf service prehog.v1.TeleportReportingService.
|
||||
*
|
||||
* Usage: Implement the interface ITeleportReportingService and add to a grpc server.
|
||||
*
|
||||
* ```typescript
|
||||
* const server = new grpc.Server();
|
||||
* const service: ITeleportReportingService = ...
|
||||
* server.addService(teleportReportingServiceDefinition, service);
|
||||
* ```
|
||||
*/
|
||||
export const teleportReportingServiceDefinition: grpc.ServiceDefinition<ITeleportReportingService> = {
|
||||
submitUsageReports: {
|
||||
path: "/prehog.v1.TeleportReportingService/SubmitUsageReports",
|
||||
originalName: "SubmitUsageReports",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => SubmitUsageReportsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => SubmitUsageReportsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(SubmitUsageReportsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(SubmitUsageReportsRequest.toBinary(value))
|
||||
}
|
||||
};
|
||||
Generated
+845
@@ -0,0 +1,845 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1/teleport.proto" (package "prehog.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { Timestamp } from "../../google/protobuf/timestamp_pb";
|
||||
/**
|
||||
* counters for user activity coming from a specific auth server from a specific
|
||||
* cluster, for a time window of up to 15 minutes
|
||||
*
|
||||
* PostHog event: tp.user.activity
|
||||
*
|
||||
* @generated from protobuf message prehog.v1.UserActivityReport
|
||||
*/
|
||||
export interface UserActivityReport {
|
||||
/**
|
||||
* randomly generated UUID for this specific report, 16 bytes (in string order)
|
||||
*
|
||||
* PostHog property: tp.report_uuid (in 8-4-4-4-12 string form)
|
||||
*
|
||||
* @generated from protobuf field: bytes report_uuid = 1;
|
||||
*/
|
||||
reportUuid: Uint8Array;
|
||||
/**
|
||||
* cluster name, anonymized, 32 bytes (HMAC-SHA-256)
|
||||
*
|
||||
* PostHog property: tp.cluster_name (in base64)
|
||||
*
|
||||
* @generated from protobuf field: bytes cluster_name = 2;
|
||||
*/
|
||||
clusterName: Uint8Array;
|
||||
/**
|
||||
* hostid of the auth that collected this report, anonymized, 32 bytes (HMAC-SHA-256)
|
||||
*
|
||||
* PostHog property: tp.reporter_hostid (in base64)
|
||||
*
|
||||
* @generated from protobuf field: bytes reporter_hostid = 3;
|
||||
*/
|
||||
reporterHostid: Uint8Array;
|
||||
/**
|
||||
* beginning of the time window for this data; ending is not specified but is
|
||||
* intended to be at most 15 minutes
|
||||
*
|
||||
* PostHog timestamp (not a property, the ingest time is tp.report_time instead)
|
||||
*
|
||||
* @generated from protobuf field: google.protobuf.Timestamp start_time = 4;
|
||||
*/
|
||||
startTime?: Timestamp;
|
||||
/**
|
||||
* one set of counters for each user
|
||||
*
|
||||
* PostHog property: tp.records (encoded as a map keyed by username, not as a list)
|
||||
*
|
||||
* @generated from protobuf field: repeated prehog.v1.UserActivityRecord records = 5;
|
||||
*/
|
||||
records: UserActivityRecord[];
|
||||
}
|
||||
/**
|
||||
* a set of activity counters for a single user; some old versions report
|
||||
* "ssh_port_sessions", counting both SSH port forwards and kubectl port-forward
|
||||
* connections in a single counter
|
||||
*
|
||||
* fields other than user_name are encoded as the same field name in PostHog
|
||||
*
|
||||
* @generated from protobuf message prehog.v1.UserActivityRecord
|
||||
*/
|
||||
export interface UserActivityRecord {
|
||||
/**
|
||||
* anonymized, 32 bytes (HMAC-SHA-256)
|
||||
*
|
||||
* key of the tp.records map in tp.user.activity (in base64)
|
||||
*
|
||||
* @generated from protobuf field: bytes user_name = 1;
|
||||
*/
|
||||
userName: Uint8Array;
|
||||
/**
|
||||
* Indicates the type of user, e.g. bot or human, if known.
|
||||
*
|
||||
* @generated from protobuf field: prehog.v1.UserKind user_kind = 14;
|
||||
*/
|
||||
userKind: UserKind;
|
||||
/**
|
||||
* counter of user.login events
|
||||
*
|
||||
* @generated from protobuf field: uint64 logins = 2;
|
||||
*/
|
||||
logins: number;
|
||||
/**
|
||||
* counter of session.start events (non-Kube)
|
||||
*
|
||||
* @generated from protobuf field: uint64 ssh_sessions = 3;
|
||||
*/
|
||||
sshSessions: number;
|
||||
/**
|
||||
* counter of app.session.start events (non-TCP)
|
||||
*
|
||||
* @generated from protobuf field: uint64 app_sessions = 4;
|
||||
*/
|
||||
appSessions: number;
|
||||
/**
|
||||
* counter of session.start events (only Kube)
|
||||
*
|
||||
* @generated from protobuf field: uint64 kube_sessions = 5;
|
||||
*/
|
||||
kubeSessions: number;
|
||||
/**
|
||||
* counter of db.session.start events
|
||||
*
|
||||
* @generated from protobuf field: uint64 db_sessions = 6;
|
||||
*/
|
||||
dbSessions: number;
|
||||
/**
|
||||
* counter of windows.desktop.session.start events
|
||||
*
|
||||
* @generated from protobuf field: uint64 desktop_sessions = 7;
|
||||
*/
|
||||
desktopSessions: number;
|
||||
/**
|
||||
* counter of app.session.start events (only TCP)
|
||||
*
|
||||
* @generated from protobuf field: uint64 app_tcp_sessions = 8;
|
||||
*/
|
||||
appTcpSessions: number;
|
||||
/**
|
||||
* counter of port events (both SSH and Kube)
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf field: uint64 ssh_port_sessions = 9 [deprecated = true];
|
||||
*/
|
||||
sshPortSessions: number;
|
||||
/**
|
||||
* counter of kube.request events
|
||||
*
|
||||
* @generated from protobuf field: uint64 kube_requests = 10;
|
||||
*/
|
||||
kubeRequests: number;
|
||||
/**
|
||||
* counter of sftp events
|
||||
*
|
||||
* @generated from protobuf field: uint64 sftp_events = 11;
|
||||
*/
|
||||
sftpEvents: number;
|
||||
/**
|
||||
* counter of port events (only SSH)
|
||||
*
|
||||
* @generated from protobuf field: uint64 ssh_port_v2_sessions = 12;
|
||||
*/
|
||||
sshPortV2Sessions: number;
|
||||
/**
|
||||
* counter of port events (only Kube)
|
||||
*
|
||||
* @generated from protobuf field: uint64 kube_port_sessions = 13;
|
||||
*/
|
||||
kubePortSessions: number;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message prehog.v1.ResourcePresenceReport
|
||||
*/
|
||||
export interface ResourcePresenceReport {
|
||||
/**
|
||||
* randomly generated UUID for this specific report, 16 bytes (in string order)
|
||||
*
|
||||
* @generated from protobuf field: bytes report_uuid = 1;
|
||||
*/
|
||||
reportUuid: Uint8Array;
|
||||
/**
|
||||
* anonymized, 32 bytes (HMAC-SHA-256)
|
||||
*
|
||||
* @generated from protobuf field: bytes cluster_name = 2;
|
||||
*/
|
||||
clusterName: Uint8Array;
|
||||
/**
|
||||
* anonymized, 32 bytes (HMAC-SHA-256)
|
||||
*
|
||||
* @generated from protobuf field: bytes reporter_hostid = 3;
|
||||
*/
|
||||
reporterHostid: Uint8Array;
|
||||
/**
|
||||
* beginning of the time window for this data; ending is not specified but is
|
||||
* intended to be at most one hour
|
||||
*
|
||||
* @generated from protobuf field: google.protobuf.Timestamp start_time = 4;
|
||||
*/
|
||||
startTime?: Timestamp;
|
||||
/**
|
||||
* @generated from protobuf field: repeated prehog.v1.ResourceKindPresenceReport resource_kind_reports = 5;
|
||||
*/
|
||||
resourceKindReports: ResourceKindPresenceReport[];
|
||||
}
|
||||
/**
|
||||
* Counts all resources of one kind that were active during the time window
|
||||
* to track the number of active resources in a cluster over time.
|
||||
*
|
||||
* @generated from protobuf message prehog.v1.ResourceKindPresenceReport
|
||||
*/
|
||||
export interface ResourceKindPresenceReport {
|
||||
/**
|
||||
* the kind of resource
|
||||
*
|
||||
* @generated from protobuf field: prehog.v1.ResourceKind resource_kind = 1;
|
||||
*/
|
||||
resourceKind: ResourceKind;
|
||||
/**
|
||||
* first 8 bytes of anonymized resource name
|
||||
*
|
||||
* @generated from protobuf field: repeated fixed64 resource_ids = 2;
|
||||
*/
|
||||
resourceIds: number[];
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message prehog.v1.SubmitUsageReportsRequest
|
||||
*/
|
||||
export interface SubmitUsageReportsRequest {
|
||||
/**
|
||||
* at most 10 reports of all kinds in a single RPC, each shouldn't exceed 128KiB or so
|
||||
*
|
||||
* each report is encoded as a separate tp.user.activity PostHog event
|
||||
*
|
||||
* @generated from protobuf field: repeated prehog.v1.UserActivityReport user_activity = 1;
|
||||
*/
|
||||
userActivity: UserActivityReport[];
|
||||
/**
|
||||
* encoded as a separate tp.resource.counts PostHog event
|
||||
*
|
||||
* @generated from protobuf field: repeated prehog.v1.ResourcePresenceReport resource_presence = 2;
|
||||
*/
|
||||
resourcePresence: ResourcePresenceReport[];
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message prehog.v1.SubmitUsageReportsResponse
|
||||
*/
|
||||
export interface SubmitUsageReportsResponse {
|
||||
/**
|
||||
* randomly generated UUID for this specific batch, 16 bytes (in string order)
|
||||
*
|
||||
* PostHog property: tp.batch_uuid (in each report of the batch)
|
||||
*
|
||||
* @generated from protobuf field: bytes batch_uuid = 1;
|
||||
*/
|
||||
batchUuid: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* The kind of user a given username refers to. Usernames should always refer to
|
||||
* a valid cluster user (even if temporary, e.g. SSO), but may be Machine ID
|
||||
* bot users.
|
||||
*
|
||||
* @generated from protobuf enum prehog.v1.UserKind
|
||||
*/
|
||||
export enum UserKind {
|
||||
/**
|
||||
* Indicates a legacy cluster emitting events without a defined user kind.
|
||||
* Note that users (from PostHog's perspective) can be identified via future
|
||||
* events if the cluster is upgraded to specify this field.
|
||||
*
|
||||
* PostHog property value: ""
|
||||
*
|
||||
* @generated from protobuf enum value: USER_KIND_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* Indicates the user associated with this event is human, either created
|
||||
* locally or via SSO.
|
||||
*
|
||||
* PostHog property value: "human"
|
||||
*
|
||||
* @generated from protobuf enum value: USER_KIND_HUMAN = 1;
|
||||
*/
|
||||
HUMAN = 1,
|
||||
/**
|
||||
* Indicates the user associated with this event is a Machine ID bot user.
|
||||
*
|
||||
* PostHog property value: "bot"
|
||||
*
|
||||
* @generated from protobuf enum value: USER_KIND_BOT = 2;
|
||||
*/
|
||||
BOT = 2
|
||||
}
|
||||
/**
|
||||
* the kind of a "resource" (e.g. a node, a database, a desktop, etc.)
|
||||
* Keep in sync with prehog/v1alpha/teleport.proto
|
||||
*
|
||||
* @generated from protobuf enum prehog.v1.ResourceKind
|
||||
*/
|
||||
export enum ResourceKind {
|
||||
/**
|
||||
* @generated from protobuf enum value: RESOURCE_KIND_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* PostHog property value: "node"
|
||||
*
|
||||
* @generated from protobuf enum value: RESOURCE_KIND_NODE = 1;
|
||||
*/
|
||||
NODE = 1,
|
||||
/**
|
||||
* PostHog property value: "app_server"
|
||||
*
|
||||
* @generated from protobuf enum value: RESOURCE_KIND_APP_SERVER = 2;
|
||||
*/
|
||||
APP_SERVER = 2,
|
||||
/**
|
||||
* PostHog property value: "kube_server"
|
||||
*
|
||||
* @generated from protobuf enum value: RESOURCE_KIND_KUBE_SERVER = 3;
|
||||
*/
|
||||
KUBE_SERVER = 3,
|
||||
/**
|
||||
* PostHog property value: "db_server"
|
||||
*
|
||||
* @generated from protobuf enum value: RESOURCE_KIND_DB_SERVER = 4;
|
||||
*/
|
||||
DB_SERVER = 4,
|
||||
/**
|
||||
* PostHog property value: "windows_desktop"
|
||||
*
|
||||
* @generated from protobuf enum value: RESOURCE_KIND_WINDOWS_DESKTOP = 5;
|
||||
*/
|
||||
WINDOWS_DESKTOP = 5,
|
||||
/**
|
||||
* ServerV3 ("node") heartbeat with a subkind of "openssh" (as opposed to
|
||||
* empty or "teleport"); not used in keepalives
|
||||
*
|
||||
* PostHog property value: "node.openssh"
|
||||
*
|
||||
* @generated from protobuf enum value: RESOURCE_KIND_NODE_OPENSSH = 6;
|
||||
*/
|
||||
NODE_OPENSSH = 6,
|
||||
/**
|
||||
* ServerV3 ("node") heartbeat with a subkind of "openssh-ec2-ice".
|
||||
* Nodes that map EC2 instances and are accessed using EC2 Instance Connect Endpoint.
|
||||
* Not used in keepalives.
|
||||
* This is the SubKind SubKindOpenSSHEICENode in teleport repo.
|
||||
*
|
||||
* PostHog property value: "node.openssh_ec2_ice"
|
||||
*
|
||||
* @generated from protobuf enum value: RESOURCE_KIND_NODE_OPENSSH_EICE = 7;
|
||||
*/
|
||||
NODE_OPENSSH_EICE = 7
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class UserActivityReport$Type extends MessageType<UserActivityReport> {
|
||||
constructor() {
|
||||
super("prehog.v1.UserActivityReport", [
|
||||
{ no: 1, name: "report_uuid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 2, name: "cluster_name", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 3, name: "reporter_hostid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 4, name: "start_time", kind: "message", T: () => Timestamp },
|
||||
{ no: 5, name: "records", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => UserActivityRecord }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<UserActivityReport>): UserActivityReport {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.reportUuid = new Uint8Array(0);
|
||||
message.clusterName = new Uint8Array(0);
|
||||
message.reporterHostid = new Uint8Array(0);
|
||||
message.records = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<UserActivityReport>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserActivityReport): UserActivityReport {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* bytes report_uuid */ 1:
|
||||
message.reportUuid = reader.bytes();
|
||||
break;
|
||||
case /* bytes cluster_name */ 2:
|
||||
message.clusterName = reader.bytes();
|
||||
break;
|
||||
case /* bytes reporter_hostid */ 3:
|
||||
message.reporterHostid = reader.bytes();
|
||||
break;
|
||||
case /* google.protobuf.Timestamp start_time */ 4:
|
||||
message.startTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startTime);
|
||||
break;
|
||||
case /* repeated prehog.v1.UserActivityRecord records */ 5:
|
||||
message.records.push(UserActivityRecord.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: UserActivityReport, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* bytes report_uuid = 1; */
|
||||
if (message.reportUuid.length)
|
||||
writer.tag(1, WireType.LengthDelimited).bytes(message.reportUuid);
|
||||
/* bytes cluster_name = 2; */
|
||||
if (message.clusterName.length)
|
||||
writer.tag(2, WireType.LengthDelimited).bytes(message.clusterName);
|
||||
/* bytes reporter_hostid = 3; */
|
||||
if (message.reporterHostid.length)
|
||||
writer.tag(3, WireType.LengthDelimited).bytes(message.reporterHostid);
|
||||
/* google.protobuf.Timestamp start_time = 4; */
|
||||
if (message.startTime)
|
||||
Timestamp.internalBinaryWrite(message.startTime, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated prehog.v1.UserActivityRecord records = 5; */
|
||||
for (let i = 0; i < message.records.length; i++)
|
||||
UserActivityRecord.internalBinaryWrite(message.records[i], writer.tag(5, 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 prehog.v1.UserActivityReport
|
||||
*/
|
||||
export const UserActivityReport = new UserActivityReport$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class UserActivityRecord$Type extends MessageType<UserActivityRecord> {
|
||||
constructor() {
|
||||
super("prehog.v1.UserActivityRecord", [
|
||||
{ no: 1, name: "user_name", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 14, name: "user_kind", kind: "enum", T: () => ["prehog.v1.UserKind", UserKind, "USER_KIND_"] },
|
||||
{ no: 2, name: "logins", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 3, name: "ssh_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 4, name: "app_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 5, name: "kube_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 6, name: "db_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 7, name: "desktop_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 8, name: "app_tcp_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 9, name: "ssh_port_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 10, name: "kube_requests", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 11, name: "sftp_events", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 12, name: "ssh_port_v2_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 13, name: "kube_port_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<UserActivityRecord>): UserActivityRecord {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.userName = new Uint8Array(0);
|
||||
message.userKind = 0;
|
||||
message.logins = 0;
|
||||
message.sshSessions = 0;
|
||||
message.appSessions = 0;
|
||||
message.kubeSessions = 0;
|
||||
message.dbSessions = 0;
|
||||
message.desktopSessions = 0;
|
||||
message.appTcpSessions = 0;
|
||||
message.sshPortSessions = 0;
|
||||
message.kubeRequests = 0;
|
||||
message.sftpEvents = 0;
|
||||
message.sshPortV2Sessions = 0;
|
||||
message.kubePortSessions = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<UserActivityRecord>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserActivityRecord): UserActivityRecord {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* bytes user_name */ 1:
|
||||
message.userName = reader.bytes();
|
||||
break;
|
||||
case /* prehog.v1.UserKind user_kind */ 14:
|
||||
message.userKind = reader.int32();
|
||||
break;
|
||||
case /* uint64 logins */ 2:
|
||||
message.logins = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 ssh_sessions */ 3:
|
||||
message.sshSessions = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 app_sessions */ 4:
|
||||
message.appSessions = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 kube_sessions */ 5:
|
||||
message.kubeSessions = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 db_sessions */ 6:
|
||||
message.dbSessions = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 desktop_sessions */ 7:
|
||||
message.desktopSessions = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 app_tcp_sessions */ 8:
|
||||
message.appTcpSessions = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 ssh_port_sessions = 9 [deprecated = true];*/ 9:
|
||||
message.sshPortSessions = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 kube_requests */ 10:
|
||||
message.kubeRequests = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 sftp_events */ 11:
|
||||
message.sftpEvents = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 ssh_port_v2_sessions */ 12:
|
||||
message.sshPortV2Sessions = reader.uint64().toNumber();
|
||||
break;
|
||||
case /* uint64 kube_port_sessions */ 13:
|
||||
message.kubePortSessions = reader.uint64().toNumber();
|
||||
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: UserActivityRecord, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* bytes user_name = 1; */
|
||||
if (message.userName.length)
|
||||
writer.tag(1, WireType.LengthDelimited).bytes(message.userName);
|
||||
/* prehog.v1.UserKind user_kind = 14; */
|
||||
if (message.userKind !== 0)
|
||||
writer.tag(14, WireType.Varint).int32(message.userKind);
|
||||
/* uint64 logins = 2; */
|
||||
if (message.logins !== 0)
|
||||
writer.tag(2, WireType.Varint).uint64(message.logins);
|
||||
/* uint64 ssh_sessions = 3; */
|
||||
if (message.sshSessions !== 0)
|
||||
writer.tag(3, WireType.Varint).uint64(message.sshSessions);
|
||||
/* uint64 app_sessions = 4; */
|
||||
if (message.appSessions !== 0)
|
||||
writer.tag(4, WireType.Varint).uint64(message.appSessions);
|
||||
/* uint64 kube_sessions = 5; */
|
||||
if (message.kubeSessions !== 0)
|
||||
writer.tag(5, WireType.Varint).uint64(message.kubeSessions);
|
||||
/* uint64 db_sessions = 6; */
|
||||
if (message.dbSessions !== 0)
|
||||
writer.tag(6, WireType.Varint).uint64(message.dbSessions);
|
||||
/* uint64 desktop_sessions = 7; */
|
||||
if (message.desktopSessions !== 0)
|
||||
writer.tag(7, WireType.Varint).uint64(message.desktopSessions);
|
||||
/* uint64 app_tcp_sessions = 8; */
|
||||
if (message.appTcpSessions !== 0)
|
||||
writer.tag(8, WireType.Varint).uint64(message.appTcpSessions);
|
||||
/* uint64 ssh_port_sessions = 9 [deprecated = true]; */
|
||||
if (message.sshPortSessions !== 0)
|
||||
writer.tag(9, WireType.Varint).uint64(message.sshPortSessions);
|
||||
/* uint64 kube_requests = 10; */
|
||||
if (message.kubeRequests !== 0)
|
||||
writer.tag(10, WireType.Varint).uint64(message.kubeRequests);
|
||||
/* uint64 sftp_events = 11; */
|
||||
if (message.sftpEvents !== 0)
|
||||
writer.tag(11, WireType.Varint).uint64(message.sftpEvents);
|
||||
/* uint64 ssh_port_v2_sessions = 12; */
|
||||
if (message.sshPortV2Sessions !== 0)
|
||||
writer.tag(12, WireType.Varint).uint64(message.sshPortV2Sessions);
|
||||
/* uint64 kube_port_sessions = 13; */
|
||||
if (message.kubePortSessions !== 0)
|
||||
writer.tag(13, WireType.Varint).uint64(message.kubePortSessions);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message prehog.v1.UserActivityRecord
|
||||
*/
|
||||
export const UserActivityRecord = new UserActivityRecord$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ResourcePresenceReport$Type extends MessageType<ResourcePresenceReport> {
|
||||
constructor() {
|
||||
super("prehog.v1.ResourcePresenceReport", [
|
||||
{ no: 1, name: "report_uuid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 2, name: "cluster_name", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 3, name: "reporter_hostid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 4, name: "start_time", kind: "message", T: () => Timestamp },
|
||||
{ no: 5, name: "resource_kind_reports", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ResourceKindPresenceReport }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ResourcePresenceReport>): ResourcePresenceReport {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.reportUuid = new Uint8Array(0);
|
||||
message.clusterName = new Uint8Array(0);
|
||||
message.reporterHostid = new Uint8Array(0);
|
||||
message.resourceKindReports = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ResourcePresenceReport>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourcePresenceReport): ResourcePresenceReport {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* bytes report_uuid */ 1:
|
||||
message.reportUuid = reader.bytes();
|
||||
break;
|
||||
case /* bytes cluster_name */ 2:
|
||||
message.clusterName = reader.bytes();
|
||||
break;
|
||||
case /* bytes reporter_hostid */ 3:
|
||||
message.reporterHostid = reader.bytes();
|
||||
break;
|
||||
case /* google.protobuf.Timestamp start_time */ 4:
|
||||
message.startTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startTime);
|
||||
break;
|
||||
case /* repeated prehog.v1.ResourceKindPresenceReport resource_kind_reports */ 5:
|
||||
message.resourceKindReports.push(ResourceKindPresenceReport.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: ResourcePresenceReport, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* bytes report_uuid = 1; */
|
||||
if (message.reportUuid.length)
|
||||
writer.tag(1, WireType.LengthDelimited).bytes(message.reportUuid);
|
||||
/* bytes cluster_name = 2; */
|
||||
if (message.clusterName.length)
|
||||
writer.tag(2, WireType.LengthDelimited).bytes(message.clusterName);
|
||||
/* bytes reporter_hostid = 3; */
|
||||
if (message.reporterHostid.length)
|
||||
writer.tag(3, WireType.LengthDelimited).bytes(message.reporterHostid);
|
||||
/* google.protobuf.Timestamp start_time = 4; */
|
||||
if (message.startTime)
|
||||
Timestamp.internalBinaryWrite(message.startTime, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated prehog.v1.ResourceKindPresenceReport resource_kind_reports = 5; */
|
||||
for (let i = 0; i < message.resourceKindReports.length; i++)
|
||||
ResourceKindPresenceReport.internalBinaryWrite(message.resourceKindReports[i], writer.tag(5, 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 prehog.v1.ResourcePresenceReport
|
||||
*/
|
||||
export const ResourcePresenceReport = new ResourcePresenceReport$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ResourceKindPresenceReport$Type extends MessageType<ResourceKindPresenceReport> {
|
||||
constructor() {
|
||||
super("prehog.v1.ResourceKindPresenceReport", [
|
||||
{ no: 1, name: "resource_kind", kind: "enum", T: () => ["prehog.v1.ResourceKind", ResourceKind, "RESOURCE_KIND_"] },
|
||||
{ no: 2, name: "resource_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 6 /*ScalarType.FIXED64*/, L: 2 /*LongType.NUMBER*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ResourceKindPresenceReport>): ResourceKindPresenceReport {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.resourceKind = 0;
|
||||
message.resourceIds = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ResourceKindPresenceReport>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceKindPresenceReport): ResourceKindPresenceReport {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* prehog.v1.ResourceKind resource_kind */ 1:
|
||||
message.resourceKind = reader.int32();
|
||||
break;
|
||||
case /* repeated fixed64 resource_ids */ 2:
|
||||
if (wireType === WireType.LengthDelimited)
|
||||
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
||||
message.resourceIds.push(reader.fixed64().toNumber());
|
||||
else
|
||||
message.resourceIds.push(reader.fixed64().toNumber());
|
||||
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: ResourceKindPresenceReport, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* prehog.v1.ResourceKind resource_kind = 1; */
|
||||
if (message.resourceKind !== 0)
|
||||
writer.tag(1, WireType.Varint).int32(message.resourceKind);
|
||||
/* repeated fixed64 resource_ids = 2; */
|
||||
if (message.resourceIds.length) {
|
||||
writer.tag(2, WireType.LengthDelimited).fork();
|
||||
for (let i = 0; i < message.resourceIds.length; i++)
|
||||
writer.fixed64(message.resourceIds[i]);
|
||||
writer.join();
|
||||
}
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message prehog.v1.ResourceKindPresenceReport
|
||||
*/
|
||||
export const ResourceKindPresenceReport = new ResourceKindPresenceReport$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SubmitUsageReportsRequest$Type extends MessageType<SubmitUsageReportsRequest> {
|
||||
constructor() {
|
||||
super("prehog.v1.SubmitUsageReportsRequest", [
|
||||
{ no: 1, name: "user_activity", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => UserActivityReport },
|
||||
{ no: 2, name: "resource_presence", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ResourcePresenceReport }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SubmitUsageReportsRequest>): SubmitUsageReportsRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.userActivity = [];
|
||||
message.resourcePresence = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SubmitUsageReportsRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitUsageReportsRequest): SubmitUsageReportsRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* repeated prehog.v1.UserActivityReport user_activity */ 1:
|
||||
message.userActivity.push(UserActivityReport.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated prehog.v1.ResourcePresenceReport resource_presence */ 2:
|
||||
message.resourcePresence.push(ResourcePresenceReport.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: SubmitUsageReportsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* repeated prehog.v1.UserActivityReport user_activity = 1; */
|
||||
for (let i = 0; i < message.userActivity.length; i++)
|
||||
UserActivityReport.internalBinaryWrite(message.userActivity[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated prehog.v1.ResourcePresenceReport resource_presence = 2; */
|
||||
for (let i = 0; i < message.resourcePresence.length; i++)
|
||||
ResourcePresenceReport.internalBinaryWrite(message.resourcePresence[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 prehog.v1.SubmitUsageReportsRequest
|
||||
*/
|
||||
export const SubmitUsageReportsRequest = new SubmitUsageReportsRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SubmitUsageReportsResponse$Type extends MessageType<SubmitUsageReportsResponse> {
|
||||
constructor() {
|
||||
super("prehog.v1.SubmitUsageReportsResponse", [
|
||||
{ no: 1, name: "batch_uuid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SubmitUsageReportsResponse>): SubmitUsageReportsResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.batchUuid = new Uint8Array(0);
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SubmitUsageReportsResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitUsageReportsResponse): SubmitUsageReportsResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* bytes batch_uuid */ 1:
|
||||
message.batchUuid = 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: SubmitUsageReportsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* bytes batch_uuid = 1; */
|
||||
if (message.batchUuid.length)
|
||||
writer.tag(1, WireType.LengthDelimited).bytes(message.batchUuid);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message prehog.v1.SubmitUsageReportsResponse
|
||||
*/
|
||||
export const SubmitUsageReportsResponse = new SubmitUsageReportsResponse$Type();
|
||||
/**
|
||||
* @generated ServiceType for protobuf service prehog.v1.TeleportReportingService
|
||||
*/
|
||||
export const TeleportReportingService = new ServiceType("prehog.v1.TeleportReportingService", [
|
||||
{ name: "SubmitUsageReports", options: {}, I: SubmitUsageReportsRequest, O: SubmitUsageReportsResponse }
|
||||
]);
|
||||
@@ -0,0 +1,58 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1alpha/connect.proto" (package "prehog.v1alpha", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { ConnectReportingService } from "./connect_pb";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { SubmitConnectEventResponse } from "./connect_pb";
|
||||
import type { SubmitConnectEventRequest } from "./connect_pb";
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1alpha.ConnectReportingService
|
||||
*/
|
||||
export interface IConnectReportingServiceClient {
|
||||
/**
|
||||
* @generated from protobuf rpc: SubmitConnectEvent(prehog.v1alpha.SubmitConnectEventRequest) returns (prehog.v1alpha.SubmitConnectEventResponse);
|
||||
*/
|
||||
submitConnectEvent(input: SubmitConnectEventRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void): grpc.ClientUnaryCall;
|
||||
submitConnectEvent(input: SubmitConnectEventRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void): grpc.ClientUnaryCall;
|
||||
submitConnectEvent(input: SubmitConnectEventRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void): grpc.ClientUnaryCall;
|
||||
submitConnectEvent(input: SubmitConnectEventRequest, callback: (err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1alpha.ConnectReportingService
|
||||
*/
|
||||
export class ConnectReportingServiceClient extends grpc.Client implements IConnectReportingServiceClient {
|
||||
private readonly _binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions>;
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions> = {}) {
|
||||
super(address, credentials, options);
|
||||
this._binaryOptions = binaryOptions;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: SubmitConnectEvent(prehog.v1alpha.SubmitConnectEventRequest) returns (prehog.v1alpha.SubmitConnectEventResponse);
|
||||
*/
|
||||
submitConnectEvent(input: SubmitConnectEventRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = ConnectReportingService.methods[0];
|
||||
return this.makeUnaryRequest<SubmitConnectEventRequest, SubmitConnectEventResponse>(`/${ConnectReportingService.typeName}/${method.name}`, (value: SubmitConnectEventRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitConnectEventResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1alpha/connect.proto" (package "prehog.v1alpha", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { SubmitConnectEventResponse } from "./connect_pb";
|
||||
import { SubmitConnectEventRequest } from "./connect_pb";
|
||||
import type * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1alpha.ConnectReportingService
|
||||
*/
|
||||
export interface IConnectReportingService extends grpc.UntypedServiceImplementation {
|
||||
/**
|
||||
* @generated from protobuf rpc: SubmitConnectEvent(prehog.v1alpha.SubmitConnectEventRequest) returns (prehog.v1alpha.SubmitConnectEventResponse);
|
||||
*/
|
||||
submitConnectEvent: grpc.handleUnaryCall<SubmitConnectEventRequest, SubmitConnectEventResponse>;
|
||||
}
|
||||
/**
|
||||
* @grpc/grpc-js definition for the protobuf service prehog.v1alpha.ConnectReportingService.
|
||||
*
|
||||
* Usage: Implement the interface IConnectReportingService and add to a grpc server.
|
||||
*
|
||||
* ```typescript
|
||||
* const server = new grpc.Server();
|
||||
* const service: IConnectReportingService = ...
|
||||
* server.addService(connectReportingServiceDefinition, service);
|
||||
* ```
|
||||
*/
|
||||
export const connectReportingServiceDefinition: grpc.ServiceDefinition<IConnectReportingService> = {
|
||||
submitConnectEvent: {
|
||||
path: "/prehog.v1alpha.ConnectReportingService/SubmitConnectEvent",
|
||||
originalName: "SubmitConnectEvent",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => SubmitConnectEventResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => SubmitConnectEventRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(SubmitConnectEventResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(SubmitConnectEventRequest.toBinary(value))
|
||||
}
|
||||
};
|
||||
+1068
File diff suppressed because it is too large
Load Diff
+58
@@ -0,0 +1,58 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1alpha/tbot.proto" (package "prehog.v1alpha", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { TbotReportingService } from "./tbot_pb";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { SubmitTbotEventResponse } from "./tbot_pb";
|
||||
import type { SubmitTbotEventRequest } from "./tbot_pb";
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1alpha.TbotReportingService
|
||||
*/
|
||||
export interface ITbotReportingServiceClient {
|
||||
/**
|
||||
* @generated from protobuf rpc: SubmitTbotEvent(prehog.v1alpha.SubmitTbotEventRequest) returns (prehog.v1alpha.SubmitTbotEventResponse);
|
||||
*/
|
||||
submitTbotEvent(input: SubmitTbotEventRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void): grpc.ClientUnaryCall;
|
||||
submitTbotEvent(input: SubmitTbotEventRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void): grpc.ClientUnaryCall;
|
||||
submitTbotEvent(input: SubmitTbotEventRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void): grpc.ClientUnaryCall;
|
||||
submitTbotEvent(input: SubmitTbotEventRequest, callback: (err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1alpha.TbotReportingService
|
||||
*/
|
||||
export class TbotReportingServiceClient extends grpc.Client implements ITbotReportingServiceClient {
|
||||
private readonly _binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions>;
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions> = {}) {
|
||||
super(address, credentials, options);
|
||||
this._binaryOptions = binaryOptions;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: SubmitTbotEvent(prehog.v1alpha.SubmitTbotEventRequest) returns (prehog.v1alpha.SubmitTbotEventResponse);
|
||||
*/
|
||||
submitTbotEvent(input: SubmitTbotEventRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TbotReportingService.methods[0];
|
||||
return this.makeUnaryRequest<SubmitTbotEventRequest, SubmitTbotEventResponse>(`/${TbotReportingService.typeName}/${method.name}`, (value: SubmitTbotEventRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitTbotEventResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1alpha/tbot.proto" (package "prehog.v1alpha", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { SubmitTbotEventResponse } from "./tbot_pb";
|
||||
import { SubmitTbotEventRequest } from "./tbot_pb";
|
||||
import type * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1alpha.TbotReportingService
|
||||
*/
|
||||
export interface ITbotReportingService extends grpc.UntypedServiceImplementation {
|
||||
/**
|
||||
* @generated from protobuf rpc: SubmitTbotEvent(prehog.v1alpha.SubmitTbotEventRequest) returns (prehog.v1alpha.SubmitTbotEventResponse);
|
||||
*/
|
||||
submitTbotEvent: grpc.handleUnaryCall<SubmitTbotEventRequest, SubmitTbotEventResponse>;
|
||||
}
|
||||
/**
|
||||
* @grpc/grpc-js definition for the protobuf service prehog.v1alpha.TbotReportingService.
|
||||
*
|
||||
* Usage: Implement the interface ITbotReportingService and add to a grpc server.
|
||||
*
|
||||
* ```typescript
|
||||
* const server = new grpc.Server();
|
||||
* const service: ITbotReportingService = ...
|
||||
* server.addService(tbotReportingServiceDefinition, service);
|
||||
* ```
|
||||
*/
|
||||
export const tbotReportingServiceDefinition: grpc.ServiceDefinition<ITbotReportingService> = {
|
||||
submitTbotEvent: {
|
||||
path: "/prehog.v1alpha.TbotReportingService/SubmitTbotEvent",
|
||||
originalName: "SubmitTbotEvent",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => SubmitTbotEventResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => SubmitTbotEventRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(SubmitTbotEventResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(SubmitTbotEventRequest.toBinary(value))
|
||||
}
|
||||
};
|
||||
Generated
+341
@@ -0,0 +1,341 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1alpha/tbot.proto" (package "prehog.v1alpha", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { Timestamp } from "../../google/protobuf/timestamp_pb";
|
||||
/**
|
||||
* TbotStartEvent is triggered whenever tbot starts, regardless of whether tbot
|
||||
* was able to successfully connect to or authenticate with a Teleport cluster.
|
||||
*
|
||||
* @generated from protobuf message prehog.v1alpha.TbotStartEvent
|
||||
*/
|
||||
export interface TbotStartEvent {
|
||||
/**
|
||||
* @generated from protobuf field: prehog.v1alpha.TbotStartEvent.RunMode run_mode = 1;
|
||||
*/
|
||||
runMode: TbotStartEvent_RunMode;
|
||||
/**
|
||||
* @generated from protobuf field: string version = 2;
|
||||
*/
|
||||
version: string;
|
||||
/**
|
||||
* @generated from protobuf field: string join_type = 3;
|
||||
*/
|
||||
joinType: string;
|
||||
/**
|
||||
* @generated from protobuf field: string helper = 4;
|
||||
*/
|
||||
helper: string;
|
||||
/**
|
||||
* @generated from protobuf field: string helper_version = 5;
|
||||
*/
|
||||
helperVersion: string;
|
||||
/**
|
||||
* @generated from protobuf field: int32 destinations_other = 6;
|
||||
*/
|
||||
destinationsOther: number;
|
||||
/**
|
||||
* @generated from protobuf field: int32 destinations_database = 7;
|
||||
*/
|
||||
destinationsDatabase: number;
|
||||
/**
|
||||
* @generated from protobuf field: int32 destinations_kubernetes = 8;
|
||||
*/
|
||||
destinationsKubernetes: number;
|
||||
/**
|
||||
* @generated from protobuf field: int32 destinations_application = 9;
|
||||
*/
|
||||
destinationsApplication: number;
|
||||
}
|
||||
/**
|
||||
* RunMode specifies whether or not tbot has been configured to run once
|
||||
* and output certificates, or continually renew certificates in the
|
||||
* background.
|
||||
*
|
||||
* @generated from protobuf enum prehog.v1alpha.TbotStartEvent.RunMode
|
||||
*/
|
||||
export enum TbotStartEvent_RunMode {
|
||||
/**
|
||||
* @generated from protobuf enum value: RUN_MODE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* @generated from protobuf enum value: RUN_MODE_ONE_SHOT = 1;
|
||||
*/
|
||||
ONE_SHOT = 1,
|
||||
/**
|
||||
* @generated from protobuf enum value: RUN_MODE_DAEMON = 2;
|
||||
*/
|
||||
DAEMON = 2
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message prehog.v1alpha.SubmitTbotEventRequest
|
||||
*/
|
||||
export interface SubmitTbotEventRequest {
|
||||
/**
|
||||
* uuid identifying that tbot session. This is future-proofing for if we
|
||||
* decide to add multiple events in future, and need to tie them together.
|
||||
*
|
||||
* @generated from protobuf field: string distinct_id = 1;
|
||||
*/
|
||||
distinctId: string;
|
||||
/**
|
||||
* optional, will default to the ingest time if unset
|
||||
*
|
||||
* @generated from protobuf field: google.protobuf.Timestamp timestamp = 2;
|
||||
*/
|
||||
timestamp?: Timestamp;
|
||||
/**
|
||||
* @generated from protobuf oneof: event
|
||||
*/
|
||||
event: {
|
||||
oneofKind: "start";
|
||||
/**
|
||||
* @generated from protobuf field: prehog.v1alpha.TbotStartEvent start = 3;
|
||||
*/
|
||||
start: TbotStartEvent;
|
||||
} | {
|
||||
oneofKind: undefined;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message prehog.v1alpha.SubmitTbotEventResponse
|
||||
*/
|
||||
export interface SubmitTbotEventResponse {
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class TbotStartEvent$Type extends MessageType<TbotStartEvent> {
|
||||
constructor() {
|
||||
super("prehog.v1alpha.TbotStartEvent", [
|
||||
{ no: 1, name: "run_mode", kind: "enum", T: () => ["prehog.v1alpha.TbotStartEvent.RunMode", TbotStartEvent_RunMode, "RUN_MODE_"] },
|
||||
{ no: 2, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "join_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "helper", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 5, name: "helper_version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 6, name: "destinations_other", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
||||
{ no: 7, name: "destinations_database", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
||||
{ no: 8, name: "destinations_kubernetes", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
||||
{ no: 9, name: "destinations_application", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<TbotStartEvent>): TbotStartEvent {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.runMode = 0;
|
||||
message.version = "";
|
||||
message.joinType = "";
|
||||
message.helper = "";
|
||||
message.helperVersion = "";
|
||||
message.destinationsOther = 0;
|
||||
message.destinationsDatabase = 0;
|
||||
message.destinationsKubernetes = 0;
|
||||
message.destinationsApplication = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<TbotStartEvent>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TbotStartEvent): TbotStartEvent {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* prehog.v1alpha.TbotStartEvent.RunMode run_mode */ 1:
|
||||
message.runMode = reader.int32();
|
||||
break;
|
||||
case /* string version */ 2:
|
||||
message.version = reader.string();
|
||||
break;
|
||||
case /* string join_type */ 3:
|
||||
message.joinType = reader.string();
|
||||
break;
|
||||
case /* string helper */ 4:
|
||||
message.helper = reader.string();
|
||||
break;
|
||||
case /* string helper_version */ 5:
|
||||
message.helperVersion = reader.string();
|
||||
break;
|
||||
case /* int32 destinations_other */ 6:
|
||||
message.destinationsOther = reader.int32();
|
||||
break;
|
||||
case /* int32 destinations_database */ 7:
|
||||
message.destinationsDatabase = reader.int32();
|
||||
break;
|
||||
case /* int32 destinations_kubernetes */ 8:
|
||||
message.destinationsKubernetes = reader.int32();
|
||||
break;
|
||||
case /* int32 destinations_application */ 9:
|
||||
message.destinationsApplication = reader.int32();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: TbotStartEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* prehog.v1alpha.TbotStartEvent.RunMode run_mode = 1; */
|
||||
if (message.runMode !== 0)
|
||||
writer.tag(1, WireType.Varint).int32(message.runMode);
|
||||
/* string version = 2; */
|
||||
if (message.version !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.version);
|
||||
/* string join_type = 3; */
|
||||
if (message.joinType !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.joinType);
|
||||
/* string helper = 4; */
|
||||
if (message.helper !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.helper);
|
||||
/* string helper_version = 5; */
|
||||
if (message.helperVersion !== "")
|
||||
writer.tag(5, WireType.LengthDelimited).string(message.helperVersion);
|
||||
/* int32 destinations_other = 6; */
|
||||
if (message.destinationsOther !== 0)
|
||||
writer.tag(6, WireType.Varint).int32(message.destinationsOther);
|
||||
/* int32 destinations_database = 7; */
|
||||
if (message.destinationsDatabase !== 0)
|
||||
writer.tag(7, WireType.Varint).int32(message.destinationsDatabase);
|
||||
/* int32 destinations_kubernetes = 8; */
|
||||
if (message.destinationsKubernetes !== 0)
|
||||
writer.tag(8, WireType.Varint).int32(message.destinationsKubernetes);
|
||||
/* int32 destinations_application = 9; */
|
||||
if (message.destinationsApplication !== 0)
|
||||
writer.tag(9, WireType.Varint).int32(message.destinationsApplication);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message prehog.v1alpha.TbotStartEvent
|
||||
*/
|
||||
export const TbotStartEvent = new TbotStartEvent$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SubmitTbotEventRequest$Type extends MessageType<SubmitTbotEventRequest> {
|
||||
constructor() {
|
||||
super("prehog.v1alpha.SubmitTbotEventRequest", [
|
||||
{ no: 1, name: "distinct_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "timestamp", kind: "message", T: () => Timestamp },
|
||||
{ no: 3, name: "start", kind: "message", oneof: "event", T: () => TbotStartEvent }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SubmitTbotEventRequest>): SubmitTbotEventRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.distinctId = "";
|
||||
message.event = { oneofKind: undefined };
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SubmitTbotEventRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitTbotEventRequest): SubmitTbotEventRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string distinct_id */ 1:
|
||||
message.distinctId = reader.string();
|
||||
break;
|
||||
case /* google.protobuf.Timestamp timestamp */ 2:
|
||||
message.timestamp = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.timestamp);
|
||||
break;
|
||||
case /* prehog.v1alpha.TbotStartEvent start */ 3:
|
||||
message.event = {
|
||||
oneofKind: "start",
|
||||
start: TbotStartEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).start)
|
||||
};
|
||||
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: SubmitTbotEventRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string distinct_id = 1; */
|
||||
if (message.distinctId !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.distinctId);
|
||||
/* google.protobuf.Timestamp timestamp = 2; */
|
||||
if (message.timestamp)
|
||||
Timestamp.internalBinaryWrite(message.timestamp, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* prehog.v1alpha.TbotStartEvent start = 3; */
|
||||
if (message.event.oneofKind === "start")
|
||||
TbotStartEvent.internalBinaryWrite(message.event.start, writer.tag(3, 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 prehog.v1alpha.SubmitTbotEventRequest
|
||||
*/
|
||||
export const SubmitTbotEventRequest = new SubmitTbotEventRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SubmitTbotEventResponse$Type extends MessageType<SubmitTbotEventResponse> {
|
||||
constructor() {
|
||||
super("prehog.v1alpha.SubmitTbotEventResponse", []);
|
||||
}
|
||||
create(value?: PartialMessage<SubmitTbotEventResponse>): SubmitTbotEventResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SubmitTbotEventResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitTbotEventResponse): SubmitTbotEventResponse {
|
||||
return target ?? this.create();
|
||||
}
|
||||
internalBinaryWrite(message: SubmitTbotEventResponse, 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 prehog.v1alpha.SubmitTbotEventResponse
|
||||
*/
|
||||
export const SubmitTbotEventResponse = new SubmitTbotEventResponse$Type();
|
||||
/**
|
||||
* @generated ServiceType for protobuf service prehog.v1alpha.TbotReportingService
|
||||
*/
|
||||
export const TbotReportingService = new ServiceType("prehog.v1alpha.TbotReportingService", [
|
||||
{ name: "SubmitTbotEvent", options: {}, I: SubmitTbotEventRequest, O: SubmitTbotEventResponse }
|
||||
]);
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1alpha/teleport.proto" (package "prehog.v1alpha", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { TeleportReportingService } from "./teleport_pb";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { HelloTeleportResponse } from "./teleport_pb";
|
||||
import type { HelloTeleportRequest } from "./teleport_pb";
|
||||
import type { SubmitEventsResponse } from "./teleport_pb";
|
||||
import type { SubmitEventsRequest } from "./teleport_pb";
|
||||
import type { SubmitEventResponse } from "./teleport_pb";
|
||||
import type { SubmitEventRequest } from "./teleport_pb";
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1alpha.TeleportReportingService
|
||||
*/
|
||||
export interface ITeleportReportingServiceClient {
|
||||
/**
|
||||
* equivalent to SubmitEvents with a single event, should be unused by now
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SubmitEvent(prehog.v1alpha.SubmitEventRequest) returns (prehog.v1alpha.SubmitEventResponse);
|
||||
*/
|
||||
submitEvent(input: SubmitEventRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitEventResponse) => void): grpc.ClientUnaryCall;
|
||||
submitEvent(input: SubmitEventRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitEventResponse) => void): grpc.ClientUnaryCall;
|
||||
submitEvent(input: SubmitEventRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitEventResponse) => void): grpc.ClientUnaryCall;
|
||||
submitEvent(input: SubmitEventRequest, callback: (err: grpc.ServiceError | null, value?: SubmitEventResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* encodes and forwards usage events to the PostHog event database; each
|
||||
* event is annotated with some properties that depend on the identity of the
|
||||
* caller:
|
||||
* - tp.account_id (UUID in string form, can be empty if missing from the
|
||||
* license)
|
||||
* - tp.license_name (should always be a UUID)
|
||||
* - tp.license_authority (name of the authority that signed the license file
|
||||
* used for authentication)
|
||||
* - tp.is_cloud (boolean)
|
||||
*
|
||||
* @generated from protobuf rpc: SubmitEvents(prehog.v1alpha.SubmitEventsRequest) returns (prehog.v1alpha.SubmitEventsResponse);
|
||||
*/
|
||||
submitEvents(input: SubmitEventsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void): grpc.ClientUnaryCall;
|
||||
submitEvents(input: SubmitEventsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void): grpc.ClientUnaryCall;
|
||||
submitEvents(input: SubmitEventsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void): grpc.ClientUnaryCall;
|
||||
submitEvents(input: SubmitEventsRequest, callback: (err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* @generated from protobuf rpc: HelloTeleport(prehog.v1alpha.HelloTeleportRequest) returns (prehog.v1alpha.HelloTeleportResponse);
|
||||
*/
|
||||
helloTeleport(input: HelloTeleportRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void): grpc.ClientUnaryCall;
|
||||
helloTeleport(input: HelloTeleportRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void): grpc.ClientUnaryCall;
|
||||
helloTeleport(input: HelloTeleportRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void): grpc.ClientUnaryCall;
|
||||
helloTeleport(input: HelloTeleportRequest, callback: (err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1alpha.TeleportReportingService
|
||||
*/
|
||||
export class TeleportReportingServiceClient extends grpc.Client implements ITeleportReportingServiceClient {
|
||||
private readonly _binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions>;
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions> = {}) {
|
||||
super(address, credentials, options);
|
||||
this._binaryOptions = binaryOptions;
|
||||
}
|
||||
/**
|
||||
* equivalent to SubmitEvents with a single event, should be unused by now
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SubmitEvent(prehog.v1alpha.SubmitEventRequest) returns (prehog.v1alpha.SubmitEventResponse);
|
||||
*/
|
||||
submitEvent(input: SubmitEventRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitEventResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitEventResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitEventResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TeleportReportingService.methods[0];
|
||||
return this.makeUnaryRequest<SubmitEventRequest, SubmitEventResponse>(`/${TeleportReportingService.typeName}/${method.name}`, (value: SubmitEventRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitEventResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* encodes and forwards usage events to the PostHog event database; each
|
||||
* event is annotated with some properties that depend on the identity of the
|
||||
* caller:
|
||||
* - tp.account_id (UUID in string form, can be empty if missing from the
|
||||
* license)
|
||||
* - tp.license_name (should always be a UUID)
|
||||
* - tp.license_authority (name of the authority that signed the license file
|
||||
* used for authentication)
|
||||
* - tp.is_cloud (boolean)
|
||||
*
|
||||
* @generated from protobuf rpc: SubmitEvents(prehog.v1alpha.SubmitEventsRequest) returns (prehog.v1alpha.SubmitEventsResponse);
|
||||
*/
|
||||
submitEvents(input: SubmitEventsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TeleportReportingService.methods[1];
|
||||
return this.makeUnaryRequest<SubmitEventsRequest, SubmitEventsResponse>(`/${TeleportReportingService.typeName}/${method.name}`, (value: SubmitEventsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitEventsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: HelloTeleport(prehog.v1alpha.HelloTeleportRequest) returns (prehog.v1alpha.HelloTeleportResponse);
|
||||
*/
|
||||
helloTeleport(input: HelloTeleportRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TeleportReportingService.methods[2];
|
||||
return this.makeUnaryRequest<HelloTeleportRequest, HelloTeleportResponse>(`/${TeleportReportingService.typeName}/${method.name}`, (value: HelloTeleportRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): HelloTeleportResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "prehog/v1alpha/teleport.proto" (package "prehog.v1alpha", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { HelloTeleportResponse } from "./teleport_pb";
|
||||
import { HelloTeleportRequest } from "./teleport_pb";
|
||||
import { SubmitEventsResponse } from "./teleport_pb";
|
||||
import { SubmitEventsRequest } from "./teleport_pb";
|
||||
import { SubmitEventResponse } from "./teleport_pb";
|
||||
import { SubmitEventRequest } from "./teleport_pb";
|
||||
import type * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* @generated from protobuf service prehog.v1alpha.TeleportReportingService
|
||||
*/
|
||||
export interface ITeleportReportingService extends grpc.UntypedServiceImplementation {
|
||||
/**
|
||||
* equivalent to SubmitEvents with a single event, should be unused by now
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SubmitEvent(prehog.v1alpha.SubmitEventRequest) returns (prehog.v1alpha.SubmitEventResponse);
|
||||
*/
|
||||
submitEvent: grpc.handleUnaryCall<SubmitEventRequest, SubmitEventResponse>;
|
||||
/**
|
||||
* encodes and forwards usage events to the PostHog event database; each
|
||||
* event is annotated with some properties that depend on the identity of the
|
||||
* caller:
|
||||
* - tp.account_id (UUID in string form, can be empty if missing from the
|
||||
* license)
|
||||
* - tp.license_name (should always be a UUID)
|
||||
* - tp.license_authority (name of the authority that signed the license file
|
||||
* used for authentication)
|
||||
* - tp.is_cloud (boolean)
|
||||
*
|
||||
* @generated from protobuf rpc: SubmitEvents(prehog.v1alpha.SubmitEventsRequest) returns (prehog.v1alpha.SubmitEventsResponse);
|
||||
*/
|
||||
submitEvents: grpc.handleUnaryCall<SubmitEventsRequest, SubmitEventsResponse>;
|
||||
/**
|
||||
* @generated from protobuf rpc: HelloTeleport(prehog.v1alpha.HelloTeleportRequest) returns (prehog.v1alpha.HelloTeleportResponse);
|
||||
*/
|
||||
helloTeleport: grpc.handleUnaryCall<HelloTeleportRequest, HelloTeleportResponse>;
|
||||
}
|
||||
/**
|
||||
* @grpc/grpc-js definition for the protobuf service prehog.v1alpha.TeleportReportingService.
|
||||
*
|
||||
* Usage: Implement the interface ITeleportReportingService and add to a grpc server.
|
||||
*
|
||||
* ```typescript
|
||||
* const server = new grpc.Server();
|
||||
* const service: ITeleportReportingService = ...
|
||||
* server.addService(teleportReportingServiceDefinition, service);
|
||||
* ```
|
||||
*/
|
||||
export const teleportReportingServiceDefinition: grpc.ServiceDefinition<ITeleportReportingService> = {
|
||||
submitEvent: {
|
||||
path: "/prehog.v1alpha.TeleportReportingService/SubmitEvent",
|
||||
originalName: "SubmitEvent",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => SubmitEventResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => SubmitEventRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(SubmitEventResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(SubmitEventRequest.toBinary(value))
|
||||
},
|
||||
submitEvents: {
|
||||
path: "/prehog.v1alpha.TeleportReportingService/SubmitEvents",
|
||||
originalName: "SubmitEvents",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => SubmitEventsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => SubmitEventsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(SubmitEventsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(SubmitEventsRequest.toBinary(value))
|
||||
},
|
||||
helloTeleport: {
|
||||
path: "/prehog.v1alpha.TeleportReportingService/HelloTeleport",
|
||||
originalName: "HelloTeleport",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => HelloTeleportResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => HelloTeleportRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(HelloTeleportResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(HelloTeleportRequest.toBinary(value))
|
||||
}
|
||||
};
|
||||
+9056
File diff suppressed because it is too large
Load Diff
+1368
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,458 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/accesslist/v1/accesslist_service.proto" (package "teleport.accesslist.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import { AccessListService } from "./accesslist_service_pb";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { GetSuggestedAccessListsResponse } from "./accesslist_service_pb";
|
||||
import type { GetSuggestedAccessListsRequest } from "./accesslist_service_pb";
|
||||
import type { AccessRequestPromoteResponse } from "./accesslist_service_pb";
|
||||
import type { AccessRequestPromoteRequest } from "./accesslist_service_pb";
|
||||
import type { DeleteAccessListReviewRequest } from "./accesslist_service_pb";
|
||||
import type { CreateAccessListReviewResponse } from "./accesslist_service_pb";
|
||||
import type { CreateAccessListReviewRequest } from "./accesslist_service_pb";
|
||||
import type { ListAllAccessListReviewsResponse } from "./accesslist_service_pb";
|
||||
import type { ListAllAccessListReviewsRequest } from "./accesslist_service_pb";
|
||||
import type { ListAccessListReviewsResponse } from "./accesslist_service_pb";
|
||||
import type { ListAccessListReviewsRequest } from "./accesslist_service_pb";
|
||||
import type { UpsertAccessListWithMembersResponse } from "./accesslist_service_pb";
|
||||
import type { UpsertAccessListWithMembersRequest } from "./accesslist_service_pb";
|
||||
import type { DeleteAllAccessListMembersRequest } from "./accesslist_service_pb";
|
||||
import type { DeleteAllAccessListMembersForAccessListRequest } from "./accesslist_service_pb";
|
||||
import type { DeleteAccessListMemberRequest } from "./accesslist_service_pb";
|
||||
import type { UpsertAccessListMemberRequest } from "./accesslist_service_pb";
|
||||
import type { Member } from "./accesslist_pb";
|
||||
import type { GetAccessListMemberRequest } from "./accesslist_service_pb";
|
||||
import type { ListAllAccessListMembersResponse } from "./accesslist_service_pb";
|
||||
import type { ListAllAccessListMembersRequest } from "./accesslist_service_pb";
|
||||
import type { ListAccessListMembersResponse } from "./accesslist_service_pb";
|
||||
import type { ListAccessListMembersRequest } from "./accesslist_service_pb";
|
||||
import type { GetAccessListsToReviewResponse } from "./accesslist_service_pb";
|
||||
import type { GetAccessListsToReviewRequest } from "./accesslist_service_pb";
|
||||
import type { DeleteAllAccessListsRequest } from "./accesslist_service_pb";
|
||||
import type { Empty } from "../../../google/protobuf/empty_pb";
|
||||
import type { DeleteAccessListRequest } from "./accesslist_service_pb";
|
||||
import type { UpsertAccessListRequest } from "./accesslist_service_pb";
|
||||
import type { AccessList } from "./accesslist_pb";
|
||||
import type { GetAccessListRequest } from "./accesslist_service_pb";
|
||||
import type { ListAccessListsResponse } from "./accesslist_service_pb";
|
||||
import type { ListAccessListsRequest } from "./accesslist_service_pb";
|
||||
import type { GetAccessListsResponse } from "./accesslist_service_pb";
|
||||
import type { GetAccessListsRequest } from "./accesslist_service_pb";
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* AccessListService provides CRUD methods for Access List resources.
|
||||
*
|
||||
* @generated from protobuf service teleport.accesslist.v1.AccessListService
|
||||
*/
|
||||
export interface IAccessListServiceClient {
|
||||
/**
|
||||
* GetAccessLists returns a list of all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessLists(teleport.accesslist.v1.GetAccessListsRequest) returns (teleport.accesslist.v1.GetAccessListsResponse);
|
||||
*/
|
||||
getAccessLists(input: GetAccessListsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessLists(input: GetAccessListsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessLists(input: GetAccessListsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessLists(input: GetAccessListsRequest, callback: (err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListAccessLists returns a paginated list of all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAccessLists(teleport.accesslist.v1.ListAccessListsRequest) returns (teleport.accesslist.v1.ListAccessListsResponse);
|
||||
*/
|
||||
listAccessLists(input: ListAccessListsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
listAccessLists(input: ListAccessListsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
listAccessLists(input: ListAccessListsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
listAccessLists(input: ListAccessListsRequest, callback: (err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetAccessList returns the specified access list resource.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessList(teleport.accesslist.v1.GetAccessListRequest) returns (teleport.accesslist.v1.AccessList);
|
||||
*/
|
||||
getAccessList(input: GetAccessListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall;
|
||||
getAccessList(input: GetAccessListRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall;
|
||||
getAccessList(input: GetAccessListRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall;
|
||||
getAccessList(input: GetAccessListRequest, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* UpsertAccessList creates or updates an access list resource.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertAccessList(teleport.accesslist.v1.UpsertAccessListRequest) returns (teleport.accesslist.v1.AccessList);
|
||||
*/
|
||||
upsertAccessList(input: UpsertAccessListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall;
|
||||
upsertAccessList(input: UpsertAccessListRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall;
|
||||
upsertAccessList(input: UpsertAccessListRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall;
|
||||
upsertAccessList(input: UpsertAccessListRequest, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* DeleteAccessList hard deletes the specified access list resource.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessList(teleport.accesslist.v1.DeleteAccessListRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAccessList(input: DeleteAccessListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessList(input: DeleteAccessListRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessList(input: DeleteAccessListRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessList(input: DeleteAccessListRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* DeleteAllAccessLists hard deletes all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllAccessLists(teleport.accesslist.v1.DeleteAllAccessListsRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAllAccessLists(input: DeleteAllAccessListsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAllAccessLists(input: DeleteAllAccessListsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAllAccessLists(input: DeleteAllAccessListsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAllAccessLists(input: DeleteAllAccessListsRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetAccessListsToReview will return access lists that need to be reviewed by the current user.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessListsToReview(teleport.accesslist.v1.GetAccessListsToReviewRequest) returns (teleport.accesslist.v1.GetAccessListsToReviewResponse);
|
||||
*/
|
||||
getAccessListsToReview(input: GetAccessListsToReviewRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessListsToReview(input: GetAccessListsToReviewRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessListsToReview(input: GetAccessListsToReviewRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessListsToReview(input: GetAccessListsToReviewRequest, callback: (err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListAccessListMembers returns a paginated list of all access list members.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAccessListMembers(teleport.accesslist.v1.ListAccessListMembersRequest) returns (teleport.accesslist.v1.ListAccessListMembersResponse);
|
||||
*/
|
||||
listAccessListMembers(input: ListAccessListMembersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
listAccessListMembers(input: ListAccessListMembersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
listAccessListMembers(input: ListAccessListMembersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
listAccessListMembers(input: ListAccessListMembersRequest, callback: (err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListAllAccessListMembers returns a paginated list of all access list members for all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAllAccessListMembers(teleport.accesslist.v1.ListAllAccessListMembersRequest) returns (teleport.accesslist.v1.ListAllAccessListMembersResponse);
|
||||
*/
|
||||
listAllAccessListMembers(input: ListAllAccessListMembersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
listAllAccessListMembers(input: ListAllAccessListMembersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
listAllAccessListMembers(input: ListAllAccessListMembersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
listAllAccessListMembers(input: ListAllAccessListMembersRequest, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetAccessListMember returns the specified access list member resource.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessListMember(teleport.accesslist.v1.GetAccessListMemberRequest) returns (teleport.accesslist.v1.Member);
|
||||
*/
|
||||
getAccessListMember(input: GetAccessListMemberRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall;
|
||||
getAccessListMember(input: GetAccessListMemberRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall;
|
||||
getAccessListMember(input: GetAccessListMemberRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall;
|
||||
getAccessListMember(input: GetAccessListMemberRequest, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* UpsertAccessListMember creates or updates an access list member resource.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertAccessListMember(teleport.accesslist.v1.UpsertAccessListMemberRequest) returns (teleport.accesslist.v1.Member);
|
||||
*/
|
||||
upsertAccessListMember(input: UpsertAccessListMemberRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall;
|
||||
upsertAccessListMember(input: UpsertAccessListMemberRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall;
|
||||
upsertAccessListMember(input: UpsertAccessListMemberRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall;
|
||||
upsertAccessListMember(input: UpsertAccessListMemberRequest, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* DeleteAccessListMember hard deletes the specified access list member resource.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessListMember(teleport.accesslist.v1.DeleteAccessListMemberRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAccessListMember(input: DeleteAccessListMemberRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessListMember(input: DeleteAccessListMemberRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessListMember(input: DeleteAccessListMemberRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessListMember(input: DeleteAccessListMemberRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* DeleteAllAccessListMembers hard deletes all access list members for an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllAccessListMembersForAccessList(teleport.accesslist.v1.DeleteAllAccessListMembersForAccessListRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* DeleteAllAccessListMembers hard deletes all access list members for an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllAccessListMembers(teleport.accesslist.v1.DeleteAllAccessListMembersRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* UpsertAccessListWithMembers creates or updates an access list with members.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertAccessListWithMembers(teleport.accesslist.v1.UpsertAccessListWithMembersRequest) returns (teleport.accesslist.v1.UpsertAccessListWithMembersResponse);
|
||||
*/
|
||||
upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, callback: (err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListAccessListReviews will list access list reviews for a particular access list.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAccessListReviews(teleport.accesslist.v1.ListAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAccessListReviewsResponse);
|
||||
*/
|
||||
listAccessListReviews(input: ListAccessListReviewsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void): grpc.ClientUnaryCall;
|
||||
listAccessListReviews(input: ListAccessListReviewsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void): grpc.ClientUnaryCall;
|
||||
listAccessListReviews(input: ListAccessListReviewsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void): grpc.ClientUnaryCall;
|
||||
listAccessListReviews(input: ListAccessListReviewsRequest, callback: (err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListAllAccessListReviews will list access list reviews for all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAllAccessListReviews(teleport.accesslist.v1.ListAllAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAllAccessListReviewsResponse);
|
||||
*/
|
||||
listAllAccessListReviews(input: ListAllAccessListReviewsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void): grpc.ClientUnaryCall;
|
||||
listAllAccessListReviews(input: ListAllAccessListReviewsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void): grpc.ClientUnaryCall;
|
||||
listAllAccessListReviews(input: ListAllAccessListReviewsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void): grpc.ClientUnaryCall;
|
||||
listAllAccessListReviews(input: ListAllAccessListReviewsRequest, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* CreateAccessListReview will create a new review for an access list. It will also modify the original access list
|
||||
* and its members depending on the details of the review.
|
||||
*
|
||||
* @generated from protobuf rpc: CreateAccessListReview(teleport.accesslist.v1.CreateAccessListReviewRequest) returns (teleport.accesslist.v1.CreateAccessListReviewResponse);
|
||||
*/
|
||||
createAccessListReview(input: CreateAccessListReviewRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void): grpc.ClientUnaryCall;
|
||||
createAccessListReview(input: CreateAccessListReviewRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void): grpc.ClientUnaryCall;
|
||||
createAccessListReview(input: CreateAccessListReviewRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void): grpc.ClientUnaryCall;
|
||||
createAccessListReview(input: CreateAccessListReviewRequest, callback: (err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* DeleteAccessListReview will delete an access list review from the backend.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessListReview(teleport.accesslist.v1.DeleteAccessListReviewRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAccessListReview(input: DeleteAccessListReviewRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessListReview(input: DeleteAccessListReviewRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessListReview(input: DeleteAccessListReviewRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessListReview(input: DeleteAccessListReviewRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* AccessRequestPromote promotes an access request to an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: AccessRequestPromote(teleport.accesslist.v1.AccessRequestPromoteRequest) returns (teleport.accesslist.v1.AccessRequestPromoteResponse);
|
||||
*/
|
||||
accessRequestPromote(input: AccessRequestPromoteRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void): grpc.ClientUnaryCall;
|
||||
accessRequestPromote(input: AccessRequestPromoteRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void): grpc.ClientUnaryCall;
|
||||
accessRequestPromote(input: AccessRequestPromoteRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void): grpc.ClientUnaryCall;
|
||||
accessRequestPromote(input: AccessRequestPromoteRequest, callback: (err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetSuggestedAccessLists returns suggested access lists for an access request.
|
||||
*
|
||||
* @generated from protobuf rpc: GetSuggestedAccessLists(teleport.accesslist.v1.GetSuggestedAccessListsRequest) returns (teleport.accesslist.v1.GetSuggestedAccessListsResponse);
|
||||
*/
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
/**
|
||||
* AccessListService provides CRUD methods for Access List resources.
|
||||
*
|
||||
* @generated from protobuf service teleport.accesslist.v1.AccessListService
|
||||
*/
|
||||
export class AccessListServiceClient extends grpc.Client implements IAccessListServiceClient {
|
||||
private readonly _binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions>;
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions> = {}) {
|
||||
super(address, credentials, options);
|
||||
this._binaryOptions = binaryOptions;
|
||||
}
|
||||
/**
|
||||
* GetAccessLists returns a list of all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessLists(teleport.accesslist.v1.GetAccessListsRequest) returns (teleport.accesslist.v1.GetAccessListsResponse);
|
||||
*/
|
||||
getAccessLists(input: GetAccessListsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[0];
|
||||
return this.makeUnaryRequest<GetAccessListsRequest, GetAccessListsResponse>(`/${AccessListService.typeName}/${method.name}`, (value: GetAccessListsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetAccessListsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListAccessLists returns a paginated list of all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAccessLists(teleport.accesslist.v1.ListAccessListsRequest) returns (teleport.accesslist.v1.ListAccessListsResponse);
|
||||
*/
|
||||
listAccessLists(input: ListAccessListsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[1];
|
||||
return this.makeUnaryRequest<ListAccessListsRequest, ListAccessListsResponse>(`/${AccessListService.typeName}/${method.name}`, (value: ListAccessListsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAccessListsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetAccessList returns the specified access list resource.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessList(teleport.accesslist.v1.GetAccessListRequest) returns (teleport.accesslist.v1.AccessList);
|
||||
*/
|
||||
getAccessList(input: GetAccessListRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessList) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessList) => void), callback?: ((err: grpc.ServiceError | null, value?: AccessList) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[2];
|
||||
return this.makeUnaryRequest<GetAccessListRequest, AccessList>(`/${AccessListService.typeName}/${method.name}`, (value: GetAccessListRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): AccessList => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* UpsertAccessList creates or updates an access list resource.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertAccessList(teleport.accesslist.v1.UpsertAccessListRequest) returns (teleport.accesslist.v1.AccessList);
|
||||
*/
|
||||
upsertAccessList(input: UpsertAccessListRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessList) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessList) => void), callback?: ((err: grpc.ServiceError | null, value?: AccessList) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[3];
|
||||
return this.makeUnaryRequest<UpsertAccessListRequest, AccessList>(`/${AccessListService.typeName}/${method.name}`, (value: UpsertAccessListRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): AccessList => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* DeleteAccessList hard deletes the specified access list resource.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessList(teleport.accesslist.v1.DeleteAccessListRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAccessList(input: DeleteAccessListRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[4];
|
||||
return this.makeUnaryRequest<DeleteAccessListRequest, Empty>(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAccessListRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* DeleteAllAccessLists hard deletes all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllAccessLists(teleport.accesslist.v1.DeleteAllAccessListsRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAllAccessLists(input: DeleteAllAccessListsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[5];
|
||||
return this.makeUnaryRequest<DeleteAllAccessListsRequest, Empty>(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAllAccessListsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetAccessListsToReview will return access lists that need to be reviewed by the current user.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessListsToReview(teleport.accesslist.v1.GetAccessListsToReviewRequest) returns (teleport.accesslist.v1.GetAccessListsToReviewResponse);
|
||||
*/
|
||||
getAccessListsToReview(input: GetAccessListsToReviewRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[6];
|
||||
return this.makeUnaryRequest<GetAccessListsToReviewRequest, GetAccessListsToReviewResponse>(`/${AccessListService.typeName}/${method.name}`, (value: GetAccessListsToReviewRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetAccessListsToReviewResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListAccessListMembers returns a paginated list of all access list members.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAccessListMembers(teleport.accesslist.v1.ListAccessListMembersRequest) returns (teleport.accesslist.v1.ListAccessListMembersResponse);
|
||||
*/
|
||||
listAccessListMembers(input: ListAccessListMembersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[7];
|
||||
return this.makeUnaryRequest<ListAccessListMembersRequest, ListAccessListMembersResponse>(`/${AccessListService.typeName}/${method.name}`, (value: ListAccessListMembersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAccessListMembersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListAllAccessListMembers returns a paginated list of all access list members for all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAllAccessListMembers(teleport.accesslist.v1.ListAllAccessListMembersRequest) returns (teleport.accesslist.v1.ListAllAccessListMembersResponse);
|
||||
*/
|
||||
listAllAccessListMembers(input: ListAllAccessListMembersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[8];
|
||||
return this.makeUnaryRequest<ListAllAccessListMembersRequest, ListAllAccessListMembersResponse>(`/${AccessListService.typeName}/${method.name}`, (value: ListAllAccessListMembersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAllAccessListMembersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetAccessListMember returns the specified access list member resource.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessListMember(teleport.accesslist.v1.GetAccessListMemberRequest) returns (teleport.accesslist.v1.Member);
|
||||
*/
|
||||
getAccessListMember(input: GetAccessListMemberRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Member) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Member) => void), callback?: ((err: grpc.ServiceError | null, value?: Member) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[9];
|
||||
return this.makeUnaryRequest<GetAccessListMemberRequest, Member>(`/${AccessListService.typeName}/${method.name}`, (value: GetAccessListMemberRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Member => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* UpsertAccessListMember creates or updates an access list member resource.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertAccessListMember(teleport.accesslist.v1.UpsertAccessListMemberRequest) returns (teleport.accesslist.v1.Member);
|
||||
*/
|
||||
upsertAccessListMember(input: UpsertAccessListMemberRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Member) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Member) => void), callback?: ((err: grpc.ServiceError | null, value?: Member) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[10];
|
||||
return this.makeUnaryRequest<UpsertAccessListMemberRequest, Member>(`/${AccessListService.typeName}/${method.name}`, (value: UpsertAccessListMemberRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Member => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* DeleteAccessListMember hard deletes the specified access list member resource.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessListMember(teleport.accesslist.v1.DeleteAccessListMemberRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAccessListMember(input: DeleteAccessListMemberRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[11];
|
||||
return this.makeUnaryRequest<DeleteAccessListMemberRequest, Empty>(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAccessListMemberRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* DeleteAllAccessListMembers hard deletes all access list members for an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllAccessListMembersForAccessList(teleport.accesslist.v1.DeleteAllAccessListMembersForAccessListRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[12];
|
||||
return this.makeUnaryRequest<DeleteAllAccessListMembersForAccessListRequest, Empty>(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAllAccessListMembersForAccessListRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* DeleteAllAccessListMembers hard deletes all access list members for an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllAccessListMembers(teleport.accesslist.v1.DeleteAllAccessListMembersRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[13];
|
||||
return this.makeUnaryRequest<DeleteAllAccessListMembersRequest, Empty>(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAllAccessListMembersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* UpsertAccessListWithMembers creates or updates an access list with members.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertAccessListWithMembers(teleport.accesslist.v1.UpsertAccessListWithMembersRequest) returns (teleport.accesslist.v1.UpsertAccessListWithMembersResponse);
|
||||
*/
|
||||
upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[14];
|
||||
return this.makeUnaryRequest<UpsertAccessListWithMembersRequest, UpsertAccessListWithMembersResponse>(`/${AccessListService.typeName}/${method.name}`, (value: UpsertAccessListWithMembersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): UpsertAccessListWithMembersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListAccessListReviews will list access list reviews for a particular access list.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAccessListReviews(teleport.accesslist.v1.ListAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAccessListReviewsResponse);
|
||||
*/
|
||||
listAccessListReviews(input: ListAccessListReviewsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[15];
|
||||
return this.makeUnaryRequest<ListAccessListReviewsRequest, ListAccessListReviewsResponse>(`/${AccessListService.typeName}/${method.name}`, (value: ListAccessListReviewsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAccessListReviewsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListAllAccessListReviews will list access list reviews for all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAllAccessListReviews(teleport.accesslist.v1.ListAllAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAllAccessListReviewsResponse);
|
||||
*/
|
||||
listAllAccessListReviews(input: ListAllAccessListReviewsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[16];
|
||||
return this.makeUnaryRequest<ListAllAccessListReviewsRequest, ListAllAccessListReviewsResponse>(`/${AccessListService.typeName}/${method.name}`, (value: ListAllAccessListReviewsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAllAccessListReviewsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* CreateAccessListReview will create a new review for an access list. It will also modify the original access list
|
||||
* and its members depending on the details of the review.
|
||||
*
|
||||
* @generated from protobuf rpc: CreateAccessListReview(teleport.accesslist.v1.CreateAccessListReviewRequest) returns (teleport.accesslist.v1.CreateAccessListReviewResponse);
|
||||
*/
|
||||
createAccessListReview(input: CreateAccessListReviewRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[17];
|
||||
return this.makeUnaryRequest<CreateAccessListReviewRequest, CreateAccessListReviewResponse>(`/${AccessListService.typeName}/${method.name}`, (value: CreateAccessListReviewRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): CreateAccessListReviewResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* DeleteAccessListReview will delete an access list review from the backend.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessListReview(teleport.accesslist.v1.DeleteAccessListReviewRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAccessListReview(input: DeleteAccessListReviewRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[18];
|
||||
return this.makeUnaryRequest<DeleteAccessListReviewRequest, Empty>(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAccessListReviewRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* AccessRequestPromote promotes an access request to an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: AccessRequestPromote(teleport.accesslist.v1.AccessRequestPromoteRequest) returns (teleport.accesslist.v1.AccessRequestPromoteResponse);
|
||||
*/
|
||||
accessRequestPromote(input: AccessRequestPromoteRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[19];
|
||||
return this.makeUnaryRequest<AccessRequestPromoteRequest, AccessRequestPromoteResponse>(`/${AccessListService.typeName}/${method.name}`, (value: AccessRequestPromoteRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): AccessRequestPromoteResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetSuggestedAccessLists returns suggested access lists for an access request.
|
||||
*
|
||||
* @generated from protobuf rpc: GetSuggestedAccessLists(teleport.accesslist.v1.GetSuggestedAccessListsRequest) returns (teleport.accesslist.v1.GetSuggestedAccessListsResponse);
|
||||
*/
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = AccessListService.methods[20];
|
||||
return this.makeUnaryRequest<GetSuggestedAccessListsRequest, GetSuggestedAccessListsResponse>(`/${AccessListService.typeName}/${method.name}`, (value: GetSuggestedAccessListsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetSuggestedAccessListsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,413 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/accesslist/v1/accesslist_service.proto" (package "teleport.accesslist.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import { GetSuggestedAccessListsResponse } from "./accesslist_service_pb";
|
||||
import { GetSuggestedAccessListsRequest } from "./accesslist_service_pb";
|
||||
import { AccessRequestPromoteResponse } from "./accesslist_service_pb";
|
||||
import { AccessRequestPromoteRequest } from "./accesslist_service_pb";
|
||||
import { DeleteAccessListReviewRequest } from "./accesslist_service_pb";
|
||||
import { CreateAccessListReviewResponse } from "./accesslist_service_pb";
|
||||
import { CreateAccessListReviewRequest } from "./accesslist_service_pb";
|
||||
import { ListAllAccessListReviewsResponse } from "./accesslist_service_pb";
|
||||
import { ListAllAccessListReviewsRequest } from "./accesslist_service_pb";
|
||||
import { ListAccessListReviewsResponse } from "./accesslist_service_pb";
|
||||
import { ListAccessListReviewsRequest } from "./accesslist_service_pb";
|
||||
import { UpsertAccessListWithMembersResponse } from "./accesslist_service_pb";
|
||||
import { UpsertAccessListWithMembersRequest } from "./accesslist_service_pb";
|
||||
import { DeleteAllAccessListMembersRequest } from "./accesslist_service_pb";
|
||||
import { DeleteAllAccessListMembersForAccessListRequest } from "./accesslist_service_pb";
|
||||
import { DeleteAccessListMemberRequest } from "./accesslist_service_pb";
|
||||
import { UpsertAccessListMemberRequest } from "./accesslist_service_pb";
|
||||
import { Member } from "./accesslist_pb";
|
||||
import { GetAccessListMemberRequest } from "./accesslist_service_pb";
|
||||
import { ListAllAccessListMembersResponse } from "./accesslist_service_pb";
|
||||
import { ListAllAccessListMembersRequest } from "./accesslist_service_pb";
|
||||
import { ListAccessListMembersResponse } from "./accesslist_service_pb";
|
||||
import { ListAccessListMembersRequest } from "./accesslist_service_pb";
|
||||
import { GetAccessListsToReviewResponse } from "./accesslist_service_pb";
|
||||
import { GetAccessListsToReviewRequest } from "./accesslist_service_pb";
|
||||
import { DeleteAllAccessListsRequest } from "./accesslist_service_pb";
|
||||
import { Empty } from "../../../google/protobuf/empty_pb";
|
||||
import { DeleteAccessListRequest } from "./accesslist_service_pb";
|
||||
import { UpsertAccessListRequest } from "./accesslist_service_pb";
|
||||
import { AccessList } from "./accesslist_pb";
|
||||
import { GetAccessListRequest } from "./accesslist_service_pb";
|
||||
import { ListAccessListsResponse } from "./accesslist_service_pb";
|
||||
import { ListAccessListsRequest } from "./accesslist_service_pb";
|
||||
import { GetAccessListsResponse } from "./accesslist_service_pb";
|
||||
import { GetAccessListsRequest } from "./accesslist_service_pb";
|
||||
import type * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* AccessListService provides CRUD methods for Access List resources.
|
||||
*
|
||||
* @generated from protobuf service teleport.accesslist.v1.AccessListService
|
||||
*/
|
||||
export interface IAccessListService extends grpc.UntypedServiceImplementation {
|
||||
/**
|
||||
* GetAccessLists returns a list of all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessLists(teleport.accesslist.v1.GetAccessListsRequest) returns (teleport.accesslist.v1.GetAccessListsResponse);
|
||||
*/
|
||||
getAccessLists: grpc.handleUnaryCall<GetAccessListsRequest, GetAccessListsResponse>;
|
||||
/**
|
||||
* ListAccessLists returns a paginated list of all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAccessLists(teleport.accesslist.v1.ListAccessListsRequest) returns (teleport.accesslist.v1.ListAccessListsResponse);
|
||||
*/
|
||||
listAccessLists: grpc.handleUnaryCall<ListAccessListsRequest, ListAccessListsResponse>;
|
||||
/**
|
||||
* GetAccessList returns the specified access list resource.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessList(teleport.accesslist.v1.GetAccessListRequest) returns (teleport.accesslist.v1.AccessList);
|
||||
*/
|
||||
getAccessList: grpc.handleUnaryCall<GetAccessListRequest, AccessList>;
|
||||
/**
|
||||
* UpsertAccessList creates or updates an access list resource.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertAccessList(teleport.accesslist.v1.UpsertAccessListRequest) returns (teleport.accesslist.v1.AccessList);
|
||||
*/
|
||||
upsertAccessList: grpc.handleUnaryCall<UpsertAccessListRequest, AccessList>;
|
||||
/**
|
||||
* DeleteAccessList hard deletes the specified access list resource.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessList(teleport.accesslist.v1.DeleteAccessListRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAccessList: grpc.handleUnaryCall<DeleteAccessListRequest, Empty>;
|
||||
/**
|
||||
* DeleteAllAccessLists hard deletes all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllAccessLists(teleport.accesslist.v1.DeleteAllAccessListsRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAllAccessLists: grpc.handleUnaryCall<DeleteAllAccessListsRequest, Empty>;
|
||||
/**
|
||||
* GetAccessListsToReview will return access lists that need to be reviewed by the current user.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessListsToReview(teleport.accesslist.v1.GetAccessListsToReviewRequest) returns (teleport.accesslist.v1.GetAccessListsToReviewResponse);
|
||||
*/
|
||||
getAccessListsToReview: grpc.handleUnaryCall<GetAccessListsToReviewRequest, GetAccessListsToReviewResponse>;
|
||||
/**
|
||||
* ListAccessListMembers returns a paginated list of all access list members.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAccessListMembers(teleport.accesslist.v1.ListAccessListMembersRequest) returns (teleport.accesslist.v1.ListAccessListMembersResponse);
|
||||
*/
|
||||
listAccessListMembers: grpc.handleUnaryCall<ListAccessListMembersRequest, ListAccessListMembersResponse>;
|
||||
/**
|
||||
* ListAllAccessListMembers returns a paginated list of all access list members for all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAllAccessListMembers(teleport.accesslist.v1.ListAllAccessListMembersRequest) returns (teleport.accesslist.v1.ListAllAccessListMembersResponse);
|
||||
*/
|
||||
listAllAccessListMembers: grpc.handleUnaryCall<ListAllAccessListMembersRequest, ListAllAccessListMembersResponse>;
|
||||
/**
|
||||
* GetAccessListMember returns the specified access list member resource.
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessListMember(teleport.accesslist.v1.GetAccessListMemberRequest) returns (teleport.accesslist.v1.Member);
|
||||
*/
|
||||
getAccessListMember: grpc.handleUnaryCall<GetAccessListMemberRequest, Member>;
|
||||
/**
|
||||
* UpsertAccessListMember creates or updates an access list member resource.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertAccessListMember(teleport.accesslist.v1.UpsertAccessListMemberRequest) returns (teleport.accesslist.v1.Member);
|
||||
*/
|
||||
upsertAccessListMember: grpc.handleUnaryCall<UpsertAccessListMemberRequest, Member>;
|
||||
/**
|
||||
* DeleteAccessListMember hard deletes the specified access list member resource.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessListMember(teleport.accesslist.v1.DeleteAccessListMemberRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAccessListMember: grpc.handleUnaryCall<DeleteAccessListMemberRequest, Empty>;
|
||||
/**
|
||||
* DeleteAllAccessListMembers hard deletes all access list members for an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllAccessListMembersForAccessList(teleport.accesslist.v1.DeleteAllAccessListMembersForAccessListRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAllAccessListMembersForAccessList: grpc.handleUnaryCall<DeleteAllAccessListMembersForAccessListRequest, Empty>;
|
||||
/**
|
||||
* DeleteAllAccessListMembers hard deletes all access list members for an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllAccessListMembers(teleport.accesslist.v1.DeleteAllAccessListMembersRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAllAccessListMembers: grpc.handleUnaryCall<DeleteAllAccessListMembersRequest, Empty>;
|
||||
/**
|
||||
* UpsertAccessListWithMembers creates or updates an access list with members.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertAccessListWithMembers(teleport.accesslist.v1.UpsertAccessListWithMembersRequest) returns (teleport.accesslist.v1.UpsertAccessListWithMembersResponse);
|
||||
*/
|
||||
upsertAccessListWithMembers: grpc.handleUnaryCall<UpsertAccessListWithMembersRequest, UpsertAccessListWithMembersResponse>;
|
||||
/**
|
||||
* ListAccessListReviews will list access list reviews for a particular access list.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAccessListReviews(teleport.accesslist.v1.ListAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAccessListReviewsResponse);
|
||||
*/
|
||||
listAccessListReviews: grpc.handleUnaryCall<ListAccessListReviewsRequest, ListAccessListReviewsResponse>;
|
||||
/**
|
||||
* ListAllAccessListReviews will list access list reviews for all access lists.
|
||||
*
|
||||
* @generated from protobuf rpc: ListAllAccessListReviews(teleport.accesslist.v1.ListAllAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAllAccessListReviewsResponse);
|
||||
*/
|
||||
listAllAccessListReviews: grpc.handleUnaryCall<ListAllAccessListReviewsRequest, ListAllAccessListReviewsResponse>;
|
||||
/**
|
||||
* CreateAccessListReview will create a new review for an access list. It will also modify the original access list
|
||||
* and its members depending on the details of the review.
|
||||
*
|
||||
* @generated from protobuf rpc: CreateAccessListReview(teleport.accesslist.v1.CreateAccessListReviewRequest) returns (teleport.accesslist.v1.CreateAccessListReviewResponse);
|
||||
*/
|
||||
createAccessListReview: grpc.handleUnaryCall<CreateAccessListReviewRequest, CreateAccessListReviewResponse>;
|
||||
/**
|
||||
* DeleteAccessListReview will delete an access list review from the backend.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessListReview(teleport.accesslist.v1.DeleteAccessListReviewRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
deleteAccessListReview: grpc.handleUnaryCall<DeleteAccessListReviewRequest, Empty>;
|
||||
/**
|
||||
* AccessRequestPromote promotes an access request to an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: AccessRequestPromote(teleport.accesslist.v1.AccessRequestPromoteRequest) returns (teleport.accesslist.v1.AccessRequestPromoteResponse);
|
||||
*/
|
||||
accessRequestPromote: grpc.handleUnaryCall<AccessRequestPromoteRequest, AccessRequestPromoteResponse>;
|
||||
/**
|
||||
* GetSuggestedAccessLists returns suggested access lists for an access request.
|
||||
*
|
||||
* @generated from protobuf rpc: GetSuggestedAccessLists(teleport.accesslist.v1.GetSuggestedAccessListsRequest) returns (teleport.accesslist.v1.GetSuggestedAccessListsResponse);
|
||||
*/
|
||||
getSuggestedAccessLists: grpc.handleUnaryCall<GetSuggestedAccessListsRequest, GetSuggestedAccessListsResponse>;
|
||||
}
|
||||
/**
|
||||
* @grpc/grpc-js definition for the protobuf service teleport.accesslist.v1.AccessListService.
|
||||
*
|
||||
* Usage: Implement the interface IAccessListService and add to a grpc server.
|
||||
*
|
||||
* ```typescript
|
||||
* const server = new grpc.Server();
|
||||
* const service: IAccessListService = ...
|
||||
* server.addService(accessListServiceDefinition, service);
|
||||
* ```
|
||||
*/
|
||||
export const accessListServiceDefinition: grpc.ServiceDefinition<IAccessListService> = {
|
||||
getAccessLists: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/GetAccessLists",
|
||||
originalName: "GetAccessLists",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetAccessListsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetAccessListsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetAccessListsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetAccessListsRequest.toBinary(value))
|
||||
},
|
||||
listAccessLists: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/ListAccessLists",
|
||||
originalName: "ListAccessLists",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListAccessListsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListAccessListsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListAccessListsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListAccessListsRequest.toBinary(value))
|
||||
},
|
||||
getAccessList: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/GetAccessList",
|
||||
originalName: "GetAccessList",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => AccessList.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetAccessListRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(AccessList.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetAccessListRequest.toBinary(value))
|
||||
},
|
||||
upsertAccessList: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/UpsertAccessList",
|
||||
originalName: "UpsertAccessList",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => AccessList.fromBinary(bytes),
|
||||
requestDeserialize: bytes => UpsertAccessListRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(AccessList.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(UpsertAccessListRequest.toBinary(value))
|
||||
},
|
||||
deleteAccessList: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/DeleteAccessList",
|
||||
originalName: "DeleteAccessList",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Empty.fromBinary(bytes),
|
||||
requestDeserialize: bytes => DeleteAccessListRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Empty.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(DeleteAccessListRequest.toBinary(value))
|
||||
},
|
||||
deleteAllAccessLists: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/DeleteAllAccessLists",
|
||||
originalName: "DeleteAllAccessLists",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Empty.fromBinary(bytes),
|
||||
requestDeserialize: bytes => DeleteAllAccessListsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Empty.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(DeleteAllAccessListsRequest.toBinary(value))
|
||||
},
|
||||
getAccessListsToReview: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/GetAccessListsToReview",
|
||||
originalName: "GetAccessListsToReview",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetAccessListsToReviewResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetAccessListsToReviewRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetAccessListsToReviewResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetAccessListsToReviewRequest.toBinary(value))
|
||||
},
|
||||
listAccessListMembers: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/ListAccessListMembers",
|
||||
originalName: "ListAccessListMembers",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListAccessListMembersResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListAccessListMembersRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListAccessListMembersResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListAccessListMembersRequest.toBinary(value))
|
||||
},
|
||||
listAllAccessListMembers: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/ListAllAccessListMembers",
|
||||
originalName: "ListAllAccessListMembers",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListAllAccessListMembersResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListAllAccessListMembersRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListAllAccessListMembersResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListAllAccessListMembersRequest.toBinary(value))
|
||||
},
|
||||
getAccessListMember: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/GetAccessListMember",
|
||||
originalName: "GetAccessListMember",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Member.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetAccessListMemberRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Member.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetAccessListMemberRequest.toBinary(value))
|
||||
},
|
||||
upsertAccessListMember: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/UpsertAccessListMember",
|
||||
originalName: "UpsertAccessListMember",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Member.fromBinary(bytes),
|
||||
requestDeserialize: bytes => UpsertAccessListMemberRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Member.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(UpsertAccessListMemberRequest.toBinary(value))
|
||||
},
|
||||
deleteAccessListMember: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/DeleteAccessListMember",
|
||||
originalName: "DeleteAccessListMember",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Empty.fromBinary(bytes),
|
||||
requestDeserialize: bytes => DeleteAccessListMemberRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Empty.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(DeleteAccessListMemberRequest.toBinary(value))
|
||||
},
|
||||
deleteAllAccessListMembersForAccessList: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/DeleteAllAccessListMembersForAccessList",
|
||||
originalName: "DeleteAllAccessListMembersForAccessList",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Empty.fromBinary(bytes),
|
||||
requestDeserialize: bytes => DeleteAllAccessListMembersForAccessListRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Empty.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(DeleteAllAccessListMembersForAccessListRequest.toBinary(value))
|
||||
},
|
||||
deleteAllAccessListMembers: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/DeleteAllAccessListMembers",
|
||||
originalName: "DeleteAllAccessListMembers",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Empty.fromBinary(bytes),
|
||||
requestDeserialize: bytes => DeleteAllAccessListMembersRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Empty.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(DeleteAllAccessListMembersRequest.toBinary(value))
|
||||
},
|
||||
upsertAccessListWithMembers: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/UpsertAccessListWithMembers",
|
||||
originalName: "UpsertAccessListWithMembers",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => UpsertAccessListWithMembersResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => UpsertAccessListWithMembersRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(UpsertAccessListWithMembersResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(UpsertAccessListWithMembersRequest.toBinary(value))
|
||||
},
|
||||
listAccessListReviews: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/ListAccessListReviews",
|
||||
originalName: "ListAccessListReviews",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListAccessListReviewsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListAccessListReviewsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListAccessListReviewsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListAccessListReviewsRequest.toBinary(value))
|
||||
},
|
||||
listAllAccessListReviews: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/ListAllAccessListReviews",
|
||||
originalName: "ListAllAccessListReviews",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListAllAccessListReviewsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListAllAccessListReviewsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListAllAccessListReviewsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListAllAccessListReviewsRequest.toBinary(value))
|
||||
},
|
||||
createAccessListReview: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/CreateAccessListReview",
|
||||
originalName: "CreateAccessListReview",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => CreateAccessListReviewResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => CreateAccessListReviewRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(CreateAccessListReviewResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(CreateAccessListReviewRequest.toBinary(value))
|
||||
},
|
||||
deleteAccessListReview: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/DeleteAccessListReview",
|
||||
originalName: "DeleteAccessListReview",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Empty.fromBinary(bytes),
|
||||
requestDeserialize: bytes => DeleteAccessListReviewRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Empty.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(DeleteAccessListReviewRequest.toBinary(value))
|
||||
},
|
||||
accessRequestPromote: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/AccessRequestPromote",
|
||||
originalName: "AccessRequestPromote",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => AccessRequestPromoteResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => AccessRequestPromoteRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(AccessRequestPromoteResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(AccessRequestPromoteRequest.toBinary(value))
|
||||
},
|
||||
getSuggestedAccessLists: {
|
||||
path: "/teleport.accesslist.v1.AccessListService/GetSuggestedAccessLists",
|
||||
originalName: "GetSuggestedAccessLists",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetSuggestedAccessListsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetSuggestedAccessListsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetSuggestedAccessListsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetSuggestedAccessListsRequest.toBinary(value))
|
||||
}
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
+197
@@ -0,0 +1,197 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/header/v1/metadata.proto" (package "teleport.header.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { Timestamp } from "../../../google/protobuf/timestamp_pb";
|
||||
/**
|
||||
* Metadata is resource metadata.
|
||||
*
|
||||
* @generated from protobuf message teleport.header.v1.Metadata
|
||||
*/
|
||||
export interface Metadata {
|
||||
/**
|
||||
* name is an object name.
|
||||
*
|
||||
* @generated from protobuf field: string name = 1;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* namespace is object namespace. The field should be called "namespace"
|
||||
* when it returns in Teleport 2.4.
|
||||
*
|
||||
* @generated from protobuf field: string namespace = 2;
|
||||
*/
|
||||
namespace: string;
|
||||
/**
|
||||
* description is object description.
|
||||
*
|
||||
* @generated from protobuf field: string description = 3;
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* labels is a set of labels.
|
||||
*
|
||||
* @generated from protobuf field: map<string, string> labels = 5;
|
||||
*/
|
||||
labels: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* expires is a global expiry time header can be set on any resource in the
|
||||
* system.
|
||||
*
|
||||
* @generated from protobuf field: google.protobuf.Timestamp expires = 6;
|
||||
*/
|
||||
expires?: Timestamp;
|
||||
/**
|
||||
* ID is a record ID
|
||||
* Deprecated: Use revision instead.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf field: int64 id = 7 [deprecated = true];
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* revision is an opaque identifier which tracks the versions of a resource
|
||||
* over time. Clients should ignore and not alter its value but must return
|
||||
* the revision in any updates of a resource.
|
||||
*
|
||||
* @generated from protobuf field: string revision = 8;
|
||||
*/
|
||||
revision: string;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Metadata$Type extends MessageType<Metadata> {
|
||||
constructor() {
|
||||
super("teleport.header.v1.Metadata", [
|
||||
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 5, name: "labels", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } },
|
||||
{ no: 6, name: "expires", kind: "message", T: () => Timestamp },
|
||||
{ no: 7, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
||||
{ no: 8, name: "revision", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Metadata>): Metadata {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.name = "";
|
||||
message.namespace = "";
|
||||
message.description = "";
|
||||
message.labels = {};
|
||||
message.id = 0;
|
||||
message.revision = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Metadata>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Metadata): Metadata {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string name */ 1:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* string namespace */ 2:
|
||||
message.namespace = reader.string();
|
||||
break;
|
||||
case /* string description */ 3:
|
||||
message.description = reader.string();
|
||||
break;
|
||||
case /* map<string, string> labels */ 5:
|
||||
this.binaryReadMap5(message.labels, reader, options);
|
||||
break;
|
||||
case /* google.protobuf.Timestamp expires */ 6:
|
||||
message.expires = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expires);
|
||||
break;
|
||||
case /* int64 id = 7 [deprecated = true];*/ 7:
|
||||
message.id = reader.int64().toNumber();
|
||||
break;
|
||||
case /* string revision */ 8:
|
||||
message.revision = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
private binaryReadMap5(map: Metadata["labels"], reader: IBinaryReader, options: BinaryReadOptions): void {
|
||||
let len = reader.uint32(), end = reader.pos + len, key: keyof Metadata["labels"] | undefined, val: Metadata["labels"][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 field teleport.header.v1.Metadata.labels");
|
||||
}
|
||||
}
|
||||
map[key ?? ""] = val ?? "";
|
||||
}
|
||||
internalBinaryWrite(message: Metadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string name = 1; */
|
||||
if (message.name !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.name);
|
||||
/* string namespace = 2; */
|
||||
if (message.namespace !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.namespace);
|
||||
/* string description = 3; */
|
||||
if (message.description !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.description);
|
||||
/* map<string, string> labels = 5; */
|
||||
for (let k of globalThis.Object.keys(message.labels))
|
||||
writer.tag(5, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.labels[k]).join();
|
||||
/* google.protobuf.Timestamp expires = 6; */
|
||||
if (message.expires)
|
||||
Timestamp.internalBinaryWrite(message.expires, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
||||
/* int64 id = 7 [deprecated = true]; */
|
||||
if (message.id !== 0)
|
||||
writer.tag(7, WireType.Varint).int64(message.id);
|
||||
/* string revision = 8; */
|
||||
if (message.revision !== "")
|
||||
writer.tag(8, WireType.LengthDelimited).string(message.revision);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.header.v1.Metadata
|
||||
*/
|
||||
export const Metadata = new Metadata$Type();
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/header/v1/resourceheader.proto" (package "teleport.header.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { Metadata } from "./metadata_pb";
|
||||
/**
|
||||
* ResourceHeader is a shared resource header.
|
||||
*
|
||||
* @generated from protobuf message teleport.header.v1.ResourceHeader
|
||||
*/
|
||||
export interface ResourceHeader {
|
||||
/**
|
||||
* kind is a resource kind.
|
||||
*
|
||||
* @generated from protobuf field: string kind = 1;
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
* sub_kind is an optional resource sub kind, used in some resources.
|
||||
*
|
||||
* @generated from protobuf field: string sub_kind = 2;
|
||||
*/
|
||||
subKind: string;
|
||||
/**
|
||||
* Version is the API version used to create the resource. It must be
|
||||
* specified. Based on this version, Teleport will apply different defaults on
|
||||
* resource creation or deletion. It must be an integer prefixed by "v".
|
||||
* For example: `v1`
|
||||
*
|
||||
* @generated from protobuf field: string version = 3;
|
||||
*/
|
||||
version: string;
|
||||
/**
|
||||
* metadata is resource metadata.
|
||||
*
|
||||
* @generated from protobuf field: teleport.header.v1.Metadata metadata = 4;
|
||||
*/
|
||||
metadata?: Metadata;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ResourceHeader$Type extends MessageType<ResourceHeader> {
|
||||
constructor() {
|
||||
super("teleport.header.v1.ResourceHeader", [
|
||||
{ no: 1, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "sub_kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "metadata", kind: "message", T: () => Metadata }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ResourceHeader>): ResourceHeader {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.kind = "";
|
||||
message.subKind = "";
|
||||
message.version = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ResourceHeader>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceHeader): ResourceHeader {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string kind */ 1:
|
||||
message.kind = reader.string();
|
||||
break;
|
||||
case /* string sub_kind */ 2:
|
||||
message.subKind = reader.string();
|
||||
break;
|
||||
case /* string version */ 3:
|
||||
message.version = reader.string();
|
||||
break;
|
||||
case /* teleport.header.v1.Metadata metadata */ 4:
|
||||
message.metadata = Metadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata);
|
||||
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: ResourceHeader, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string kind = 1; */
|
||||
if (message.kind !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.kind);
|
||||
/* string sub_kind = 2; */
|
||||
if (message.subKind !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.subKind);
|
||||
/* string version = 3; */
|
||||
if (message.version !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.version);
|
||||
/* teleport.header.v1.Metadata metadata = 4; */
|
||||
if (message.metadata)
|
||||
Metadata.internalBinaryWrite(message.metadata, writer.tag(4, 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 teleport.header.v1.ResourceHeader
|
||||
*/
|
||||
export const ResourceHeader = new ResourceHeader$Type();
|
||||
@@ -0,0 +1,609 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/access_request.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { Timestamp } from "../../../../google/protobuf/timestamp_pb";
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.AccessRequest
|
||||
*/
|
||||
export interface AccessRequest {
|
||||
/**
|
||||
* @generated from protobuf field: string id = 1;
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* the request state of Access Request. option of PENDING, APPROVED, DENIED, PROMOTED, NONE
|
||||
*
|
||||
* @generated from protobuf field: string state = 2;
|
||||
*/
|
||||
state: string;
|
||||
/**
|
||||
* @generated from protobuf field: string resolve_reason = 3;
|
||||
*/
|
||||
resolveReason: string;
|
||||
/**
|
||||
* @generated from protobuf field: string request_reason = 4;
|
||||
*/
|
||||
requestReason: string;
|
||||
/**
|
||||
* user is the user who submitted the Access Request
|
||||
*
|
||||
* @generated from protobuf field: string user = 5;
|
||||
*/
|
||||
user: string;
|
||||
/**
|
||||
* a list of roles requested in the AccessRequest
|
||||
*
|
||||
* @generated from protobuf field: repeated string roles = 6;
|
||||
*/
|
||||
roles: string[];
|
||||
/**
|
||||
* @generated from protobuf field: google.protobuf.Timestamp created = 7;
|
||||
*/
|
||||
created?: Timestamp;
|
||||
/**
|
||||
* @generated from protobuf field: google.protobuf.Timestamp expires = 8;
|
||||
*/
|
||||
expires?: Timestamp;
|
||||
/**
|
||||
* @generated from protobuf field: repeated teleport.lib.teleterm.v1.AccessRequestReview reviews = 9;
|
||||
*/
|
||||
reviews: AccessRequestReview[];
|
||||
/**
|
||||
* @generated from protobuf field: repeated string suggested_reviewers = 10;
|
||||
*/
|
||||
suggestedReviewers: string[];
|
||||
/**
|
||||
* thresholds specifies minimum amount of approvers or deniers. Defaults to 'default'
|
||||
*
|
||||
* @generated from protobuf field: repeated string threshold_names = 11;
|
||||
*/
|
||||
thresholdNames: string[];
|
||||
/**
|
||||
* TODO(avatus) remove the resource_ids field once the changes to rely on resources instead is merged
|
||||
* a list of resourceIDs requested in the AccessRequest
|
||||
*
|
||||
* @generated from protobuf field: repeated teleport.lib.teleterm.v1.ResourceID resource_ids = 12;
|
||||
*/
|
||||
resourceIds: ResourceID[];
|
||||
/**
|
||||
* @generated from protobuf field: repeated teleport.lib.teleterm.v1.Resource resources = 13;
|
||||
*/
|
||||
resources: Resource[];
|
||||
/**
|
||||
* promoted_access_list_title is the title of the access
|
||||
* list that this access request was promoted to.
|
||||
*
|
||||
* @generated from protobuf field: string promoted_access_list_title = 14;
|
||||
*/
|
||||
promotedAccessListTitle: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.AccessRequestReview
|
||||
*/
|
||||
export interface AccessRequestReview {
|
||||
/**
|
||||
* author is the creator of the AccessRequestReview.
|
||||
*
|
||||
* @generated from protobuf field: string author = 1;
|
||||
*/
|
||||
author: string;
|
||||
/**
|
||||
* list of roles approved
|
||||
*
|
||||
* @generated from protobuf field: repeated string roles = 2;
|
||||
*/
|
||||
roles: string[];
|
||||
/**
|
||||
* the state of the review, either APPROVED or DENIED
|
||||
*
|
||||
* @generated from protobuf field: string state = 3;
|
||||
*/
|
||||
state: string;
|
||||
/**
|
||||
* reason is why the request was approved or denied
|
||||
*
|
||||
* @generated from protobuf field: string reason = 4;
|
||||
*/
|
||||
reason: string;
|
||||
/**
|
||||
* @generated from protobuf field: google.protobuf.Timestamp created = 5;
|
||||
*/
|
||||
created?: Timestamp;
|
||||
/**
|
||||
* promoted_access_list_title is the title of the access
|
||||
* list that the access request was promoted to.
|
||||
*
|
||||
* @generated from protobuf field: string promoted_access_list_title = 6;
|
||||
*/
|
||||
promotedAccessListTitle: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.ResourceID
|
||||
*/
|
||||
export interface ResourceID {
|
||||
/**
|
||||
* @generated from protobuf field: string kind = 1;
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
* @generated from protobuf field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* @generated from protobuf field: string cluster_name = 3;
|
||||
*/
|
||||
clusterName: string;
|
||||
/**
|
||||
* @generated from protobuf field: string sub_resource_name = 4;
|
||||
*/
|
||||
subResourceName: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.ResourceDetails
|
||||
*/
|
||||
export interface ResourceDetails {
|
||||
/**
|
||||
* @generated from protobuf field: string hostname = 1;
|
||||
*/
|
||||
hostname: string;
|
||||
/**
|
||||
* @generated from protobuf field: string friendly_name = 2;
|
||||
*/
|
||||
friendlyName: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.Resource
|
||||
*/
|
||||
export interface Resource {
|
||||
/**
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceID id = 1;
|
||||
*/
|
||||
id?: ResourceID;
|
||||
/**
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceDetails details = 2;
|
||||
*/
|
||||
details?: ResourceDetails;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class AccessRequest$Type extends MessageType<AccessRequest> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.AccessRequest", [
|
||||
{ no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "resolve_reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "request_reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 5, name: "user", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 6, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 7, name: "created", kind: "message", T: () => Timestamp },
|
||||
{ no: 8, name: "expires", kind: "message", T: () => Timestamp },
|
||||
{ no: 9, name: "reviews", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AccessRequestReview },
|
||||
{ no: 10, name: "suggested_reviewers", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 11, name: "threshold_names", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 12, name: "resource_ids", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ResourceID },
|
||||
{ no: 13, name: "resources", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Resource },
|
||||
{ no: 14, name: "promoted_access_list_title", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<AccessRequest>): AccessRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.id = "";
|
||||
message.state = "";
|
||||
message.resolveReason = "";
|
||||
message.requestReason = "";
|
||||
message.user = "";
|
||||
message.roles = [];
|
||||
message.reviews = [];
|
||||
message.suggestedReviewers = [];
|
||||
message.thresholdNames = [];
|
||||
message.resourceIds = [];
|
||||
message.resources = [];
|
||||
message.promotedAccessListTitle = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<AccessRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessRequest): AccessRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string id */ 1:
|
||||
message.id = reader.string();
|
||||
break;
|
||||
case /* string state */ 2:
|
||||
message.state = reader.string();
|
||||
break;
|
||||
case /* string resolve_reason */ 3:
|
||||
message.resolveReason = reader.string();
|
||||
break;
|
||||
case /* string request_reason */ 4:
|
||||
message.requestReason = reader.string();
|
||||
break;
|
||||
case /* string user */ 5:
|
||||
message.user = reader.string();
|
||||
break;
|
||||
case /* repeated string roles */ 6:
|
||||
message.roles.push(reader.string());
|
||||
break;
|
||||
case /* google.protobuf.Timestamp created */ 7:
|
||||
message.created = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.created);
|
||||
break;
|
||||
case /* google.protobuf.Timestamp expires */ 8:
|
||||
message.expires = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expires);
|
||||
break;
|
||||
case /* repeated teleport.lib.teleterm.v1.AccessRequestReview reviews */ 9:
|
||||
message.reviews.push(AccessRequestReview.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated string suggested_reviewers */ 10:
|
||||
message.suggestedReviewers.push(reader.string());
|
||||
break;
|
||||
case /* repeated string threshold_names */ 11:
|
||||
message.thresholdNames.push(reader.string());
|
||||
break;
|
||||
case /* repeated teleport.lib.teleterm.v1.ResourceID resource_ids */ 12:
|
||||
message.resourceIds.push(ResourceID.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated teleport.lib.teleterm.v1.Resource resources */ 13:
|
||||
message.resources.push(Resource.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* string promoted_access_list_title */ 14:
|
||||
message.promotedAccessListTitle = 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: AccessRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string id = 1; */
|
||||
if (message.id !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.id);
|
||||
/* string state = 2; */
|
||||
if (message.state !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.state);
|
||||
/* string resolve_reason = 3; */
|
||||
if (message.resolveReason !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.resolveReason);
|
||||
/* string request_reason = 4; */
|
||||
if (message.requestReason !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.requestReason);
|
||||
/* string user = 5; */
|
||||
if (message.user !== "")
|
||||
writer.tag(5, WireType.LengthDelimited).string(message.user);
|
||||
/* repeated string roles = 6; */
|
||||
for (let i = 0; i < message.roles.length; i++)
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.roles[i]);
|
||||
/* google.protobuf.Timestamp created = 7; */
|
||||
if (message.created)
|
||||
Timestamp.internalBinaryWrite(message.created, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
||||
/* google.protobuf.Timestamp expires = 8; */
|
||||
if (message.expires)
|
||||
Timestamp.internalBinaryWrite(message.expires, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated teleport.lib.teleterm.v1.AccessRequestReview reviews = 9; */
|
||||
for (let i = 0; i < message.reviews.length; i++)
|
||||
AccessRequestReview.internalBinaryWrite(message.reviews[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated string suggested_reviewers = 10; */
|
||||
for (let i = 0; i < message.suggestedReviewers.length; i++)
|
||||
writer.tag(10, WireType.LengthDelimited).string(message.suggestedReviewers[i]);
|
||||
/* repeated string threshold_names = 11; */
|
||||
for (let i = 0; i < message.thresholdNames.length; i++)
|
||||
writer.tag(11, WireType.LengthDelimited).string(message.thresholdNames[i]);
|
||||
/* repeated teleport.lib.teleterm.v1.ResourceID resource_ids = 12; */
|
||||
for (let i = 0; i < message.resourceIds.length; i++)
|
||||
ResourceID.internalBinaryWrite(message.resourceIds[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated teleport.lib.teleterm.v1.Resource resources = 13; */
|
||||
for (let i = 0; i < message.resources.length; i++)
|
||||
Resource.internalBinaryWrite(message.resources[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string promoted_access_list_title = 14; */
|
||||
if (message.promotedAccessListTitle !== "")
|
||||
writer.tag(14, WireType.LengthDelimited).string(message.promotedAccessListTitle);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.AccessRequest
|
||||
*/
|
||||
export const AccessRequest = new AccessRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class AccessRequestReview$Type extends MessageType<AccessRequestReview> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.AccessRequestReview", [
|
||||
{ no: 1, name: "author", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 5, name: "created", kind: "message", T: () => Timestamp },
|
||||
{ no: 6, name: "promoted_access_list_title", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<AccessRequestReview>): AccessRequestReview {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.author = "";
|
||||
message.roles = [];
|
||||
message.state = "";
|
||||
message.reason = "";
|
||||
message.promotedAccessListTitle = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<AccessRequestReview>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessRequestReview): AccessRequestReview {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string author */ 1:
|
||||
message.author = reader.string();
|
||||
break;
|
||||
case /* repeated string roles */ 2:
|
||||
message.roles.push(reader.string());
|
||||
break;
|
||||
case /* string state */ 3:
|
||||
message.state = reader.string();
|
||||
break;
|
||||
case /* string reason */ 4:
|
||||
message.reason = reader.string();
|
||||
break;
|
||||
case /* google.protobuf.Timestamp created */ 5:
|
||||
message.created = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.created);
|
||||
break;
|
||||
case /* string promoted_access_list_title */ 6:
|
||||
message.promotedAccessListTitle = 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: AccessRequestReview, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string author = 1; */
|
||||
if (message.author !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.author);
|
||||
/* repeated string roles = 2; */
|
||||
for (let i = 0; i < message.roles.length; i++)
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.roles[i]);
|
||||
/* string state = 3; */
|
||||
if (message.state !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.state);
|
||||
/* string reason = 4; */
|
||||
if (message.reason !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.reason);
|
||||
/* google.protobuf.Timestamp created = 5; */
|
||||
if (message.created)
|
||||
Timestamp.internalBinaryWrite(message.created, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string promoted_access_list_title = 6; */
|
||||
if (message.promotedAccessListTitle !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.promotedAccessListTitle);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.AccessRequestReview
|
||||
*/
|
||||
export const AccessRequestReview = new AccessRequestReview$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ResourceID$Type extends MessageType<ResourceID> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.ResourceID", [
|
||||
{ no: 1, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "sub_resource_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ResourceID>): ResourceID {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.kind = "";
|
||||
message.name = "";
|
||||
message.clusterName = "";
|
||||
message.subResourceName = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ResourceID>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceID): ResourceID {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string kind */ 1:
|
||||
message.kind = reader.string();
|
||||
break;
|
||||
case /* string name */ 2:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* string cluster_name */ 3:
|
||||
message.clusterName = reader.string();
|
||||
break;
|
||||
case /* string sub_resource_name */ 4:
|
||||
message.subResourceName = 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: ResourceID, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string kind = 1; */
|
||||
if (message.kind !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.kind);
|
||||
/* string name = 2; */
|
||||
if (message.name !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
||||
/* string cluster_name = 3; */
|
||||
if (message.clusterName !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.clusterName);
|
||||
/* string sub_resource_name = 4; */
|
||||
if (message.subResourceName !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.subResourceName);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.ResourceID
|
||||
*/
|
||||
export const ResourceID = new ResourceID$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ResourceDetails$Type extends MessageType<ResourceDetails> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.ResourceDetails", [
|
||||
{ no: 1, name: "hostname", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "friendly_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ResourceDetails>): ResourceDetails {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.hostname = "";
|
||||
message.friendlyName = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ResourceDetails>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceDetails): ResourceDetails {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string hostname */ 1:
|
||||
message.hostname = reader.string();
|
||||
break;
|
||||
case /* string friendly_name */ 2:
|
||||
message.friendlyName = 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: ResourceDetails, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string hostname = 1; */
|
||||
if (message.hostname !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.hostname);
|
||||
/* string friendly_name = 2; */
|
||||
if (message.friendlyName !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.friendlyName);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.ResourceDetails
|
||||
*/
|
||||
export const ResourceDetails = new ResourceDetails$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Resource$Type extends MessageType<Resource> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.Resource", [
|
||||
{ no: 1, name: "id", kind: "message", T: () => ResourceID },
|
||||
{ no: 2, name: "details", kind: "message", T: () => ResourceDetails }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Resource>): Resource {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Resource>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Resource): Resource {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* teleport.lib.teleterm.v1.ResourceID id */ 1:
|
||||
message.id = ResourceID.internalBinaryRead(reader, reader.uint32(), options, message.id);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceDetails details */ 2:
|
||||
message.details = ResourceDetails.internalBinaryRead(reader, reader.uint32(), options, message.details);
|
||||
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: Resource, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* teleport.lib.teleterm.v1.ResourceID id = 1; */
|
||||
if (message.id)
|
||||
ResourceID.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceDetails details = 2; */
|
||||
if (message.details)
|
||||
ResourceDetails.internalBinaryWrite(message.details, 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 teleport.lib.teleterm.v1.Resource
|
||||
*/
|
||||
export const Resource = new Resource$Type();
|
||||
+205
@@ -0,0 +1,205 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/app.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2024 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { Label } from "./label_pb";
|
||||
/**
|
||||
* App describes an app resource.
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.App
|
||||
*/
|
||||
export interface App {
|
||||
/**
|
||||
* uri is the cluster resource URI.
|
||||
*
|
||||
* @generated from protobuf field: string uri = 1;
|
||||
*/
|
||||
uri: string;
|
||||
/**
|
||||
* name is the name of the app.
|
||||
*
|
||||
* @generated from protobuf field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* endpoint_uri is the app connection endpoint.
|
||||
*
|
||||
* @generated from protobuf field: string endpoint_uri = 3;
|
||||
*/
|
||||
endpointUri: string;
|
||||
/**
|
||||
* desc is the app description.
|
||||
*
|
||||
* @generated from protobuf field: string desc = 4;
|
||||
*/
|
||||
desc: string;
|
||||
/**
|
||||
* aws_console is true if this app is AWS management console.
|
||||
*
|
||||
* @generated from protobuf field: bool aws_console = 5;
|
||||
*/
|
||||
awsConsole: boolean;
|
||||
/**
|
||||
* public_addr is the public address the application is accessible at.
|
||||
*
|
||||
* @generated from protobuf field: string public_addr = 6;
|
||||
*/
|
||||
publicAddr: string;
|
||||
/**
|
||||
* friendly_name is a user readable name of the app.
|
||||
*
|
||||
* @generated from protobuf field: string friendly_name = 7;
|
||||
*/
|
||||
friendlyName: string;
|
||||
/**
|
||||
* saml_app is true if the application is a SAML Application (Service Provider).
|
||||
*
|
||||
* @generated from protobuf field: bool saml_app = 8;
|
||||
*/
|
||||
samlApp: boolean;
|
||||
/**
|
||||
* labels is a list of labels for the app.
|
||||
*
|
||||
* @generated from protobuf field: repeated teleport.lib.teleterm.v1.Label labels = 9;
|
||||
*/
|
||||
labels: Label[];
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class App$Type extends MessageType<App> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.App", [
|
||||
{ no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "endpoint_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "desc", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 5, name: "aws_console", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 6, name: "public_addr", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 7, name: "friendly_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 8, name: "saml_app", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 9, name: "labels", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Label }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<App>): App {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.uri = "";
|
||||
message.name = "";
|
||||
message.endpointUri = "";
|
||||
message.desc = "";
|
||||
message.awsConsole = false;
|
||||
message.publicAddr = "";
|
||||
message.friendlyName = "";
|
||||
message.samlApp = false;
|
||||
message.labels = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<App>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: App): App {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string uri */ 1:
|
||||
message.uri = reader.string();
|
||||
break;
|
||||
case /* string name */ 2:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* string endpoint_uri */ 3:
|
||||
message.endpointUri = reader.string();
|
||||
break;
|
||||
case /* string desc */ 4:
|
||||
message.desc = reader.string();
|
||||
break;
|
||||
case /* bool aws_console */ 5:
|
||||
message.awsConsole = reader.bool();
|
||||
break;
|
||||
case /* string public_addr */ 6:
|
||||
message.publicAddr = reader.string();
|
||||
break;
|
||||
case /* string friendly_name */ 7:
|
||||
message.friendlyName = reader.string();
|
||||
break;
|
||||
case /* bool saml_app */ 8:
|
||||
message.samlApp = reader.bool();
|
||||
break;
|
||||
case /* repeated teleport.lib.teleterm.v1.Label labels */ 9:
|
||||
message.labels.push(Label.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: App, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string uri = 1; */
|
||||
if (message.uri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.uri);
|
||||
/* string name = 2; */
|
||||
if (message.name !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
||||
/* string endpoint_uri = 3; */
|
||||
if (message.endpointUri !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.endpointUri);
|
||||
/* string desc = 4; */
|
||||
if (message.desc !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.desc);
|
||||
/* bool aws_console = 5; */
|
||||
if (message.awsConsole !== false)
|
||||
writer.tag(5, WireType.Varint).bool(message.awsConsole);
|
||||
/* string public_addr = 6; */
|
||||
if (message.publicAddr !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.publicAddr);
|
||||
/* string friendly_name = 7; */
|
||||
if (message.friendlyName !== "")
|
||||
writer.tag(7, WireType.LengthDelimited).string(message.friendlyName);
|
||||
/* bool saml_app = 8; */
|
||||
if (message.samlApp !== false)
|
||||
writer.tag(8, WireType.Varint).bool(message.samlApp);
|
||||
/* repeated teleport.lib.teleterm.v1.Label labels = 9; */
|
||||
for (let i = 0; i < message.labels.length; i++)
|
||||
Label.internalBinaryWrite(message.labels[i], writer.tag(9, 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 teleport.lib.teleterm.v1.App
|
||||
*/
|
||||
export const App = new App$Type();
|
||||
@@ -0,0 +1,281 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/auth_settings.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* AuthSettings contains the form of authentication the auth server supports.
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.AuthSettings
|
||||
*/
|
||||
export interface AuthSettings {
|
||||
/**
|
||||
* local_auth_enabled is a flag that enables local authentication
|
||||
*
|
||||
* @generated from protobuf field: bool local_auth_enabled = 1;
|
||||
*/
|
||||
localAuthEnabled: boolean;
|
||||
/**
|
||||
* second_factor is the type of second factor to use in authentication.
|
||||
*
|
||||
* @generated from protobuf field: string second_factor = 2;
|
||||
*/
|
||||
secondFactor: string;
|
||||
/**
|
||||
* preferred_mfa is the prefered mfa for local logins
|
||||
*
|
||||
* @generated from protobuf field: string preferred_mfa = 3;
|
||||
*/
|
||||
preferredMfa: string;
|
||||
/**
|
||||
* auth_providers contains a list of auth providers
|
||||
*
|
||||
* @generated from protobuf field: repeated teleport.lib.teleterm.v1.AuthProvider auth_providers = 4;
|
||||
*/
|
||||
authProviders: AuthProvider[];
|
||||
/**
|
||||
* has_message_of_the_day is a flag indicating that the cluster has MOTD
|
||||
* banner text that must be retrieved, displayed and acknowledged by
|
||||
* the user.
|
||||
*
|
||||
* @generated from protobuf field: bool has_message_of_the_day = 5;
|
||||
*/
|
||||
hasMessageOfTheDay: boolean;
|
||||
/**
|
||||
* auth_type is the authentication type e.g. "local", "github", "saml", "oidc"
|
||||
*
|
||||
* @generated from protobuf field: string auth_type = 6;
|
||||
*/
|
||||
authType: string;
|
||||
/**
|
||||
* allow_passwordless is true if passwordless logins are allowed.
|
||||
*
|
||||
* @generated from protobuf field: bool allow_passwordless = 7;
|
||||
*/
|
||||
allowPasswordless: boolean;
|
||||
/**
|
||||
* local_connector_name is the name of the local connector.
|
||||
*
|
||||
* @generated from protobuf field: string local_connector_name = 8;
|
||||
*/
|
||||
localConnectorName: string;
|
||||
}
|
||||
/**
|
||||
* AuthProvider describes a way of authentication that is supported by the server. Auth provider is
|
||||
* referred to as "auth connector" on the backend.
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.AuthProvider
|
||||
*/
|
||||
export interface AuthProvider {
|
||||
/**
|
||||
* Type is the auth provider type (github|oidc|etc)
|
||||
*
|
||||
* @generated from protobuf field: string type = 1;
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* Name is the internal name of the connector.
|
||||
*
|
||||
* @generated from protobuf field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Display is the display name for the connector.
|
||||
*
|
||||
* @generated from protobuf field: string display_name = 3;
|
||||
*/
|
||||
displayName: string;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class AuthSettings$Type extends MessageType<AuthSettings> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.AuthSettings", [
|
||||
{ no: 1, name: "local_auth_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "second_factor", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "preferred_mfa", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "auth_providers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AuthProvider },
|
||||
{ no: 5, name: "has_message_of_the_day", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 6, name: "auth_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 7, name: "allow_passwordless", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 8, name: "local_connector_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<AuthSettings>): AuthSettings {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.localAuthEnabled = false;
|
||||
message.secondFactor = "";
|
||||
message.preferredMfa = "";
|
||||
message.authProviders = [];
|
||||
message.hasMessageOfTheDay = false;
|
||||
message.authType = "";
|
||||
message.allowPasswordless = false;
|
||||
message.localConnectorName = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<AuthSettings>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthSettings): AuthSettings {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* bool local_auth_enabled */ 1:
|
||||
message.localAuthEnabled = reader.bool();
|
||||
break;
|
||||
case /* string second_factor */ 2:
|
||||
message.secondFactor = reader.string();
|
||||
break;
|
||||
case /* string preferred_mfa */ 3:
|
||||
message.preferredMfa = reader.string();
|
||||
break;
|
||||
case /* repeated teleport.lib.teleterm.v1.AuthProvider auth_providers */ 4:
|
||||
message.authProviders.push(AuthProvider.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* bool has_message_of_the_day */ 5:
|
||||
message.hasMessageOfTheDay = reader.bool();
|
||||
break;
|
||||
case /* string auth_type */ 6:
|
||||
message.authType = reader.string();
|
||||
break;
|
||||
case /* bool allow_passwordless */ 7:
|
||||
message.allowPasswordless = reader.bool();
|
||||
break;
|
||||
case /* string local_connector_name */ 8:
|
||||
message.localConnectorName = 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: AuthSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* bool local_auth_enabled = 1; */
|
||||
if (message.localAuthEnabled !== false)
|
||||
writer.tag(1, WireType.Varint).bool(message.localAuthEnabled);
|
||||
/* string second_factor = 2; */
|
||||
if (message.secondFactor !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.secondFactor);
|
||||
/* string preferred_mfa = 3; */
|
||||
if (message.preferredMfa !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.preferredMfa);
|
||||
/* repeated teleport.lib.teleterm.v1.AuthProvider auth_providers = 4; */
|
||||
for (let i = 0; i < message.authProviders.length; i++)
|
||||
AuthProvider.internalBinaryWrite(message.authProviders[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||
/* bool has_message_of_the_day = 5; */
|
||||
if (message.hasMessageOfTheDay !== false)
|
||||
writer.tag(5, WireType.Varint).bool(message.hasMessageOfTheDay);
|
||||
/* string auth_type = 6; */
|
||||
if (message.authType !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.authType);
|
||||
/* bool allow_passwordless = 7; */
|
||||
if (message.allowPasswordless !== false)
|
||||
writer.tag(7, WireType.Varint).bool(message.allowPasswordless);
|
||||
/* string local_connector_name = 8; */
|
||||
if (message.localConnectorName !== "")
|
||||
writer.tag(8, WireType.LengthDelimited).string(message.localConnectorName);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.AuthSettings
|
||||
*/
|
||||
export const AuthSettings = new AuthSettings$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class AuthProvider$Type extends MessageType<AuthProvider> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.AuthProvider", [
|
||||
{ no: 1, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<AuthProvider>): AuthProvider {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.type = "";
|
||||
message.name = "";
|
||||
message.displayName = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<AuthProvider>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthProvider): AuthProvider {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string type */ 1:
|
||||
message.type = reader.string();
|
||||
break;
|
||||
case /* string name */ 2:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* string display_name */ 3:
|
||||
message.displayName = 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: AuthProvider, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string type = 1; */
|
||||
if (message.type !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.type);
|
||||
/* string name = 2; */
|
||||
if (message.name !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
||||
/* string display_name = 3; */
|
||||
if (message.displayName !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.displayName);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.AuthProvider
|
||||
*/
|
||||
export const AuthProvider = new AuthProvider$Type();
|
||||
+803
@@ -0,0 +1,803 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/cluster.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* Cluster describes cluster fields
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.Cluster
|
||||
*/
|
||||
export interface Cluster {
|
||||
/**
|
||||
* uri is the cluster resource URI
|
||||
*
|
||||
* @generated from protobuf field: string uri = 1;
|
||||
*/
|
||||
uri: string;
|
||||
/**
|
||||
* name is used throughout the Teleport Connect codebase as the cluster name.
|
||||
*
|
||||
* @generated from protobuf field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* proxy address (only for root clusters)
|
||||
*
|
||||
* @generated from protobuf field: string proxy_host = 3;
|
||||
*/
|
||||
proxyHost: string;
|
||||
/**
|
||||
* connected indicates if connection to the cluster can be established, that is if we have a
|
||||
* cert for the cluster that hasn't expired
|
||||
*
|
||||
* @generated from protobuf field: bool connected = 4;
|
||||
*/
|
||||
connected: boolean;
|
||||
/**
|
||||
* leaf indicates if this is a leaf cluster
|
||||
*
|
||||
* @generated from protobuf field: bool leaf = 5;
|
||||
*/
|
||||
leaf: boolean;
|
||||
/**
|
||||
* User is the cluster access control list of the logged-in user
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.LoggedInUser logged_in_user = 7;
|
||||
*/
|
||||
loggedInUser?: LoggedInUser;
|
||||
/**
|
||||
* features describes the auth servers features.
|
||||
* Only present when detailed information is queried from the auth server.
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.Features features = 8;
|
||||
*/
|
||||
features?: Features;
|
||||
/**
|
||||
* auth_cluster_id is the unique cluster ID that is set once
|
||||
* during the first auth server startup.
|
||||
* Only present when detailed information is queried from the auth server.
|
||||
*
|
||||
* @generated from protobuf field: string auth_cluster_id = 9;
|
||||
*/
|
||||
authClusterId: string;
|
||||
/**
|
||||
* ProxyVersion is the cluster proxy's service version.
|
||||
* Only present when detailed information is queried from the proxy server.
|
||||
*
|
||||
* @generated from protobuf field: string proxy_version = 10;
|
||||
*/
|
||||
proxyVersion: string;
|
||||
}
|
||||
/**
|
||||
* LoggedInUser describes a logged-in user
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.LoggedInUser
|
||||
*/
|
||||
export interface LoggedInUser {
|
||||
/**
|
||||
* name is the user name
|
||||
*
|
||||
* @generated from protobuf field: string name = 1;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* roles is the user roles
|
||||
*
|
||||
* @generated from protobuf field: repeated string roles = 2;
|
||||
*/
|
||||
roles: string[];
|
||||
/**
|
||||
* ssh_logins is the user ssh logins
|
||||
*
|
||||
* @generated from protobuf field: repeated string ssh_logins = 3;
|
||||
*/
|
||||
sshLogins: string[];
|
||||
/**
|
||||
* acl is the user acl
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ACL acl = 4;
|
||||
*/
|
||||
acl?: ACL;
|
||||
/**
|
||||
* active_requests is an array of request-id strings of active requests
|
||||
*
|
||||
* @generated from protobuf field: repeated string active_requests = 5;
|
||||
*/
|
||||
activeRequests: string[];
|
||||
/**
|
||||
* suggested_reviewers for the given user.
|
||||
* Only present when detailed information is queried from the auth server.
|
||||
*
|
||||
* @generated from protobuf field: repeated string suggested_reviewers = 6;
|
||||
*/
|
||||
suggestedReviewers: string[];
|
||||
/**
|
||||
* requestable_roles for the given user.
|
||||
* Only present when detailed information is queried from the auth server.
|
||||
*
|
||||
* @generated from protobuf field: repeated string requestable_roles = 7;
|
||||
*/
|
||||
requestableRoles: string[];
|
||||
/**
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.LoggedInUser.UserType user_type = 8;
|
||||
*/
|
||||
userType: LoggedInUser_UserType;
|
||||
}
|
||||
/**
|
||||
* UserType indicates whether the user was created through an SSO provider or in Teleport itself.
|
||||
* Only present when detailed information is queried from the auth server.
|
||||
*
|
||||
* @generated from protobuf enum teleport.lib.teleterm.v1.LoggedInUser.UserType
|
||||
*/
|
||||
export enum LoggedInUser_UserType {
|
||||
/**
|
||||
* @generated from protobuf enum value: USER_TYPE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* @generated from protobuf enum value: USER_TYPE_LOCAL = 1;
|
||||
*/
|
||||
LOCAL = 1,
|
||||
/**
|
||||
* @generated from protobuf enum value: USER_TYPE_SSO = 2;
|
||||
*/
|
||||
SSO = 2
|
||||
}
|
||||
/**
|
||||
* ACL is the access control list of the user
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.ACL
|
||||
*/
|
||||
export interface ACL {
|
||||
/**
|
||||
* auth_connectors defines access to auth.connectors
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess auth_connectors = 2;
|
||||
*/
|
||||
authConnectors?: ResourceAccess;
|
||||
/**
|
||||
* Roles defines access to roles
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess roles = 3;
|
||||
*/
|
||||
roles?: ResourceAccess;
|
||||
/**
|
||||
* Users defines access to users.
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess users = 4;
|
||||
*/
|
||||
users?: ResourceAccess;
|
||||
/**
|
||||
* trusted_clusters defines access to trusted clusters
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess trusted_clusters = 5;
|
||||
*/
|
||||
trustedClusters?: ResourceAccess;
|
||||
/**
|
||||
* Events defines access to audit logs
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess events = 6;
|
||||
*/
|
||||
events?: ResourceAccess;
|
||||
/**
|
||||
* Tokens defines access to tokens.
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess tokens = 7;
|
||||
*/
|
||||
tokens?: ResourceAccess;
|
||||
/**
|
||||
* Servers defines access to servers.
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess servers = 8;
|
||||
*/
|
||||
servers?: ResourceAccess;
|
||||
/**
|
||||
* apps defines access to application servers
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess apps = 9;
|
||||
*/
|
||||
apps?: ResourceAccess;
|
||||
/**
|
||||
* dbs defines access to database servers.
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess dbs = 10;
|
||||
*/
|
||||
dbs?: ResourceAccess;
|
||||
/**
|
||||
* kubeservers defines access to kubernetes servers.
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess kubeservers = 11;
|
||||
*/
|
||||
kubeservers?: ResourceAccess;
|
||||
/**
|
||||
* access_requests defines access to access requests
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess access_requests = 12;
|
||||
*/
|
||||
accessRequests?: ResourceAccess;
|
||||
/**
|
||||
* recorded_sessions defines access to recorded sessions.
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess recorded_sessions = 13;
|
||||
*/
|
||||
recordedSessions?: ResourceAccess;
|
||||
/**
|
||||
* active_sessions defines access to active sessions.
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess active_sessions = 14;
|
||||
*/
|
||||
activeSessions?: ResourceAccess;
|
||||
}
|
||||
/**
|
||||
* ResourceAccess describes access verbs
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.ResourceAccess
|
||||
*/
|
||||
export interface ResourceAccess {
|
||||
/**
|
||||
* list determines "list" access
|
||||
*
|
||||
* @generated from protobuf field: bool list = 1;
|
||||
*/
|
||||
list: boolean;
|
||||
/**
|
||||
* read determines "read" access
|
||||
*
|
||||
* @generated from protobuf field: bool read = 2;
|
||||
*/
|
||||
read: boolean;
|
||||
/**
|
||||
* edit determines "edit" access
|
||||
*
|
||||
* @generated from protobuf field: bool edit = 3;
|
||||
*/
|
||||
edit: boolean;
|
||||
/**
|
||||
* create determines "create" access
|
||||
*
|
||||
* @generated from protobuf field: bool create = 4;
|
||||
*/
|
||||
create: boolean;
|
||||
/**
|
||||
* delete determines "delete" access
|
||||
*
|
||||
* @generated from protobuf field: bool delete = 5;
|
||||
*/
|
||||
delete: boolean;
|
||||
/**
|
||||
* use determines "use" access
|
||||
*
|
||||
* @generated from protobuf field: bool use = 6;
|
||||
*/
|
||||
use: boolean;
|
||||
}
|
||||
/**
|
||||
* Features describes the auth servers features
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.Features
|
||||
*/
|
||||
export interface Features {
|
||||
/**
|
||||
* advanced_access_workflows enables search-based access requests
|
||||
*
|
||||
* @generated from protobuf field: bool advanced_access_workflows = 1;
|
||||
*/
|
||||
advancedAccessWorkflows: boolean;
|
||||
/**
|
||||
* is_usage_based_billing determines if the cloud user subscription is usage-based (pay-as-you-go).
|
||||
*
|
||||
* @generated from protobuf field: bool is_usage_based_billing = 2;
|
||||
*/
|
||||
isUsageBasedBilling: boolean;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Cluster$Type extends MessageType<Cluster> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.Cluster", [
|
||||
{ no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "proxy_host", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "connected", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 5, name: "leaf", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 7, name: "logged_in_user", kind: "message", T: () => LoggedInUser },
|
||||
{ no: 8, name: "features", kind: "message", T: () => Features },
|
||||
{ no: 9, name: "auth_cluster_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 10, name: "proxy_version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Cluster>): Cluster {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.uri = "";
|
||||
message.name = "";
|
||||
message.proxyHost = "";
|
||||
message.connected = false;
|
||||
message.leaf = false;
|
||||
message.authClusterId = "";
|
||||
message.proxyVersion = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Cluster>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Cluster): Cluster {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string uri */ 1:
|
||||
message.uri = reader.string();
|
||||
break;
|
||||
case /* string name */ 2:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* string proxy_host */ 3:
|
||||
message.proxyHost = reader.string();
|
||||
break;
|
||||
case /* bool connected */ 4:
|
||||
message.connected = reader.bool();
|
||||
break;
|
||||
case /* bool leaf */ 5:
|
||||
message.leaf = reader.bool();
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.LoggedInUser logged_in_user */ 7:
|
||||
message.loggedInUser = LoggedInUser.internalBinaryRead(reader, reader.uint32(), options, message.loggedInUser);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.Features features */ 8:
|
||||
message.features = Features.internalBinaryRead(reader, reader.uint32(), options, message.features);
|
||||
break;
|
||||
case /* string auth_cluster_id */ 9:
|
||||
message.authClusterId = reader.string();
|
||||
break;
|
||||
case /* string proxy_version */ 10:
|
||||
message.proxyVersion = 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: Cluster, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string uri = 1; */
|
||||
if (message.uri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.uri);
|
||||
/* string name = 2; */
|
||||
if (message.name !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
||||
/* string proxy_host = 3; */
|
||||
if (message.proxyHost !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.proxyHost);
|
||||
/* bool connected = 4; */
|
||||
if (message.connected !== false)
|
||||
writer.tag(4, WireType.Varint).bool(message.connected);
|
||||
/* bool leaf = 5; */
|
||||
if (message.leaf !== false)
|
||||
writer.tag(5, WireType.Varint).bool(message.leaf);
|
||||
/* teleport.lib.teleterm.v1.LoggedInUser logged_in_user = 7; */
|
||||
if (message.loggedInUser)
|
||||
LoggedInUser.internalBinaryWrite(message.loggedInUser, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.Features features = 8; */
|
||||
if (message.features)
|
||||
Features.internalBinaryWrite(message.features, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string auth_cluster_id = 9; */
|
||||
if (message.authClusterId !== "")
|
||||
writer.tag(9, WireType.LengthDelimited).string(message.authClusterId);
|
||||
/* string proxy_version = 10; */
|
||||
if (message.proxyVersion !== "")
|
||||
writer.tag(10, WireType.LengthDelimited).string(message.proxyVersion);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.Cluster
|
||||
*/
|
||||
export const Cluster = new Cluster$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class LoggedInUser$Type extends MessageType<LoggedInUser> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.LoggedInUser", [
|
||||
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "ssh_logins", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "acl", kind: "message", T: () => ACL },
|
||||
{ no: 5, name: "active_requests", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 6, name: "suggested_reviewers", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 7, name: "requestable_roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 8, name: "user_type", kind: "enum", T: () => ["teleport.lib.teleterm.v1.LoggedInUser.UserType", LoggedInUser_UserType, "USER_TYPE_"] }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<LoggedInUser>): LoggedInUser {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.name = "";
|
||||
message.roles = [];
|
||||
message.sshLogins = [];
|
||||
message.activeRequests = [];
|
||||
message.suggestedReviewers = [];
|
||||
message.requestableRoles = [];
|
||||
message.userType = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<LoggedInUser>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LoggedInUser): LoggedInUser {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string name */ 1:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* repeated string roles */ 2:
|
||||
message.roles.push(reader.string());
|
||||
break;
|
||||
case /* repeated string ssh_logins */ 3:
|
||||
message.sshLogins.push(reader.string());
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ACL acl */ 4:
|
||||
message.acl = ACL.internalBinaryRead(reader, reader.uint32(), options, message.acl);
|
||||
break;
|
||||
case /* repeated string active_requests */ 5:
|
||||
message.activeRequests.push(reader.string());
|
||||
break;
|
||||
case /* repeated string suggested_reviewers */ 6:
|
||||
message.suggestedReviewers.push(reader.string());
|
||||
break;
|
||||
case /* repeated string requestable_roles */ 7:
|
||||
message.requestableRoles.push(reader.string());
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.LoggedInUser.UserType user_type */ 8:
|
||||
message.userType = reader.int32();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: LoggedInUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string name = 1; */
|
||||
if (message.name !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.name);
|
||||
/* repeated string roles = 2; */
|
||||
for (let i = 0; i < message.roles.length; i++)
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.roles[i]);
|
||||
/* repeated string ssh_logins = 3; */
|
||||
for (let i = 0; i < message.sshLogins.length; i++)
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.sshLogins[i]);
|
||||
/* teleport.lib.teleterm.v1.ACL acl = 4; */
|
||||
if (message.acl)
|
||||
ACL.internalBinaryWrite(message.acl, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated string active_requests = 5; */
|
||||
for (let i = 0; i < message.activeRequests.length; i++)
|
||||
writer.tag(5, WireType.LengthDelimited).string(message.activeRequests[i]);
|
||||
/* repeated string suggested_reviewers = 6; */
|
||||
for (let i = 0; i < message.suggestedReviewers.length; i++)
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.suggestedReviewers[i]);
|
||||
/* repeated string requestable_roles = 7; */
|
||||
for (let i = 0; i < message.requestableRoles.length; i++)
|
||||
writer.tag(7, WireType.LengthDelimited).string(message.requestableRoles[i]);
|
||||
/* teleport.lib.teleterm.v1.LoggedInUser.UserType user_type = 8; */
|
||||
if (message.userType !== 0)
|
||||
writer.tag(8, WireType.Varint).int32(message.userType);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.LoggedInUser
|
||||
*/
|
||||
export const LoggedInUser = new LoggedInUser$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ACL$Type extends MessageType<ACL> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.ACL", [
|
||||
{ no: 2, name: "auth_connectors", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 3, name: "roles", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 4, name: "users", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 5, name: "trusted_clusters", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 6, name: "events", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 7, name: "tokens", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 8, name: "servers", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 9, name: "apps", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 10, name: "dbs", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 11, name: "kubeservers", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 12, name: "access_requests", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 13, name: "recorded_sessions", kind: "message", T: () => ResourceAccess },
|
||||
{ no: 14, name: "active_sessions", kind: "message", T: () => ResourceAccess }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ACL>): ACL {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ACL>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ACL): ACL {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess auth_connectors */ 2:
|
||||
message.authConnectors = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.authConnectors);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess roles */ 3:
|
||||
message.roles = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.roles);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess users */ 4:
|
||||
message.users = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.users);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess trusted_clusters */ 5:
|
||||
message.trustedClusters = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.trustedClusters);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess events */ 6:
|
||||
message.events = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.events);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess tokens */ 7:
|
||||
message.tokens = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.tokens);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess servers */ 8:
|
||||
message.servers = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.servers);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess apps */ 9:
|
||||
message.apps = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.apps);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess dbs */ 10:
|
||||
message.dbs = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.dbs);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess kubeservers */ 11:
|
||||
message.kubeservers = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.kubeservers);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess access_requests */ 12:
|
||||
message.accessRequests = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.accessRequests);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess recorded_sessions */ 13:
|
||||
message.recordedSessions = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.recordedSessions);
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.ResourceAccess active_sessions */ 14:
|
||||
message.activeSessions = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.activeSessions);
|
||||
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: ACL, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess auth_connectors = 2; */
|
||||
if (message.authConnectors)
|
||||
ResourceAccess.internalBinaryWrite(message.authConnectors, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess roles = 3; */
|
||||
if (message.roles)
|
||||
ResourceAccess.internalBinaryWrite(message.roles, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess users = 4; */
|
||||
if (message.users)
|
||||
ResourceAccess.internalBinaryWrite(message.users, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess trusted_clusters = 5; */
|
||||
if (message.trustedClusters)
|
||||
ResourceAccess.internalBinaryWrite(message.trustedClusters, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess events = 6; */
|
||||
if (message.events)
|
||||
ResourceAccess.internalBinaryWrite(message.events, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess tokens = 7; */
|
||||
if (message.tokens)
|
||||
ResourceAccess.internalBinaryWrite(message.tokens, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess servers = 8; */
|
||||
if (message.servers)
|
||||
ResourceAccess.internalBinaryWrite(message.servers, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess apps = 9; */
|
||||
if (message.apps)
|
||||
ResourceAccess.internalBinaryWrite(message.apps, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess dbs = 10; */
|
||||
if (message.dbs)
|
||||
ResourceAccess.internalBinaryWrite(message.dbs, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess kubeservers = 11; */
|
||||
if (message.kubeservers)
|
||||
ResourceAccess.internalBinaryWrite(message.kubeservers, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess access_requests = 12; */
|
||||
if (message.accessRequests)
|
||||
ResourceAccess.internalBinaryWrite(message.accessRequests, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess recorded_sessions = 13; */
|
||||
if (message.recordedSessions)
|
||||
ResourceAccess.internalBinaryWrite(message.recordedSessions, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.lib.teleterm.v1.ResourceAccess active_sessions = 14; */
|
||||
if (message.activeSessions)
|
||||
ResourceAccess.internalBinaryWrite(message.activeSessions, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.ACL
|
||||
*/
|
||||
export const ACL = new ACL$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ResourceAccess$Type extends MessageType<ResourceAccess> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.ResourceAccess", [
|
||||
{ no: 1, name: "list", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "read", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 3, name: "edit", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 4, name: "create", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 5, name: "delete", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 6, name: "use", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ResourceAccess>): ResourceAccess {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.list = false;
|
||||
message.read = false;
|
||||
message.edit = false;
|
||||
message.create = false;
|
||||
message.delete = false;
|
||||
message.use = false;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ResourceAccess>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceAccess): ResourceAccess {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* bool list */ 1:
|
||||
message.list = reader.bool();
|
||||
break;
|
||||
case /* bool read */ 2:
|
||||
message.read = reader.bool();
|
||||
break;
|
||||
case /* bool edit */ 3:
|
||||
message.edit = reader.bool();
|
||||
break;
|
||||
case /* bool create */ 4:
|
||||
message.create = reader.bool();
|
||||
break;
|
||||
case /* bool delete */ 5:
|
||||
message.delete = reader.bool();
|
||||
break;
|
||||
case /* bool use */ 6:
|
||||
message.use = reader.bool();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: ResourceAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* bool list = 1; */
|
||||
if (message.list !== false)
|
||||
writer.tag(1, WireType.Varint).bool(message.list);
|
||||
/* bool read = 2; */
|
||||
if (message.read !== false)
|
||||
writer.tag(2, WireType.Varint).bool(message.read);
|
||||
/* bool edit = 3; */
|
||||
if (message.edit !== false)
|
||||
writer.tag(3, WireType.Varint).bool(message.edit);
|
||||
/* bool create = 4; */
|
||||
if (message.create !== false)
|
||||
writer.tag(4, WireType.Varint).bool(message.create);
|
||||
/* bool delete = 5; */
|
||||
if (message.delete !== false)
|
||||
writer.tag(5, WireType.Varint).bool(message.delete);
|
||||
/* bool use = 6; */
|
||||
if (message.use !== false)
|
||||
writer.tag(6, WireType.Varint).bool(message.use);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.ResourceAccess
|
||||
*/
|
||||
export const ResourceAccess = new ResourceAccess$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Features$Type extends MessageType<Features> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.Features", [
|
||||
{ no: 1, name: "advanced_access_workflows", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "is_usage_based_billing", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Features>): Features {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.advancedAccessWorkflows = false;
|
||||
message.isUsageBasedBilling = false;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Features>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Features): Features {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* bool advanced_access_workflows */ 1:
|
||||
message.advancedAccessWorkflows = reader.bool();
|
||||
break;
|
||||
case /* bool is_usage_based_billing */ 2:
|
||||
message.isUsageBasedBilling = reader.bool();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: Features, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* bool advanced_access_workflows = 1; */
|
||||
if (message.advancedAccessWorkflows !== false)
|
||||
writer.tag(1, WireType.Varint).bool(message.advancedAccessWorkflows);
|
||||
/* bool is_usage_based_billing = 2; */
|
||||
if (message.isUsageBasedBilling !== false)
|
||||
writer.tag(2, WireType.Varint).bool(message.isUsageBasedBilling);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.Features
|
||||
*/
|
||||
export const Features = new Features$Type();
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/database.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { Label } from "./label_pb";
|
||||
/**
|
||||
* Database describes a database
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.Database
|
||||
*/
|
||||
export interface Database {
|
||||
/**
|
||||
* uri is the cluster resource URI
|
||||
*
|
||||
* @generated from protobuf field: string uri = 1;
|
||||
*/
|
||||
uri: string;
|
||||
/**
|
||||
* name is the name of the database
|
||||
*
|
||||
* @generated from protobuf field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* desc is the database description
|
||||
*
|
||||
* @generated from protobuf field: string desc = 3;
|
||||
*/
|
||||
desc: string;
|
||||
/**
|
||||
* protocol is the protocol used by the database
|
||||
*
|
||||
* @generated from protobuf field: string protocol = 4;
|
||||
*/
|
||||
protocol: string;
|
||||
/**
|
||||
* type is the database type, self-hosted or cloud-hosted.
|
||||
*
|
||||
* @generated from protobuf field: string type = 5;
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* hostname is this database hostname
|
||||
*
|
||||
* @generated from protobuf field: string hostname = 6;
|
||||
*/
|
||||
hostname: string;
|
||||
/**
|
||||
* addr is this database ip address
|
||||
*
|
||||
* @generated from protobuf field: string addr = 7;
|
||||
*/
|
||||
addr: string;
|
||||
/**
|
||||
* labels is a list of labels for this database
|
||||
*
|
||||
* @generated from protobuf field: repeated teleport.lib.teleterm.v1.Label labels = 8;
|
||||
*/
|
||||
labels: Label[];
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Database$Type extends MessageType<Database> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.Database", [
|
||||
{ no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "desc", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "protocol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 5, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 6, name: "hostname", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 7, name: "addr", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 8, name: "labels", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Label }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Database>): Database {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.uri = "";
|
||||
message.name = "";
|
||||
message.desc = "";
|
||||
message.protocol = "";
|
||||
message.type = "";
|
||||
message.hostname = "";
|
||||
message.addr = "";
|
||||
message.labels = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Database>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Database): Database {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string uri */ 1:
|
||||
message.uri = reader.string();
|
||||
break;
|
||||
case /* string name */ 2:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* string desc */ 3:
|
||||
message.desc = reader.string();
|
||||
break;
|
||||
case /* string protocol */ 4:
|
||||
message.protocol = reader.string();
|
||||
break;
|
||||
case /* string type */ 5:
|
||||
message.type = reader.string();
|
||||
break;
|
||||
case /* string hostname */ 6:
|
||||
message.hostname = reader.string();
|
||||
break;
|
||||
case /* string addr */ 7:
|
||||
message.addr = reader.string();
|
||||
break;
|
||||
case /* repeated teleport.lib.teleterm.v1.Label labels */ 8:
|
||||
message.labels.push(Label.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: Database, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string uri = 1; */
|
||||
if (message.uri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.uri);
|
||||
/* string name = 2; */
|
||||
if (message.name !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
||||
/* string desc = 3; */
|
||||
if (message.desc !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.desc);
|
||||
/* string protocol = 4; */
|
||||
if (message.protocol !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.protocol);
|
||||
/* string type = 5; */
|
||||
if (message.type !== "")
|
||||
writer.tag(5, WireType.LengthDelimited).string(message.type);
|
||||
/* string hostname = 6; */
|
||||
if (message.hostname !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.hostname);
|
||||
/* string addr = 7; */
|
||||
if (message.addr !== "")
|
||||
writer.tag(7, WireType.LengthDelimited).string(message.addr);
|
||||
/* repeated teleport.lib.teleterm.v1.Label labels = 8; */
|
||||
for (let i = 0; i < message.labels.length; i++)
|
||||
Label.internalBinaryWrite(message.labels[i], writer.tag(8, 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 teleport.lib.teleterm.v1.Database
|
||||
*/
|
||||
export const Database = new Database$Type();
|
||||
+317
@@ -0,0 +1,317 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/gateway.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* Gateway is Teleterm's name for a connection to a resource like a database or a web app
|
||||
* established through our ALPN proxy.
|
||||
*
|
||||
* The term "gateway" is used to avoid using the term "proxy" itself which could be confusing as
|
||||
* "proxy" means a couple of different things depending on the context. But for Teleterm, a gateway
|
||||
* is always an ALPN proxy connection.
|
||||
*
|
||||
* See RFD 39 for more info on ALPN.
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.Gateway
|
||||
*/
|
||||
export interface Gateway {
|
||||
/**
|
||||
* uri is the gateway uri
|
||||
*
|
||||
* @generated from protobuf field: string uri = 1;
|
||||
*/
|
||||
uri: string;
|
||||
/**
|
||||
* target_name is the target resource name
|
||||
*
|
||||
* @generated from protobuf field: string target_name = 2;
|
||||
*/
|
||||
targetName: string;
|
||||
/**
|
||||
* target_uri is the target uri
|
||||
*
|
||||
* @generated from protobuf field: string target_uri = 3;
|
||||
*/
|
||||
targetUri: string;
|
||||
/**
|
||||
* target_user is the target user
|
||||
*
|
||||
* @generated from protobuf field: string target_user = 4;
|
||||
*/
|
||||
targetUser: string;
|
||||
/**
|
||||
* local_address is the gateway address on localhost
|
||||
*
|
||||
* @generated from protobuf field: string local_address = 5;
|
||||
*/
|
||||
localAddress: string;
|
||||
/**
|
||||
* local_port is the gateway address on localhost
|
||||
*
|
||||
* @generated from protobuf field: string local_port = 6;
|
||||
*/
|
||||
localPort: string;
|
||||
/**
|
||||
* protocol is the gateway protocol
|
||||
*
|
||||
* @generated from protobuf field: string protocol = 7;
|
||||
*/
|
||||
protocol: string;
|
||||
/**
|
||||
* target_subresource_name points at a subresource of the remote resource, for example a
|
||||
* database name on a database server.
|
||||
*
|
||||
* @generated from protobuf field: string target_subresource_name = 9;
|
||||
*/
|
||||
targetSubresourceName: string;
|
||||
/**
|
||||
* gateway_cli_client represents a command that the user can execute to connect to the resource
|
||||
* through the gateway.
|
||||
*
|
||||
* Instead of generating those commands in in the frontend code, they are returned from the tsh
|
||||
* daemon. This means that the Database Access team can add support for a new protocol and
|
||||
* Connect will support it right away with no extra changes.
|
||||
*
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.GatewayCLICommand gateway_cli_command = 10;
|
||||
*/
|
||||
gatewayCliCommand?: GatewayCLICommand;
|
||||
}
|
||||
/**
|
||||
* GatewayCLICommand represents a command that the user can execute to connect to the gateway
|
||||
* resource. It is a direct translation of os.exec.Cmd.
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.GatewayCLICommand
|
||||
*/
|
||||
export interface GatewayCLICommand {
|
||||
/**
|
||||
* @generated from protobuf field: string path = 1;
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* @generated from protobuf field: repeated string args = 2;
|
||||
*/
|
||||
args: string[];
|
||||
/**
|
||||
* @generated from protobuf field: repeated string env = 3;
|
||||
*/
|
||||
env: string[];
|
||||
/**
|
||||
* preview is used to show the user what command will be executed before they decide to run it.
|
||||
* It's like os.exec.Cmd.String with two exceptions:
|
||||
*
|
||||
* 1) It is prepended with Cmd.Env.
|
||||
* 2) The command name is relative and not absolute.
|
||||
*
|
||||
* @generated from protobuf field: string preview = 4;
|
||||
*/
|
||||
preview: string;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Gateway$Type extends MessageType<Gateway> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.Gateway", [
|
||||
{ no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "target_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "target_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "target_user", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 5, name: "local_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 6, name: "local_port", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 7, name: "protocol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 9, name: "target_subresource_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 10, name: "gateway_cli_command", kind: "message", T: () => GatewayCLICommand }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Gateway>): Gateway {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.uri = "";
|
||||
message.targetName = "";
|
||||
message.targetUri = "";
|
||||
message.targetUser = "";
|
||||
message.localAddress = "";
|
||||
message.localPort = "";
|
||||
message.protocol = "";
|
||||
message.targetSubresourceName = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Gateway>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Gateway): Gateway {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string uri */ 1:
|
||||
message.uri = reader.string();
|
||||
break;
|
||||
case /* string target_name */ 2:
|
||||
message.targetName = reader.string();
|
||||
break;
|
||||
case /* string target_uri */ 3:
|
||||
message.targetUri = reader.string();
|
||||
break;
|
||||
case /* string target_user */ 4:
|
||||
message.targetUser = reader.string();
|
||||
break;
|
||||
case /* string local_address */ 5:
|
||||
message.localAddress = reader.string();
|
||||
break;
|
||||
case /* string local_port */ 6:
|
||||
message.localPort = reader.string();
|
||||
break;
|
||||
case /* string protocol */ 7:
|
||||
message.protocol = reader.string();
|
||||
break;
|
||||
case /* string target_subresource_name */ 9:
|
||||
message.targetSubresourceName = reader.string();
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.GatewayCLICommand gateway_cli_command */ 10:
|
||||
message.gatewayCliCommand = GatewayCLICommand.internalBinaryRead(reader, reader.uint32(), options, message.gatewayCliCommand);
|
||||
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: Gateway, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string uri = 1; */
|
||||
if (message.uri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.uri);
|
||||
/* string target_name = 2; */
|
||||
if (message.targetName !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.targetName);
|
||||
/* string target_uri = 3; */
|
||||
if (message.targetUri !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.targetUri);
|
||||
/* string target_user = 4; */
|
||||
if (message.targetUser !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.targetUser);
|
||||
/* string local_address = 5; */
|
||||
if (message.localAddress !== "")
|
||||
writer.tag(5, WireType.LengthDelimited).string(message.localAddress);
|
||||
/* string local_port = 6; */
|
||||
if (message.localPort !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.localPort);
|
||||
/* string protocol = 7; */
|
||||
if (message.protocol !== "")
|
||||
writer.tag(7, WireType.LengthDelimited).string(message.protocol);
|
||||
/* string target_subresource_name = 9; */
|
||||
if (message.targetSubresourceName !== "")
|
||||
writer.tag(9, WireType.LengthDelimited).string(message.targetSubresourceName);
|
||||
/* teleport.lib.teleterm.v1.GatewayCLICommand gateway_cli_command = 10; */
|
||||
if (message.gatewayCliCommand)
|
||||
GatewayCLICommand.internalBinaryWrite(message.gatewayCliCommand, writer.tag(10, 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 teleport.lib.teleterm.v1.Gateway
|
||||
*/
|
||||
export const Gateway = new Gateway$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class GatewayCLICommand$Type extends MessageType<GatewayCLICommand> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.GatewayCLICommand", [
|
||||
{ no: 1, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "args", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "env", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "preview", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<GatewayCLICommand>): GatewayCLICommand {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.path = "";
|
||||
message.args = [];
|
||||
message.env = [];
|
||||
message.preview = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<GatewayCLICommand>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GatewayCLICommand): GatewayCLICommand {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string path */ 1:
|
||||
message.path = reader.string();
|
||||
break;
|
||||
case /* repeated string args */ 2:
|
||||
message.args.push(reader.string());
|
||||
break;
|
||||
case /* repeated string env */ 3:
|
||||
message.env.push(reader.string());
|
||||
break;
|
||||
case /* string preview */ 4:
|
||||
message.preview = 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: GatewayCLICommand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string path = 1; */
|
||||
if (message.path !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.path);
|
||||
/* repeated string args = 2; */
|
||||
for (let i = 0; i < message.args.length; i++)
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.args[i]);
|
||||
/* repeated string env = 3; */
|
||||
for (let i = 0; i < message.env.length; i++)
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.env[i]);
|
||||
/* string preview = 4; */
|
||||
if (message.preview !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.preview);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.GatewayCLICommand
|
||||
*/
|
||||
export const GatewayCLICommand = new GatewayCLICommand$Type();
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/kube.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { Label } from "./label_pb";
|
||||
/**
|
||||
* Kube describes connected Kubernetes cluster
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.Kube
|
||||
*/
|
||||
export interface Kube {
|
||||
/**
|
||||
* uri is the kube resource URI
|
||||
*
|
||||
* @generated from protobuf field: string uri = 1;
|
||||
*/
|
||||
uri: string;
|
||||
/**
|
||||
* name is the kube name
|
||||
*
|
||||
* @generated from protobuf field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* labels is the kube labels
|
||||
*
|
||||
* @generated from protobuf field: repeated teleport.lib.teleterm.v1.Label labels = 3;
|
||||
*/
|
||||
labels: Label[];
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Kube$Type extends MessageType<Kube> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.Kube", [
|
||||
{ no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "labels", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Label }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Kube>): Kube {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.uri = "";
|
||||
message.name = "";
|
||||
message.labels = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Kube>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Kube): Kube {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string uri */ 1:
|
||||
message.uri = reader.string();
|
||||
break;
|
||||
case /* string name */ 2:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* repeated teleport.lib.teleterm.v1.Label labels */ 3:
|
||||
message.labels.push(Label.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: Kube, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string uri = 1; */
|
||||
if (message.uri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.uri);
|
||||
/* string name = 2; */
|
||||
if (message.name !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
||||
/* repeated teleport.lib.teleterm.v1.Label labels = 3; */
|
||||
for (let i = 0; i < message.labels.length; i++)
|
||||
Label.internalBinaryWrite(message.labels[i], writer.tag(3, 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 teleport.lib.teleterm.v1.Kube
|
||||
*/
|
||||
export const Kube = new Kube$Type();
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/label.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* Label describes a label
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.Label
|
||||
*/
|
||||
export interface Label {
|
||||
/**
|
||||
* name is this label name
|
||||
*
|
||||
* @generated from protobuf field: string name = 1;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* value is this label value
|
||||
*
|
||||
* @generated from protobuf field: string value = 2;
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Label$Type extends MessageType<Label> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.Label", [
|
||||
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Label>): Label {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.name = "";
|
||||
message.value = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Label>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Label): Label {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string name */ 1:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* string value */ 2:
|
||||
message.value = 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: Label, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string name = 1; */
|
||||
if (message.name !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.name);
|
||||
/* string value = 2; */
|
||||
if (message.value !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.value);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.Label
|
||||
*/
|
||||
export const Label = new Label$Type();
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/server.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { Label } from "./label_pb";
|
||||
/**
|
||||
* Server describes connected Server
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.Server
|
||||
*/
|
||||
export interface Server {
|
||||
/**
|
||||
* uri is the server uri
|
||||
*
|
||||
* @generated from protobuf field: string uri = 1;
|
||||
*/
|
||||
uri: string;
|
||||
/**
|
||||
* tunnel indicates if this server is connected over a reverse tunnel
|
||||
*
|
||||
* @generated from protobuf field: bool tunnel = 2;
|
||||
*/
|
||||
tunnel: boolean;
|
||||
/**
|
||||
* name is the server name
|
||||
*
|
||||
* @generated from protobuf field: string name = 3;
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* hostname is this server hostname
|
||||
*
|
||||
* @generated from protobuf field: string hostname = 4;
|
||||
*/
|
||||
hostname: string;
|
||||
/**
|
||||
* addr is this server ip address
|
||||
*
|
||||
* @generated from protobuf field: string addr = 5;
|
||||
*/
|
||||
addr: string;
|
||||
/**
|
||||
* labels is this server list of labels
|
||||
*
|
||||
* @generated from protobuf field: repeated teleport.lib.teleterm.v1.Label labels = 6;
|
||||
*/
|
||||
labels: Label[];
|
||||
/**
|
||||
* node sub kind: teleport, openssh, openssh-ec2-ice
|
||||
*
|
||||
* @generated from protobuf field: string sub_kind = 7;
|
||||
*/
|
||||
subKind: string;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Server$Type extends MessageType<Server> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.Server", [
|
||||
{ no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "tunnel", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "hostname", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 5, name: "addr", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 6, name: "labels", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Label },
|
||||
{ no: 7, name: "sub_kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Server>): Server {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.uri = "";
|
||||
message.tunnel = false;
|
||||
message.name = "";
|
||||
message.hostname = "";
|
||||
message.addr = "";
|
||||
message.labels = [];
|
||||
message.subKind = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Server>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Server): Server {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string uri */ 1:
|
||||
message.uri = reader.string();
|
||||
break;
|
||||
case /* bool tunnel */ 2:
|
||||
message.tunnel = reader.bool();
|
||||
break;
|
||||
case /* string name */ 3:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case /* string hostname */ 4:
|
||||
message.hostname = reader.string();
|
||||
break;
|
||||
case /* string addr */ 5:
|
||||
message.addr = reader.string();
|
||||
break;
|
||||
case /* repeated teleport.lib.teleterm.v1.Label labels */ 6:
|
||||
message.labels.push(Label.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* string sub_kind */ 7:
|
||||
message.subKind = 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: Server, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string uri = 1; */
|
||||
if (message.uri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.uri);
|
||||
/* bool tunnel = 2; */
|
||||
if (message.tunnel !== false)
|
||||
writer.tag(2, WireType.Varint).bool(message.tunnel);
|
||||
/* string name = 3; */
|
||||
if (message.name !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.name);
|
||||
/* string hostname = 4; */
|
||||
if (message.hostname !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.hostname);
|
||||
/* string addr = 5; */
|
||||
if (message.addr !== "")
|
||||
writer.tag(5, WireType.LengthDelimited).string(message.addr);
|
||||
/* repeated teleport.lib.teleterm.v1.Label labels = 6; */
|
||||
for (let i = 0; i < message.labels.length; i++)
|
||||
Label.internalBinaryWrite(message.labels[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string sub_kind = 7; */
|
||||
if (message.subKind !== "")
|
||||
writer.tag(7, WireType.LengthDelimited).string(message.subKind);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.Server
|
||||
*/
|
||||
export const Server = new Server$Type();
|
||||
@@ -0,0 +1,932 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/service.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { TerminalService } from "./service_pb";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { UpdateUserPreferencesResponse } from "./service_pb";
|
||||
import type { UpdateUserPreferencesRequest } from "./service_pb";
|
||||
import type { GetUserPreferencesResponse } from "./service_pb";
|
||||
import type { GetUserPreferencesRequest } from "./service_pb";
|
||||
import type { ListUnifiedResourcesResponse } from "./service_pb";
|
||||
import type { ListUnifiedResourcesRequest } from "./service_pb";
|
||||
import type { GetConnectMyComputerNodeNameResponse } from "./service_pb";
|
||||
import type { GetConnectMyComputerNodeNameRequest } from "./service_pb";
|
||||
import type { DeleteConnectMyComputerNodeResponse } from "./service_pb";
|
||||
import type { DeleteConnectMyComputerNodeRequest } from "./service_pb";
|
||||
import type { WaitForConnectMyComputerNodeJoinResponse } from "./service_pb";
|
||||
import type { WaitForConnectMyComputerNodeJoinRequest } from "./service_pb";
|
||||
import type { DeleteConnectMyComputerTokenResponse } from "./service_pb";
|
||||
import type { DeleteConnectMyComputerTokenRequest } from "./service_pb";
|
||||
import type { CreateConnectMyComputerNodeTokenResponse } from "./service_pb";
|
||||
import type { CreateConnectMyComputerNodeTokenRequest } from "./service_pb";
|
||||
import type { CreateConnectMyComputerRoleResponse } from "./service_pb";
|
||||
import type { CreateConnectMyComputerRoleRequest } from "./service_pb";
|
||||
import type { UpdateHeadlessAuthenticationStateResponse } from "./service_pb";
|
||||
import type { UpdateHeadlessAuthenticationStateRequest } from "./service_pb";
|
||||
import type { ReportUsageEventRequest } from "./usage_events_pb";
|
||||
import type { FileTransferProgress } from "./service_pb";
|
||||
import type { FileTransferRequest } from "./service_pb";
|
||||
import type { LogoutRequest } from "./service_pb";
|
||||
import type { LoginPasswordlessResponse } from "./service_pb";
|
||||
import type { LoginPasswordlessRequest } from "./service_pb";
|
||||
import type { LoginRequest } from "./service_pb";
|
||||
import type { GetClusterRequest } from "./service_pb";
|
||||
import type { AuthSettings } from "./auth_settings_pb";
|
||||
import type { GetAuthSettingsRequest } from "./service_pb";
|
||||
import type { SetGatewayLocalPortRequest } from "./service_pb";
|
||||
import type { SetGatewayTargetSubresourceNameRequest } from "./service_pb";
|
||||
import type { RemoveGatewayRequest } from "./service_pb";
|
||||
import type { Gateway } from "./gateway_pb";
|
||||
import type { CreateGatewayRequest } from "./service_pb";
|
||||
import type { ListGatewaysResponse } from "./service_pb";
|
||||
import type { ListGatewaysRequest } from "./service_pb";
|
||||
import type { RemoveClusterRequest } from "./service_pb";
|
||||
import type { Cluster } from "./cluster_pb";
|
||||
import type { AddClusterRequest } from "./service_pb";
|
||||
import type { GetAppsResponse } from "./service_pb";
|
||||
import type { GetAppsRequest } from "./service_pb";
|
||||
import type { GetKubesResponse } from "./service_pb";
|
||||
import type { GetKubesRequest } from "./service_pb";
|
||||
import type { GetSuggestedAccessListsResponse } from "./service_pb";
|
||||
import type { GetSuggestedAccessListsRequest } from "./service_pb";
|
||||
import type { PromoteAccessRequestResponse } from "./service_pb";
|
||||
import type { PromoteAccessRequestRequest } from "./service_pb";
|
||||
import type { AssumeRoleRequest } from "./service_pb";
|
||||
import type { GetRequestableRolesResponse } from "./service_pb";
|
||||
import type { GetRequestableRolesRequest } from "./service_pb";
|
||||
import type { ReviewAccessRequestResponse } from "./service_pb";
|
||||
import type { ReviewAccessRequestRequest } from "./service_pb";
|
||||
import type { CreateAccessRequestResponse } from "./service_pb";
|
||||
import type { CreateAccessRequestRequest } from "./service_pb";
|
||||
import type { EmptyResponse } from "./service_pb";
|
||||
import type { DeleteAccessRequestRequest } from "./service_pb";
|
||||
import type { GetAccessRequestResponse } from "./service_pb";
|
||||
import type { GetAccessRequestRequest } from "./service_pb";
|
||||
import type { GetAccessRequestsResponse } from "./service_pb";
|
||||
import type { GetAccessRequestsRequest } from "./service_pb";
|
||||
import type { GetServersResponse } from "./service_pb";
|
||||
import type { GetServersRequest } from "./service_pb";
|
||||
import type { ListDatabaseUsersResponse } from "./service_pb";
|
||||
import type { ListDatabaseUsersRequest } from "./service_pb";
|
||||
import type { GetDatabasesResponse } from "./service_pb";
|
||||
import type { GetDatabasesRequest } from "./service_pb";
|
||||
import type { ListLeafClustersRequest } from "./service_pb";
|
||||
import type { ListClustersResponse } from "./service_pb";
|
||||
import type { ListClustersRequest } from "./service_pb";
|
||||
import type { UpdateTshdEventsServerAddressResponse } from "./service_pb";
|
||||
import type { UpdateTshdEventsServerAddressRequest } from "./service_pb";
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* TerminalService is used by the Electron app to communicate with the tsh daemon.
|
||||
*
|
||||
* While we aim to preserve backwards compatibility in order to satisfy CI checks and follow the
|
||||
* proto practices used within the company, this service is not guaranteed to be stable across
|
||||
* versions. The packaging process of Teleport Connect ensures that the server and the client use
|
||||
* the same version of the service.
|
||||
*
|
||||
* @generated from protobuf service teleport.lib.teleterm.v1.TerminalService
|
||||
*/
|
||||
export interface ITerminalServiceClient {
|
||||
/**
|
||||
* UpdateTshdEventsServerAddress lets the Electron app update the address the tsh daemon is
|
||||
* supposed to use when connecting to the tshd events gRPC service. This RPC needs to be made
|
||||
* before any other from this service.
|
||||
*
|
||||
* The service is supposed to return a response from this call only after the client is ready.
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateTshdEventsServerAddress(teleport.lib.teleterm.v1.UpdateTshdEventsServerAddressRequest) returns (teleport.lib.teleterm.v1.UpdateTshdEventsServerAddressResponse);
|
||||
*/
|
||||
updateTshdEventsServerAddress(input: UpdateTshdEventsServerAddressRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpdateTshdEventsServerAddressResponse) => void): grpc.ClientUnaryCall;
|
||||
updateTshdEventsServerAddress(input: UpdateTshdEventsServerAddressRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: UpdateTshdEventsServerAddressResponse) => void): grpc.ClientUnaryCall;
|
||||
updateTshdEventsServerAddress(input: UpdateTshdEventsServerAddressRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpdateTshdEventsServerAddressResponse) => void): grpc.ClientUnaryCall;
|
||||
updateTshdEventsServerAddress(input: UpdateTshdEventsServerAddressRequest, callback: (err: grpc.ServiceError | null, value?: UpdateTshdEventsServerAddressResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListRootClusters lists root clusters
|
||||
* Does not include detailed cluster information that would require a network request.
|
||||
*
|
||||
* @generated from protobuf rpc: ListRootClusters(teleport.lib.teleterm.v1.ListClustersRequest) returns (teleport.lib.teleterm.v1.ListClustersResponse);
|
||||
*/
|
||||
listRootClusters(input: ListClustersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListClustersResponse) => void): grpc.ClientUnaryCall;
|
||||
listRootClusters(input: ListClustersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListClustersResponse) => void): grpc.ClientUnaryCall;
|
||||
listRootClusters(input: ListClustersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListClustersResponse) => void): grpc.ClientUnaryCall;
|
||||
listRootClusters(input: ListClustersRequest, callback: (err: grpc.ServiceError | null, value?: ListClustersResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListLeafClusters lists leaf clusters
|
||||
* Does not include detailed cluster information that would require a network request.
|
||||
*
|
||||
* @generated from protobuf rpc: ListLeafClusters(teleport.lib.teleterm.v1.ListLeafClustersRequest) returns (teleport.lib.teleterm.v1.ListClustersResponse);
|
||||
*/
|
||||
listLeafClusters(input: ListLeafClustersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListClustersResponse) => void): grpc.ClientUnaryCall;
|
||||
listLeafClusters(input: ListLeafClustersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListClustersResponse) => void): grpc.ClientUnaryCall;
|
||||
listLeafClusters(input: ListLeafClustersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListClustersResponse) => void): grpc.ClientUnaryCall;
|
||||
listLeafClusters(input: ListLeafClustersRequest, callback: (err: grpc.ServiceError | null, value?: ListClustersResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetDatabases returns a filtered and paginated list of databases
|
||||
*
|
||||
* @generated from protobuf rpc: GetDatabases(teleport.lib.teleterm.v1.GetDatabasesRequest) returns (teleport.lib.teleterm.v1.GetDatabasesResponse);
|
||||
*/
|
||||
getDatabases(input: GetDatabasesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetDatabasesResponse) => void): grpc.ClientUnaryCall;
|
||||
getDatabases(input: GetDatabasesRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetDatabasesResponse) => void): grpc.ClientUnaryCall;
|
||||
getDatabases(input: GetDatabasesRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetDatabasesResponse) => void): grpc.ClientUnaryCall;
|
||||
getDatabases(input: GetDatabasesRequest, callback: (err: grpc.ServiceError | null, value?: GetDatabasesResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListDatabaseUsers lists allowed users for the given database based on the role set.
|
||||
*
|
||||
* @generated from protobuf rpc: ListDatabaseUsers(teleport.lib.teleterm.v1.ListDatabaseUsersRequest) returns (teleport.lib.teleterm.v1.ListDatabaseUsersResponse);
|
||||
*/
|
||||
listDatabaseUsers(input: ListDatabaseUsersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListDatabaseUsersResponse) => void): grpc.ClientUnaryCall;
|
||||
listDatabaseUsers(input: ListDatabaseUsersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListDatabaseUsersResponse) => void): grpc.ClientUnaryCall;
|
||||
listDatabaseUsers(input: ListDatabaseUsersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListDatabaseUsersResponse) => void): grpc.ClientUnaryCall;
|
||||
listDatabaseUsers(input: ListDatabaseUsersRequest, callback: (err: grpc.ServiceError | null, value?: ListDatabaseUsersResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetServers returns filtered, sorted, and paginated servers
|
||||
*
|
||||
* @generated from protobuf rpc: GetServers(teleport.lib.teleterm.v1.GetServersRequest) returns (teleport.lib.teleterm.v1.GetServersResponse);
|
||||
*/
|
||||
getServers(input: GetServersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetServersResponse) => void): grpc.ClientUnaryCall;
|
||||
getServers(input: GetServersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetServersResponse) => void): grpc.ClientUnaryCall;
|
||||
getServers(input: GetServersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetServersResponse) => void): grpc.ClientUnaryCall;
|
||||
getServers(input: GetServersRequest, callback: (err: grpc.ServiceError | null, value?: GetServersResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetAccessRequests lists filtered AccessRequests
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessRequests(teleport.lib.teleterm.v1.GetAccessRequestsRequest) returns (teleport.lib.teleterm.v1.GetAccessRequestsResponse);
|
||||
*/
|
||||
getAccessRequests(input: GetAccessRequestsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessRequestsResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessRequests(input: GetAccessRequestsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetAccessRequestsResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessRequests(input: GetAccessRequestsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessRequestsResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessRequests(input: GetAccessRequestsRequest, callback: (err: grpc.ServiceError | null, value?: GetAccessRequestsResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetAccessRequest retreives a single Access Request
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessRequest(teleport.lib.teleterm.v1.GetAccessRequestRequest) returns (teleport.lib.teleterm.v1.GetAccessRequestResponse);
|
||||
*/
|
||||
getAccessRequest(input: GetAccessRequestRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessRequest(input: GetAccessRequestRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessRequest(input: GetAccessRequestRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
getAccessRequest(input: GetAccessRequestRequest, callback: (err: grpc.ServiceError | null, value?: GetAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* DeleteAccessRequest deletes the access request by id
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessRequest(teleport.lib.teleterm.v1.DeleteAccessRequestRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
deleteAccessRequest(input: DeleteAccessRequestRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessRequest(input: DeleteAccessRequestRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessRequest(input: DeleteAccessRequestRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
deleteAccessRequest(input: DeleteAccessRequestRequest, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* CreateAccessRequest creates an access request
|
||||
*
|
||||
* @generated from protobuf rpc: CreateAccessRequest(teleport.lib.teleterm.v1.CreateAccessRequestRequest) returns (teleport.lib.teleterm.v1.CreateAccessRequestResponse);
|
||||
*/
|
||||
createAccessRequest(input: CreateAccessRequestRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
createAccessRequest(input: CreateAccessRequestRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: CreateAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
createAccessRequest(input: CreateAccessRequestRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
createAccessRequest(input: CreateAccessRequestRequest, callback: (err: grpc.ServiceError | null, value?: CreateAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ReviewAccessRequest submits a review for an Access Request
|
||||
*
|
||||
* @generated from protobuf rpc: ReviewAccessRequest(teleport.lib.teleterm.v1.ReviewAccessRequestRequest) returns (teleport.lib.teleterm.v1.ReviewAccessRequestResponse);
|
||||
*/
|
||||
reviewAccessRequest(input: ReviewAccessRequestRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ReviewAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
reviewAccessRequest(input: ReviewAccessRequestRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ReviewAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
reviewAccessRequest(input: ReviewAccessRequestRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ReviewAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
reviewAccessRequest(input: ReviewAccessRequestRequest, callback: (err: grpc.ServiceError | null, value?: ReviewAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetRequestableRoles gets all requestable roles
|
||||
*
|
||||
* @generated from protobuf rpc: GetRequestableRoles(teleport.lib.teleterm.v1.GetRequestableRolesRequest) returns (teleport.lib.teleterm.v1.GetRequestableRolesResponse);
|
||||
*/
|
||||
getRequestableRoles(input: GetRequestableRolesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetRequestableRolesResponse) => void): grpc.ClientUnaryCall;
|
||||
getRequestableRoles(input: GetRequestableRolesRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetRequestableRolesResponse) => void): grpc.ClientUnaryCall;
|
||||
getRequestableRoles(input: GetRequestableRolesRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetRequestableRolesResponse) => void): grpc.ClientUnaryCall;
|
||||
getRequestableRoles(input: GetRequestableRolesRequest, callback: (err: grpc.ServiceError | null, value?: GetRequestableRolesResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* AssumeRole assumes the role of the given access request
|
||||
*
|
||||
* @generated from protobuf rpc: AssumeRole(teleport.lib.teleterm.v1.AssumeRoleRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
assumeRole(input: AssumeRoleRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
assumeRole(input: AssumeRoleRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
assumeRole(input: AssumeRoleRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
assumeRole(input: AssumeRoleRequest, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* PromoteAccessRequest promotes an access request to an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: PromoteAccessRequest(teleport.lib.teleterm.v1.PromoteAccessRequestRequest) returns (teleport.lib.teleterm.v1.PromoteAccessRequestResponse);
|
||||
*/
|
||||
promoteAccessRequest(input: PromoteAccessRequestRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: PromoteAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
promoteAccessRequest(input: PromoteAccessRequestRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: PromoteAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
promoteAccessRequest(input: PromoteAccessRequestRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: PromoteAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
promoteAccessRequest(input: PromoteAccessRequestRequest, callback: (err: grpc.ServiceError | null, value?: PromoteAccessRequestResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetSuggestedAccessLists returns suggested access lists for an access request.
|
||||
*
|
||||
* @generated from protobuf rpc: GetSuggestedAccessLists(teleport.lib.teleterm.v1.GetSuggestedAccessListsRequest) returns (teleport.lib.teleterm.v1.GetSuggestedAccessListsResponse);
|
||||
*/
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetKubes returns filtered, sorted, and paginated kubes
|
||||
*
|
||||
* @generated from protobuf rpc: GetKubes(teleport.lib.teleterm.v1.GetKubesRequest) returns (teleport.lib.teleterm.v1.GetKubesResponse);
|
||||
*/
|
||||
getKubes(input: GetKubesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetKubesResponse) => void): grpc.ClientUnaryCall;
|
||||
getKubes(input: GetKubesRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetKubesResponse) => void): grpc.ClientUnaryCall;
|
||||
getKubes(input: GetKubesRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetKubesResponse) => void): grpc.ClientUnaryCall;
|
||||
getKubes(input: GetKubesRequest, callback: (err: grpc.ServiceError | null, value?: GetKubesResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetApps returns a filtered and paginated list of apps.
|
||||
*
|
||||
* @generated from protobuf rpc: GetApps(teleport.lib.teleterm.v1.GetAppsRequest) returns (teleport.lib.teleterm.v1.GetAppsResponse);
|
||||
*/
|
||||
getApps(input: GetAppsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAppsResponse) => void): grpc.ClientUnaryCall;
|
||||
getApps(input: GetAppsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetAppsResponse) => void): grpc.ClientUnaryCall;
|
||||
getApps(input: GetAppsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAppsResponse) => void): grpc.ClientUnaryCall;
|
||||
getApps(input: GetAppsRequest, callback: (err: grpc.ServiceError | null, value?: GetAppsResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* AddCluster adds a cluster to profile
|
||||
*
|
||||
* @generated from protobuf rpc: AddCluster(teleport.lib.teleterm.v1.AddClusterRequest) returns (teleport.lib.teleterm.v1.Cluster);
|
||||
*/
|
||||
addCluster(input: AddClusterRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Cluster) => void): grpc.ClientUnaryCall;
|
||||
addCluster(input: AddClusterRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Cluster) => void): grpc.ClientUnaryCall;
|
||||
addCluster(input: AddClusterRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Cluster) => void): grpc.ClientUnaryCall;
|
||||
addCluster(input: AddClusterRequest, callback: (err: grpc.ServiceError | null, value?: Cluster) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* RemoveCluster removes a cluster from profile
|
||||
*
|
||||
* @generated from protobuf rpc: RemoveCluster(teleport.lib.teleterm.v1.RemoveClusterRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
removeCluster(input: RemoveClusterRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
removeCluster(input: RemoveClusterRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
removeCluster(input: RemoveClusterRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
removeCluster(input: RemoveClusterRequest, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListGateways lists gateways
|
||||
*
|
||||
* @generated from protobuf rpc: ListGateways(teleport.lib.teleterm.v1.ListGatewaysRequest) returns (teleport.lib.teleterm.v1.ListGatewaysResponse);
|
||||
*/
|
||||
listGateways(input: ListGatewaysRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListGatewaysResponse) => void): grpc.ClientUnaryCall;
|
||||
listGateways(input: ListGatewaysRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListGatewaysResponse) => void): grpc.ClientUnaryCall;
|
||||
listGateways(input: ListGatewaysRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListGatewaysResponse) => void): grpc.ClientUnaryCall;
|
||||
listGateways(input: ListGatewaysRequest, callback: (err: grpc.ServiceError | null, value?: ListGatewaysResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* CreateGateway creates a gateway
|
||||
*
|
||||
* @generated from protobuf rpc: CreateGateway(teleport.lib.teleterm.v1.CreateGatewayRequest) returns (teleport.lib.teleterm.v1.Gateway);
|
||||
*/
|
||||
createGateway(input: CreateGatewayRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
createGateway(input: CreateGatewayRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
createGateway(input: CreateGatewayRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
createGateway(input: CreateGatewayRequest, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* RemoveGateway removes a gateway
|
||||
*
|
||||
* @generated from protobuf rpc: RemoveGateway(teleport.lib.teleterm.v1.RemoveGatewayRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
removeGateway(input: RemoveGatewayRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
removeGateway(input: RemoveGatewayRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
removeGateway(input: RemoveGatewayRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
removeGateway(input: RemoveGatewayRequest, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* SetGatewayTargetSubresourceName changes the TargetSubresourceName field of gateway.Gateway
|
||||
* and returns the updated version of gateway.Gateway.
|
||||
*
|
||||
* In Connect this is used to update the db name of a db connection along with the CLI command.
|
||||
*
|
||||
* @generated from protobuf rpc: SetGatewayTargetSubresourceName(teleport.lib.teleterm.v1.SetGatewayTargetSubresourceNameRequest) returns (teleport.lib.teleterm.v1.Gateway);
|
||||
*/
|
||||
setGatewayTargetSubresourceName(input: SetGatewayTargetSubresourceNameRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
setGatewayTargetSubresourceName(input: SetGatewayTargetSubresourceNameRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
setGatewayTargetSubresourceName(input: SetGatewayTargetSubresourceNameRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
setGatewayTargetSubresourceName(input: SetGatewayTargetSubresourceNameRequest, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* SetGatewayLocalPort starts a new gateway on the new port, stops the old gateway and then
|
||||
* assigns the URI of the old gateway to the new one. It does so without fetching a new db cert.
|
||||
*
|
||||
* @generated from protobuf rpc: SetGatewayLocalPort(teleport.lib.teleterm.v1.SetGatewayLocalPortRequest) returns (teleport.lib.teleterm.v1.Gateway);
|
||||
*/
|
||||
setGatewayLocalPort(input: SetGatewayLocalPortRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
setGatewayLocalPort(input: SetGatewayLocalPortRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
setGatewayLocalPort(input: SetGatewayLocalPortRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
setGatewayLocalPort(input: SetGatewayLocalPortRequest, callback: (err: grpc.ServiceError | null, value?: Gateway) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetAuthSettings returns cluster auth settigns
|
||||
*
|
||||
* @generated from protobuf rpc: GetAuthSettings(teleport.lib.teleterm.v1.GetAuthSettingsRequest) returns (teleport.lib.teleterm.v1.AuthSettings);
|
||||
*/
|
||||
getAuthSettings(input: GetAuthSettingsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AuthSettings) => void): grpc.ClientUnaryCall;
|
||||
getAuthSettings(input: GetAuthSettingsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: AuthSettings) => void): grpc.ClientUnaryCall;
|
||||
getAuthSettings(input: GetAuthSettingsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AuthSettings) => void): grpc.ClientUnaryCall;
|
||||
getAuthSettings(input: GetAuthSettingsRequest, callback: (err: grpc.ServiceError | null, value?: AuthSettings) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetCluster returns cluster. Makes a network request and includes detailed
|
||||
* information about enterprise features availabed on the connected auth server
|
||||
*
|
||||
* @generated from protobuf rpc: GetCluster(teleport.lib.teleterm.v1.GetClusterRequest) returns (teleport.lib.teleterm.v1.Cluster);
|
||||
*/
|
||||
getCluster(input: GetClusterRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Cluster) => void): grpc.ClientUnaryCall;
|
||||
getCluster(input: GetClusterRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Cluster) => void): grpc.ClientUnaryCall;
|
||||
getCluster(input: GetClusterRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Cluster) => void): grpc.ClientUnaryCall;
|
||||
getCluster(input: GetClusterRequest, callback: (err: grpc.ServiceError | null, value?: Cluster) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* Login logs in a user to a cluster
|
||||
*
|
||||
* @generated from protobuf rpc: Login(teleport.lib.teleterm.v1.LoginRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
login(input: LoginRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
login(input: LoginRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
login(input: LoginRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
login(input: LoginRequest, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* LoginPasswordless logs in a user to a cluster passwordlessly.
|
||||
*
|
||||
* The RPC is streaming both ways and the message sequence example for hardware keys are:
|
||||
* (-> means client-to-server, <- means server-to-client)
|
||||
*
|
||||
* Hardware keys:
|
||||
* -> Init
|
||||
* <- Send PasswordlessPrompt enum TAP to choose a device
|
||||
* -> Receive TAP device response
|
||||
* <- Send PasswordlessPrompt enum PIN
|
||||
* -> Receive PIN response
|
||||
* <- Send PasswordlessPrompt enum RETAP to confirm
|
||||
* -> Receive RETAP device response
|
||||
* <- Send list of credentials (e.g. usernames) associated with device
|
||||
* -> Receive the index number associated with the selected credential in list
|
||||
* <- End
|
||||
*
|
||||
* @generated from protobuf rpc: LoginPasswordless(stream teleport.lib.teleterm.v1.LoginPasswordlessRequest) returns (stream teleport.lib.teleterm.v1.LoginPasswordlessResponse);
|
||||
*/
|
||||
loginPasswordless(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<LoginPasswordlessRequest, LoginPasswordlessResponse>;
|
||||
loginPasswordless(options?: grpc.CallOptions): grpc.ClientDuplexStream<LoginPasswordlessRequest, LoginPasswordlessResponse>;
|
||||
/**
|
||||
* ClusterLogin logs out a user from cluster
|
||||
*
|
||||
* @generated from protobuf rpc: Logout(teleport.lib.teleterm.v1.LogoutRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
logout(input: LogoutRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
logout(input: LogoutRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
logout(input: LogoutRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
logout(input: LogoutRequest, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* TransferFile sends a request to download/upload a file
|
||||
*
|
||||
* @generated from protobuf rpc: TransferFile(teleport.lib.teleterm.v1.FileTransferRequest) returns (stream teleport.lib.teleterm.v1.FileTransferProgress);
|
||||
*/
|
||||
transferFile(input: FileTransferRequest, metadata?: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<FileTransferProgress>;
|
||||
transferFile(input: FileTransferRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<FileTransferProgress>;
|
||||
/**
|
||||
* ReportUsageEvent allows to send usage events that are then anonymized and forwarded to prehog
|
||||
*
|
||||
* @generated from protobuf rpc: ReportUsageEvent(teleport.lib.teleterm.v1.ReportUsageEventRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
reportUsageEvent(input: ReportUsageEventRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
reportUsageEvent(input: ReportUsageEventRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
reportUsageEvent(input: ReportUsageEventRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
reportUsageEvent(input: ReportUsageEventRequest, callback: (err: grpc.ServiceError | null, value?: EmptyResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* UpdateHeadlessAuthenticationState updates a headless authentication resource's state.
|
||||
* An MFA challenge will be prompted when approving a headless authentication.
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateHeadlessAuthenticationState(teleport.lib.teleterm.v1.UpdateHeadlessAuthenticationStateRequest) returns (teleport.lib.teleterm.v1.UpdateHeadlessAuthenticationStateResponse);
|
||||
*/
|
||||
updateHeadlessAuthenticationState(input: UpdateHeadlessAuthenticationStateRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpdateHeadlessAuthenticationStateResponse) => void): grpc.ClientUnaryCall;
|
||||
updateHeadlessAuthenticationState(input: UpdateHeadlessAuthenticationStateRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: UpdateHeadlessAuthenticationStateResponse) => void): grpc.ClientUnaryCall;
|
||||
updateHeadlessAuthenticationState(input: UpdateHeadlessAuthenticationStateRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpdateHeadlessAuthenticationStateResponse) => void): grpc.ClientUnaryCall;
|
||||
updateHeadlessAuthenticationState(input: UpdateHeadlessAuthenticationStateRequest, callback: (err: grpc.ServiceError | null, value?: UpdateHeadlessAuthenticationStateResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* CreateConnectMyComputerRole creates a role which allows access to nodes with the label
|
||||
* teleport.dev/connect-my-computer/owner: <cluster user> and allows logging in to those nodes as
|
||||
* the current system user.
|
||||
*
|
||||
* @generated from protobuf rpc: CreateConnectMyComputerRole(teleport.lib.teleterm.v1.CreateConnectMyComputerRoleRequest) returns (teleport.lib.teleterm.v1.CreateConnectMyComputerRoleResponse);
|
||||
*/
|
||||
createConnectMyComputerRole(input: CreateConnectMyComputerRoleRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateConnectMyComputerRoleResponse) => void): grpc.ClientUnaryCall;
|
||||
createConnectMyComputerRole(input: CreateConnectMyComputerRoleRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: CreateConnectMyComputerRoleResponse) => void): grpc.ClientUnaryCall;
|
||||
createConnectMyComputerRole(input: CreateConnectMyComputerRoleRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateConnectMyComputerRoleResponse) => void): grpc.ClientUnaryCall;
|
||||
createConnectMyComputerRole(input: CreateConnectMyComputerRoleRequest, callback: (err: grpc.ServiceError | null, value?: CreateConnectMyComputerRoleResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* CreateConnectMyComputerNodeToken creates a node join token that is valid for 5 minutes
|
||||
*
|
||||
* @generated from protobuf rpc: CreateConnectMyComputerNodeToken(teleport.lib.teleterm.v1.CreateConnectMyComputerNodeTokenRequest) returns (teleport.lib.teleterm.v1.CreateConnectMyComputerNodeTokenResponse);
|
||||
*/
|
||||
createConnectMyComputerNodeToken(input: CreateConnectMyComputerNodeTokenRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateConnectMyComputerNodeTokenResponse) => void): grpc.ClientUnaryCall;
|
||||
createConnectMyComputerNodeToken(input: CreateConnectMyComputerNodeTokenRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: CreateConnectMyComputerNodeTokenResponse) => void): grpc.ClientUnaryCall;
|
||||
createConnectMyComputerNodeToken(input: CreateConnectMyComputerNodeTokenRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateConnectMyComputerNodeTokenResponse) => void): grpc.ClientUnaryCall;
|
||||
createConnectMyComputerNodeToken(input: CreateConnectMyComputerNodeTokenRequest, callback: (err: grpc.ServiceError | null, value?: CreateConnectMyComputerNodeTokenResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* DeleteConnectMyComputerToken deletes a join token
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteConnectMyComputerToken(teleport.lib.teleterm.v1.DeleteConnectMyComputerTokenRequest) returns (teleport.lib.teleterm.v1.DeleteConnectMyComputerTokenResponse);
|
||||
*/
|
||||
deleteConnectMyComputerToken(input: DeleteConnectMyComputerTokenRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: DeleteConnectMyComputerTokenResponse) => void): grpc.ClientUnaryCall;
|
||||
deleteConnectMyComputerToken(input: DeleteConnectMyComputerTokenRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: DeleteConnectMyComputerTokenResponse) => void): grpc.ClientUnaryCall;
|
||||
deleteConnectMyComputerToken(input: DeleteConnectMyComputerTokenRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: DeleteConnectMyComputerTokenResponse) => void): grpc.ClientUnaryCall;
|
||||
deleteConnectMyComputerToken(input: DeleteConnectMyComputerTokenRequest, callback: (err: grpc.ServiceError | null, value?: DeleteConnectMyComputerTokenResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* WaitForConnectMyComputerNodeJoin sets up a watcher and returns a response only after detecting
|
||||
* that the Connect My Computer node for the particular cluster has joined the cluster (the
|
||||
* OpPut event).
|
||||
*
|
||||
* This RPC times out by itself after a minute to prevent the request from hanging forever, in
|
||||
* case the client didn't set a deadline or doesn't abort the request.
|
||||
*
|
||||
* @generated from protobuf rpc: WaitForConnectMyComputerNodeJoin(teleport.lib.teleterm.v1.WaitForConnectMyComputerNodeJoinRequest) returns (teleport.lib.teleterm.v1.WaitForConnectMyComputerNodeJoinResponse);
|
||||
*/
|
||||
waitForConnectMyComputerNodeJoin(input: WaitForConnectMyComputerNodeJoinRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: WaitForConnectMyComputerNodeJoinResponse) => void): grpc.ClientUnaryCall;
|
||||
waitForConnectMyComputerNodeJoin(input: WaitForConnectMyComputerNodeJoinRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: WaitForConnectMyComputerNodeJoinResponse) => void): grpc.ClientUnaryCall;
|
||||
waitForConnectMyComputerNodeJoin(input: WaitForConnectMyComputerNodeJoinRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: WaitForConnectMyComputerNodeJoinResponse) => void): grpc.ClientUnaryCall;
|
||||
waitForConnectMyComputerNodeJoin(input: WaitForConnectMyComputerNodeJoinRequest, callback: (err: grpc.ServiceError | null, value?: WaitForConnectMyComputerNodeJoinResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* DeleteConnectMyComputerNode deletes the Connect My Computer node.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteConnectMyComputerNode(teleport.lib.teleterm.v1.DeleteConnectMyComputerNodeRequest) returns (teleport.lib.teleterm.v1.DeleteConnectMyComputerNodeResponse);
|
||||
*/
|
||||
deleteConnectMyComputerNode(input: DeleteConnectMyComputerNodeRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: DeleteConnectMyComputerNodeResponse) => void): grpc.ClientUnaryCall;
|
||||
deleteConnectMyComputerNode(input: DeleteConnectMyComputerNodeRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: DeleteConnectMyComputerNodeResponse) => void): grpc.ClientUnaryCall;
|
||||
deleteConnectMyComputerNode(input: DeleteConnectMyComputerNodeRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: DeleteConnectMyComputerNodeResponse) => void): grpc.ClientUnaryCall;
|
||||
deleteConnectMyComputerNode(input: DeleteConnectMyComputerNodeRequest, callback: (err: grpc.ServiceError | null, value?: DeleteConnectMyComputerNodeResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetConnectMyComputerNodeName reads the Connect My Computer node name (UUID) from a disk.
|
||||
*
|
||||
* @generated from protobuf rpc: GetConnectMyComputerNodeName(teleport.lib.teleterm.v1.GetConnectMyComputerNodeNameRequest) returns (teleport.lib.teleterm.v1.GetConnectMyComputerNodeNameResponse);
|
||||
*/
|
||||
getConnectMyComputerNodeName(input: GetConnectMyComputerNodeNameRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetConnectMyComputerNodeNameResponse) => void): grpc.ClientUnaryCall;
|
||||
getConnectMyComputerNodeName(input: GetConnectMyComputerNodeNameRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetConnectMyComputerNodeNameResponse) => void): grpc.ClientUnaryCall;
|
||||
getConnectMyComputerNodeName(input: GetConnectMyComputerNodeNameRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetConnectMyComputerNodeNameResponse) => void): grpc.ClientUnaryCall;
|
||||
getConnectMyComputerNodeName(input: GetConnectMyComputerNodeNameRequest, callback: (err: grpc.ServiceError | null, value?: GetConnectMyComputerNodeNameResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* ListUnifiedResources retrieves a paginated list of all resource types displayable in the UI.
|
||||
*
|
||||
* @generated from protobuf rpc: ListUnifiedResources(teleport.lib.teleterm.v1.ListUnifiedResourcesRequest) returns (teleport.lib.teleterm.v1.ListUnifiedResourcesResponse);
|
||||
*/
|
||||
listUnifiedResources(input: ListUnifiedResourcesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListUnifiedResourcesResponse) => void): grpc.ClientUnaryCall;
|
||||
listUnifiedResources(input: ListUnifiedResourcesRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListUnifiedResourcesResponse) => void): grpc.ClientUnaryCall;
|
||||
listUnifiedResources(input: ListUnifiedResourcesRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListUnifiedResourcesResponse) => void): grpc.ClientUnaryCall;
|
||||
listUnifiedResources(input: ListUnifiedResourcesRequest, callback: (err: grpc.ServiceError | null, value?: ListUnifiedResourcesResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* GetUserPreferences returns the combined (root + leaf cluster) preferences for a given user.
|
||||
*
|
||||
* @generated from protobuf rpc: GetUserPreferences(teleport.lib.teleterm.v1.GetUserPreferencesRequest) returns (teleport.lib.teleterm.v1.GetUserPreferencesResponse);
|
||||
*/
|
||||
getUserPreferences(input: GetUserPreferencesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
getUserPreferences(input: GetUserPreferencesRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
getUserPreferences(input: GetUserPreferencesRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
getUserPreferences(input: GetUserPreferencesRequest, callback: (err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* UpdateUserPreferences updates the preferences for a given user in appropriate root and leaf clusters.
|
||||
* Only the properties that are set (cluster_preferences, unified_resource_preferences) will be updated.
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateUserPreferences(teleport.lib.teleterm.v1.UpdateUserPreferencesRequest) returns (teleport.lib.teleterm.v1.UpdateUserPreferencesResponse);
|
||||
*/
|
||||
updateUserPreferences(input: UpdateUserPreferencesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpdateUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
updateUserPreferences(input: UpdateUserPreferencesRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: UpdateUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
updateUserPreferences(input: UpdateUserPreferencesRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpdateUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
updateUserPreferences(input: UpdateUserPreferencesRequest, callback: (err: grpc.ServiceError | null, value?: UpdateUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
/**
|
||||
* TerminalService is used by the Electron app to communicate with the tsh daemon.
|
||||
*
|
||||
* While we aim to preserve backwards compatibility in order to satisfy CI checks and follow the
|
||||
* proto practices used within the company, this service is not guaranteed to be stable across
|
||||
* versions. The packaging process of Teleport Connect ensures that the server and the client use
|
||||
* the same version of the service.
|
||||
*
|
||||
* @generated from protobuf service teleport.lib.teleterm.v1.TerminalService
|
||||
*/
|
||||
export class TerminalServiceClient extends grpc.Client implements ITerminalServiceClient {
|
||||
private readonly _binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions>;
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions> = {}) {
|
||||
super(address, credentials, options);
|
||||
this._binaryOptions = binaryOptions;
|
||||
}
|
||||
/**
|
||||
* UpdateTshdEventsServerAddress lets the Electron app update the address the tsh daemon is
|
||||
* supposed to use when connecting to the tshd events gRPC service. This RPC needs to be made
|
||||
* before any other from this service.
|
||||
*
|
||||
* The service is supposed to return a response from this call only after the client is ready.
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateTshdEventsServerAddress(teleport.lib.teleterm.v1.UpdateTshdEventsServerAddressRequest) returns (teleport.lib.teleterm.v1.UpdateTshdEventsServerAddressResponse);
|
||||
*/
|
||||
updateTshdEventsServerAddress(input: UpdateTshdEventsServerAddressRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpdateTshdEventsServerAddressResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpdateTshdEventsServerAddressResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: UpdateTshdEventsServerAddressResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[0];
|
||||
return this.makeUnaryRequest<UpdateTshdEventsServerAddressRequest, UpdateTshdEventsServerAddressResponse>(`/${TerminalService.typeName}/${method.name}`, (value: UpdateTshdEventsServerAddressRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): UpdateTshdEventsServerAddressResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListRootClusters lists root clusters
|
||||
* Does not include detailed cluster information that would require a network request.
|
||||
*
|
||||
* @generated from protobuf rpc: ListRootClusters(teleport.lib.teleterm.v1.ListClustersRequest) returns (teleport.lib.teleterm.v1.ListClustersResponse);
|
||||
*/
|
||||
listRootClusters(input: ListClustersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListClustersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListClustersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListClustersResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[1];
|
||||
return this.makeUnaryRequest<ListClustersRequest, ListClustersResponse>(`/${TerminalService.typeName}/${method.name}`, (value: ListClustersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListClustersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListLeafClusters lists leaf clusters
|
||||
* Does not include detailed cluster information that would require a network request.
|
||||
*
|
||||
* @generated from protobuf rpc: ListLeafClusters(teleport.lib.teleterm.v1.ListLeafClustersRequest) returns (teleport.lib.teleterm.v1.ListClustersResponse);
|
||||
*/
|
||||
listLeafClusters(input: ListLeafClustersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListClustersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListClustersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListClustersResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[2];
|
||||
return this.makeUnaryRequest<ListLeafClustersRequest, ListClustersResponse>(`/${TerminalService.typeName}/${method.name}`, (value: ListLeafClustersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListClustersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetDatabases returns a filtered and paginated list of databases
|
||||
*
|
||||
* @generated from protobuf rpc: GetDatabases(teleport.lib.teleterm.v1.GetDatabasesRequest) returns (teleport.lib.teleterm.v1.GetDatabasesResponse);
|
||||
*/
|
||||
getDatabases(input: GetDatabasesRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetDatabasesResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetDatabasesResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetDatabasesResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[3];
|
||||
return this.makeUnaryRequest<GetDatabasesRequest, GetDatabasesResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetDatabasesRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetDatabasesResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListDatabaseUsers lists allowed users for the given database based on the role set.
|
||||
*
|
||||
* @generated from protobuf rpc: ListDatabaseUsers(teleport.lib.teleterm.v1.ListDatabaseUsersRequest) returns (teleport.lib.teleterm.v1.ListDatabaseUsersResponse);
|
||||
*/
|
||||
listDatabaseUsers(input: ListDatabaseUsersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListDatabaseUsersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListDatabaseUsersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListDatabaseUsersResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[4];
|
||||
return this.makeUnaryRequest<ListDatabaseUsersRequest, ListDatabaseUsersResponse>(`/${TerminalService.typeName}/${method.name}`, (value: ListDatabaseUsersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListDatabaseUsersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetServers returns filtered, sorted, and paginated servers
|
||||
*
|
||||
* @generated from protobuf rpc: GetServers(teleport.lib.teleterm.v1.GetServersRequest) returns (teleport.lib.teleterm.v1.GetServersResponse);
|
||||
*/
|
||||
getServers(input: GetServersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetServersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetServersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetServersResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[5];
|
||||
return this.makeUnaryRequest<GetServersRequest, GetServersResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetServersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetServersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetAccessRequests lists filtered AccessRequests
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessRequests(teleport.lib.teleterm.v1.GetAccessRequestsRequest) returns (teleport.lib.teleterm.v1.GetAccessRequestsResponse);
|
||||
*/
|
||||
getAccessRequests(input: GetAccessRequestsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessRequestsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessRequestsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetAccessRequestsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[6];
|
||||
return this.makeUnaryRequest<GetAccessRequestsRequest, GetAccessRequestsResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetAccessRequestsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetAccessRequestsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetAccessRequest retreives a single Access Request
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessRequest(teleport.lib.teleterm.v1.GetAccessRequestRequest) returns (teleport.lib.teleterm.v1.GetAccessRequestResponse);
|
||||
*/
|
||||
getAccessRequest(input: GetAccessRequestRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessRequestResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessRequestResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetAccessRequestResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[7];
|
||||
return this.makeUnaryRequest<GetAccessRequestRequest, GetAccessRequestResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetAccessRequestRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetAccessRequestResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* DeleteAccessRequest deletes the access request by id
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessRequest(teleport.lib.teleterm.v1.DeleteAccessRequestRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
deleteAccessRequest(input: DeleteAccessRequestRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: EmptyResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[8];
|
||||
return this.makeUnaryRequest<DeleteAccessRequestRequest, EmptyResponse>(`/${TerminalService.typeName}/${method.name}`, (value: DeleteAccessRequestRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): EmptyResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* CreateAccessRequest creates an access request
|
||||
*
|
||||
* @generated from protobuf rpc: CreateAccessRequest(teleport.lib.teleterm.v1.CreateAccessRequestRequest) returns (teleport.lib.teleterm.v1.CreateAccessRequestResponse);
|
||||
*/
|
||||
createAccessRequest(input: CreateAccessRequestRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateAccessRequestResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateAccessRequestResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: CreateAccessRequestResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[9];
|
||||
return this.makeUnaryRequest<CreateAccessRequestRequest, CreateAccessRequestResponse>(`/${TerminalService.typeName}/${method.name}`, (value: CreateAccessRequestRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): CreateAccessRequestResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ReviewAccessRequest submits a review for an Access Request
|
||||
*
|
||||
* @generated from protobuf rpc: ReviewAccessRequest(teleport.lib.teleterm.v1.ReviewAccessRequestRequest) returns (teleport.lib.teleterm.v1.ReviewAccessRequestResponse);
|
||||
*/
|
||||
reviewAccessRequest(input: ReviewAccessRequestRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ReviewAccessRequestResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ReviewAccessRequestResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ReviewAccessRequestResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[10];
|
||||
return this.makeUnaryRequest<ReviewAccessRequestRequest, ReviewAccessRequestResponse>(`/${TerminalService.typeName}/${method.name}`, (value: ReviewAccessRequestRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ReviewAccessRequestResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetRequestableRoles gets all requestable roles
|
||||
*
|
||||
* @generated from protobuf rpc: GetRequestableRoles(teleport.lib.teleterm.v1.GetRequestableRolesRequest) returns (teleport.lib.teleterm.v1.GetRequestableRolesResponse);
|
||||
*/
|
||||
getRequestableRoles(input: GetRequestableRolesRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetRequestableRolesResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetRequestableRolesResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetRequestableRolesResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[11];
|
||||
return this.makeUnaryRequest<GetRequestableRolesRequest, GetRequestableRolesResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetRequestableRolesRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetRequestableRolesResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* AssumeRole assumes the role of the given access request
|
||||
*
|
||||
* @generated from protobuf rpc: AssumeRole(teleport.lib.teleterm.v1.AssumeRoleRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
assumeRole(input: AssumeRoleRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: EmptyResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[12];
|
||||
return this.makeUnaryRequest<AssumeRoleRequest, EmptyResponse>(`/${TerminalService.typeName}/${method.name}`, (value: AssumeRoleRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): EmptyResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* PromoteAccessRequest promotes an access request to an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: PromoteAccessRequest(teleport.lib.teleterm.v1.PromoteAccessRequestRequest) returns (teleport.lib.teleterm.v1.PromoteAccessRequestResponse);
|
||||
*/
|
||||
promoteAccessRequest(input: PromoteAccessRequestRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: PromoteAccessRequestResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: PromoteAccessRequestResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: PromoteAccessRequestResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[13];
|
||||
return this.makeUnaryRequest<PromoteAccessRequestRequest, PromoteAccessRequestResponse>(`/${TerminalService.typeName}/${method.name}`, (value: PromoteAccessRequestRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): PromoteAccessRequestResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetSuggestedAccessLists returns suggested access lists for an access request.
|
||||
*
|
||||
* @generated from protobuf rpc: GetSuggestedAccessLists(teleport.lib.teleterm.v1.GetSuggestedAccessListsRequest) returns (teleport.lib.teleterm.v1.GetSuggestedAccessListsResponse);
|
||||
*/
|
||||
getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[14];
|
||||
return this.makeUnaryRequest<GetSuggestedAccessListsRequest, GetSuggestedAccessListsResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetSuggestedAccessListsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetSuggestedAccessListsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetKubes returns filtered, sorted, and paginated kubes
|
||||
*
|
||||
* @generated from protobuf rpc: GetKubes(teleport.lib.teleterm.v1.GetKubesRequest) returns (teleport.lib.teleterm.v1.GetKubesResponse);
|
||||
*/
|
||||
getKubes(input: GetKubesRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetKubesResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetKubesResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetKubesResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[15];
|
||||
return this.makeUnaryRequest<GetKubesRequest, GetKubesResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetKubesRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetKubesResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetApps returns a filtered and paginated list of apps.
|
||||
*
|
||||
* @generated from protobuf rpc: GetApps(teleport.lib.teleterm.v1.GetAppsRequest) returns (teleport.lib.teleterm.v1.GetAppsResponse);
|
||||
*/
|
||||
getApps(input: GetAppsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAppsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAppsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetAppsResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[16];
|
||||
return this.makeUnaryRequest<GetAppsRequest, GetAppsResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetAppsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetAppsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* AddCluster adds a cluster to profile
|
||||
*
|
||||
* @generated from protobuf rpc: AddCluster(teleport.lib.teleterm.v1.AddClusterRequest) returns (teleport.lib.teleterm.v1.Cluster);
|
||||
*/
|
||||
addCluster(input: AddClusterRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Cluster) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Cluster) => void), callback?: ((err: grpc.ServiceError | null, value?: Cluster) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[17];
|
||||
return this.makeUnaryRequest<AddClusterRequest, Cluster>(`/${TerminalService.typeName}/${method.name}`, (value: AddClusterRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Cluster => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* RemoveCluster removes a cluster from profile
|
||||
*
|
||||
* @generated from protobuf rpc: RemoveCluster(teleport.lib.teleterm.v1.RemoveClusterRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
removeCluster(input: RemoveClusterRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: EmptyResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[18];
|
||||
return this.makeUnaryRequest<RemoveClusterRequest, EmptyResponse>(`/${TerminalService.typeName}/${method.name}`, (value: RemoveClusterRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): EmptyResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListGateways lists gateways
|
||||
*
|
||||
* @generated from protobuf rpc: ListGateways(teleport.lib.teleterm.v1.ListGatewaysRequest) returns (teleport.lib.teleterm.v1.ListGatewaysResponse);
|
||||
*/
|
||||
listGateways(input: ListGatewaysRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListGatewaysResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListGatewaysResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListGatewaysResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[19];
|
||||
return this.makeUnaryRequest<ListGatewaysRequest, ListGatewaysResponse>(`/${TerminalService.typeName}/${method.name}`, (value: ListGatewaysRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListGatewaysResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* CreateGateway creates a gateway
|
||||
*
|
||||
* @generated from protobuf rpc: CreateGateway(teleport.lib.teleterm.v1.CreateGatewayRequest) returns (teleport.lib.teleterm.v1.Gateway);
|
||||
*/
|
||||
createGateway(input: CreateGatewayRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Gateway) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Gateway) => void), callback?: ((err: grpc.ServiceError | null, value?: Gateway) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[20];
|
||||
return this.makeUnaryRequest<CreateGatewayRequest, Gateway>(`/${TerminalService.typeName}/${method.name}`, (value: CreateGatewayRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Gateway => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* RemoveGateway removes a gateway
|
||||
*
|
||||
* @generated from protobuf rpc: RemoveGateway(teleport.lib.teleterm.v1.RemoveGatewayRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
removeGateway(input: RemoveGatewayRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: EmptyResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[21];
|
||||
return this.makeUnaryRequest<RemoveGatewayRequest, EmptyResponse>(`/${TerminalService.typeName}/${method.name}`, (value: RemoveGatewayRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): EmptyResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* SetGatewayTargetSubresourceName changes the TargetSubresourceName field of gateway.Gateway
|
||||
* and returns the updated version of gateway.Gateway.
|
||||
*
|
||||
* In Connect this is used to update the db name of a db connection along with the CLI command.
|
||||
*
|
||||
* @generated from protobuf rpc: SetGatewayTargetSubresourceName(teleport.lib.teleterm.v1.SetGatewayTargetSubresourceNameRequest) returns (teleport.lib.teleterm.v1.Gateway);
|
||||
*/
|
||||
setGatewayTargetSubresourceName(input: SetGatewayTargetSubresourceNameRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Gateway) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Gateway) => void), callback?: ((err: grpc.ServiceError | null, value?: Gateway) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[22];
|
||||
return this.makeUnaryRequest<SetGatewayTargetSubresourceNameRequest, Gateway>(`/${TerminalService.typeName}/${method.name}`, (value: SetGatewayTargetSubresourceNameRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Gateway => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* SetGatewayLocalPort starts a new gateway on the new port, stops the old gateway and then
|
||||
* assigns the URI of the old gateway to the new one. It does so without fetching a new db cert.
|
||||
*
|
||||
* @generated from protobuf rpc: SetGatewayLocalPort(teleport.lib.teleterm.v1.SetGatewayLocalPortRequest) returns (teleport.lib.teleterm.v1.Gateway);
|
||||
*/
|
||||
setGatewayLocalPort(input: SetGatewayLocalPortRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Gateway) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Gateway) => void), callback?: ((err: grpc.ServiceError | null, value?: Gateway) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[23];
|
||||
return this.makeUnaryRequest<SetGatewayLocalPortRequest, Gateway>(`/${TerminalService.typeName}/${method.name}`, (value: SetGatewayLocalPortRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Gateway => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetAuthSettings returns cluster auth settigns
|
||||
*
|
||||
* @generated from protobuf rpc: GetAuthSettings(teleport.lib.teleterm.v1.GetAuthSettingsRequest) returns (teleport.lib.teleterm.v1.AuthSettings);
|
||||
*/
|
||||
getAuthSettings(input: GetAuthSettingsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AuthSettings) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AuthSettings) => void), callback?: ((err: grpc.ServiceError | null, value?: AuthSettings) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[24];
|
||||
return this.makeUnaryRequest<GetAuthSettingsRequest, AuthSettings>(`/${TerminalService.typeName}/${method.name}`, (value: GetAuthSettingsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): AuthSettings => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetCluster returns cluster. Makes a network request and includes detailed
|
||||
* information about enterprise features availabed on the connected auth server
|
||||
*
|
||||
* @generated from protobuf rpc: GetCluster(teleport.lib.teleterm.v1.GetClusterRequest) returns (teleport.lib.teleterm.v1.Cluster);
|
||||
*/
|
||||
getCluster(input: GetClusterRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Cluster) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Cluster) => void), callback?: ((err: grpc.ServiceError | null, value?: Cluster) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[25];
|
||||
return this.makeUnaryRequest<GetClusterRequest, Cluster>(`/${TerminalService.typeName}/${method.name}`, (value: GetClusterRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Cluster => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* Login logs in a user to a cluster
|
||||
*
|
||||
* @generated from protobuf rpc: Login(teleport.lib.teleterm.v1.LoginRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
login(input: LoginRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: EmptyResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[26];
|
||||
return this.makeUnaryRequest<LoginRequest, EmptyResponse>(`/${TerminalService.typeName}/${method.name}`, (value: LoginRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): EmptyResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* LoginPasswordless logs in a user to a cluster passwordlessly.
|
||||
*
|
||||
* The RPC is streaming both ways and the message sequence example for hardware keys are:
|
||||
* (-> means client-to-server, <- means server-to-client)
|
||||
*
|
||||
* Hardware keys:
|
||||
* -> Init
|
||||
* <- Send PasswordlessPrompt enum TAP to choose a device
|
||||
* -> Receive TAP device response
|
||||
* <- Send PasswordlessPrompt enum PIN
|
||||
* -> Receive PIN response
|
||||
* <- Send PasswordlessPrompt enum RETAP to confirm
|
||||
* -> Receive RETAP device response
|
||||
* <- Send list of credentials (e.g. usernames) associated with device
|
||||
* -> Receive the index number associated with the selected credential in list
|
||||
* <- End
|
||||
*
|
||||
* @generated from protobuf rpc: LoginPasswordless(stream teleport.lib.teleterm.v1.LoginPasswordlessRequest) returns (stream teleport.lib.teleterm.v1.LoginPasswordlessResponse);
|
||||
*/
|
||||
loginPasswordless(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream<LoginPasswordlessRequest, LoginPasswordlessResponse> {
|
||||
const method = TerminalService.methods[27];
|
||||
return this.makeBidiStreamRequest<LoginPasswordlessRequest, LoginPasswordlessResponse>(`/${TerminalService.typeName}/${method.name}`, (value: LoginPasswordlessRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): LoginPasswordlessResponse => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options);
|
||||
}
|
||||
/**
|
||||
* ClusterLogin logs out a user from cluster
|
||||
*
|
||||
* @generated from protobuf rpc: Logout(teleport.lib.teleterm.v1.LogoutRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
logout(input: LogoutRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: EmptyResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[28];
|
||||
return this.makeUnaryRequest<LogoutRequest, EmptyResponse>(`/${TerminalService.typeName}/${method.name}`, (value: LogoutRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): EmptyResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* TransferFile sends a request to download/upload a file
|
||||
*
|
||||
* @generated from protobuf rpc: TransferFile(teleport.lib.teleterm.v1.FileTransferRequest) returns (stream teleport.lib.teleterm.v1.FileTransferProgress);
|
||||
*/
|
||||
transferFile(input: FileTransferRequest, metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientReadableStream<FileTransferProgress> {
|
||||
const method = TerminalService.methods[29];
|
||||
return this.makeServerStreamRequest<FileTransferRequest, FileTransferProgress>(`/${TerminalService.typeName}/${method.name}`, (value: FileTransferRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): FileTransferProgress => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), options);
|
||||
}
|
||||
/**
|
||||
* ReportUsageEvent allows to send usage events that are then anonymized and forwarded to prehog
|
||||
*
|
||||
* @generated from protobuf rpc: ReportUsageEvent(teleport.lib.teleterm.v1.ReportUsageEventRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
reportUsageEvent(input: ReportUsageEventRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: EmptyResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: EmptyResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[30];
|
||||
return this.makeUnaryRequest<ReportUsageEventRequest, EmptyResponse>(`/${TerminalService.typeName}/${method.name}`, (value: ReportUsageEventRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): EmptyResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* UpdateHeadlessAuthenticationState updates a headless authentication resource's state.
|
||||
* An MFA challenge will be prompted when approving a headless authentication.
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateHeadlessAuthenticationState(teleport.lib.teleterm.v1.UpdateHeadlessAuthenticationStateRequest) returns (teleport.lib.teleterm.v1.UpdateHeadlessAuthenticationStateResponse);
|
||||
*/
|
||||
updateHeadlessAuthenticationState(input: UpdateHeadlessAuthenticationStateRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpdateHeadlessAuthenticationStateResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpdateHeadlessAuthenticationStateResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: UpdateHeadlessAuthenticationStateResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[31];
|
||||
return this.makeUnaryRequest<UpdateHeadlessAuthenticationStateRequest, UpdateHeadlessAuthenticationStateResponse>(`/${TerminalService.typeName}/${method.name}`, (value: UpdateHeadlessAuthenticationStateRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): UpdateHeadlessAuthenticationStateResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* CreateConnectMyComputerRole creates a role which allows access to nodes with the label
|
||||
* teleport.dev/connect-my-computer/owner: <cluster user> and allows logging in to those nodes as
|
||||
* the current system user.
|
||||
*
|
||||
* @generated from protobuf rpc: CreateConnectMyComputerRole(teleport.lib.teleterm.v1.CreateConnectMyComputerRoleRequest) returns (teleport.lib.teleterm.v1.CreateConnectMyComputerRoleResponse);
|
||||
*/
|
||||
createConnectMyComputerRole(input: CreateConnectMyComputerRoleRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateConnectMyComputerRoleResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateConnectMyComputerRoleResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: CreateConnectMyComputerRoleResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[32];
|
||||
return this.makeUnaryRequest<CreateConnectMyComputerRoleRequest, CreateConnectMyComputerRoleResponse>(`/${TerminalService.typeName}/${method.name}`, (value: CreateConnectMyComputerRoleRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): CreateConnectMyComputerRoleResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* CreateConnectMyComputerNodeToken creates a node join token that is valid for 5 minutes
|
||||
*
|
||||
* @generated from protobuf rpc: CreateConnectMyComputerNodeToken(teleport.lib.teleterm.v1.CreateConnectMyComputerNodeTokenRequest) returns (teleport.lib.teleterm.v1.CreateConnectMyComputerNodeTokenResponse);
|
||||
*/
|
||||
createConnectMyComputerNodeToken(input: CreateConnectMyComputerNodeTokenRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateConnectMyComputerNodeTokenResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateConnectMyComputerNodeTokenResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: CreateConnectMyComputerNodeTokenResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[33];
|
||||
return this.makeUnaryRequest<CreateConnectMyComputerNodeTokenRequest, CreateConnectMyComputerNodeTokenResponse>(`/${TerminalService.typeName}/${method.name}`, (value: CreateConnectMyComputerNodeTokenRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): CreateConnectMyComputerNodeTokenResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* DeleteConnectMyComputerToken deletes a join token
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteConnectMyComputerToken(teleport.lib.teleterm.v1.DeleteConnectMyComputerTokenRequest) returns (teleport.lib.teleterm.v1.DeleteConnectMyComputerTokenResponse);
|
||||
*/
|
||||
deleteConnectMyComputerToken(input: DeleteConnectMyComputerTokenRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: DeleteConnectMyComputerTokenResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: DeleteConnectMyComputerTokenResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: DeleteConnectMyComputerTokenResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[34];
|
||||
return this.makeUnaryRequest<DeleteConnectMyComputerTokenRequest, DeleteConnectMyComputerTokenResponse>(`/${TerminalService.typeName}/${method.name}`, (value: DeleteConnectMyComputerTokenRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): DeleteConnectMyComputerTokenResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* WaitForConnectMyComputerNodeJoin sets up a watcher and returns a response only after detecting
|
||||
* that the Connect My Computer node for the particular cluster has joined the cluster (the
|
||||
* OpPut event).
|
||||
*
|
||||
* This RPC times out by itself after a minute to prevent the request from hanging forever, in
|
||||
* case the client didn't set a deadline or doesn't abort the request.
|
||||
*
|
||||
* @generated from protobuf rpc: WaitForConnectMyComputerNodeJoin(teleport.lib.teleterm.v1.WaitForConnectMyComputerNodeJoinRequest) returns (teleport.lib.teleterm.v1.WaitForConnectMyComputerNodeJoinResponse);
|
||||
*/
|
||||
waitForConnectMyComputerNodeJoin(input: WaitForConnectMyComputerNodeJoinRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: WaitForConnectMyComputerNodeJoinResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: WaitForConnectMyComputerNodeJoinResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: WaitForConnectMyComputerNodeJoinResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[35];
|
||||
return this.makeUnaryRequest<WaitForConnectMyComputerNodeJoinRequest, WaitForConnectMyComputerNodeJoinResponse>(`/${TerminalService.typeName}/${method.name}`, (value: WaitForConnectMyComputerNodeJoinRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): WaitForConnectMyComputerNodeJoinResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* DeleteConnectMyComputerNode deletes the Connect My Computer node.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteConnectMyComputerNode(teleport.lib.teleterm.v1.DeleteConnectMyComputerNodeRequest) returns (teleport.lib.teleterm.v1.DeleteConnectMyComputerNodeResponse);
|
||||
*/
|
||||
deleteConnectMyComputerNode(input: DeleteConnectMyComputerNodeRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: DeleteConnectMyComputerNodeResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: DeleteConnectMyComputerNodeResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: DeleteConnectMyComputerNodeResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[36];
|
||||
return this.makeUnaryRequest<DeleteConnectMyComputerNodeRequest, DeleteConnectMyComputerNodeResponse>(`/${TerminalService.typeName}/${method.name}`, (value: DeleteConnectMyComputerNodeRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): DeleteConnectMyComputerNodeResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetConnectMyComputerNodeName reads the Connect My Computer node name (UUID) from a disk.
|
||||
*
|
||||
* @generated from protobuf rpc: GetConnectMyComputerNodeName(teleport.lib.teleterm.v1.GetConnectMyComputerNodeNameRequest) returns (teleport.lib.teleterm.v1.GetConnectMyComputerNodeNameResponse);
|
||||
*/
|
||||
getConnectMyComputerNodeName(input: GetConnectMyComputerNodeNameRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetConnectMyComputerNodeNameResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetConnectMyComputerNodeNameResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetConnectMyComputerNodeNameResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[37];
|
||||
return this.makeUnaryRequest<GetConnectMyComputerNodeNameRequest, GetConnectMyComputerNodeNameResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetConnectMyComputerNodeNameRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetConnectMyComputerNodeNameResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* ListUnifiedResources retrieves a paginated list of all resource types displayable in the UI.
|
||||
*
|
||||
* @generated from protobuf rpc: ListUnifiedResources(teleport.lib.teleterm.v1.ListUnifiedResourcesRequest) returns (teleport.lib.teleterm.v1.ListUnifiedResourcesResponse);
|
||||
*/
|
||||
listUnifiedResources(input: ListUnifiedResourcesRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListUnifiedResourcesResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListUnifiedResourcesResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListUnifiedResourcesResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[38];
|
||||
return this.makeUnaryRequest<ListUnifiedResourcesRequest, ListUnifiedResourcesResponse>(`/${TerminalService.typeName}/${method.name}`, (value: ListUnifiedResourcesRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListUnifiedResourcesResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* GetUserPreferences returns the combined (root + leaf cluster) preferences for a given user.
|
||||
*
|
||||
* @generated from protobuf rpc: GetUserPreferences(teleport.lib.teleterm.v1.GetUserPreferencesRequest) returns (teleport.lib.teleterm.v1.GetUserPreferencesResponse);
|
||||
*/
|
||||
getUserPreferences(input: GetUserPreferencesRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[39];
|
||||
return this.makeUnaryRequest<GetUserPreferencesRequest, GetUserPreferencesResponse>(`/${TerminalService.typeName}/${method.name}`, (value: GetUserPreferencesRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetUserPreferencesResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* UpdateUserPreferences updates the preferences for a given user in appropriate root and leaf clusters.
|
||||
* Only the properties that are set (cluster_preferences, unified_resource_preferences) will be updated.
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateUserPreferences(teleport.lib.teleterm.v1.UpdateUserPreferencesRequest) returns (teleport.lib.teleterm.v1.UpdateUserPreferencesResponse);
|
||||
*/
|
||||
updateUserPreferences(input: UpdateUserPreferencesRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpdateUserPreferencesResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpdateUserPreferencesResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: UpdateUserPreferencesResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TerminalService.methods[40];
|
||||
return this.makeUnaryRequest<UpdateUserPreferencesRequest, UpdateUserPreferencesResponse>(`/${TerminalService.typeName}/${method.name}`, (value: UpdateUserPreferencesRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): UpdateUserPreferencesResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,812 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/service.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { UpdateUserPreferencesResponse } from "./service_pb";
|
||||
import { UpdateUserPreferencesRequest } from "./service_pb";
|
||||
import { GetUserPreferencesResponse } from "./service_pb";
|
||||
import { GetUserPreferencesRequest } from "./service_pb";
|
||||
import { ListUnifiedResourcesResponse } from "./service_pb";
|
||||
import { ListUnifiedResourcesRequest } from "./service_pb";
|
||||
import { GetConnectMyComputerNodeNameResponse } from "./service_pb";
|
||||
import { GetConnectMyComputerNodeNameRequest } from "./service_pb";
|
||||
import { DeleteConnectMyComputerNodeResponse } from "./service_pb";
|
||||
import { DeleteConnectMyComputerNodeRequest } from "./service_pb";
|
||||
import { WaitForConnectMyComputerNodeJoinResponse } from "./service_pb";
|
||||
import { WaitForConnectMyComputerNodeJoinRequest } from "./service_pb";
|
||||
import { DeleteConnectMyComputerTokenResponse } from "./service_pb";
|
||||
import { DeleteConnectMyComputerTokenRequest } from "./service_pb";
|
||||
import { CreateConnectMyComputerNodeTokenResponse } from "./service_pb";
|
||||
import { CreateConnectMyComputerNodeTokenRequest } from "./service_pb";
|
||||
import { CreateConnectMyComputerRoleResponse } from "./service_pb";
|
||||
import { CreateConnectMyComputerRoleRequest } from "./service_pb";
|
||||
import { UpdateHeadlessAuthenticationStateResponse } from "./service_pb";
|
||||
import { UpdateHeadlessAuthenticationStateRequest } from "./service_pb";
|
||||
import { ReportUsageEventRequest } from "./usage_events_pb";
|
||||
import { FileTransferProgress } from "./service_pb";
|
||||
import { FileTransferRequest } from "./service_pb";
|
||||
import { LogoutRequest } from "./service_pb";
|
||||
import { LoginPasswordlessResponse } from "./service_pb";
|
||||
import { LoginPasswordlessRequest } from "./service_pb";
|
||||
import { LoginRequest } from "./service_pb";
|
||||
import { GetClusterRequest } from "./service_pb";
|
||||
import { AuthSettings } from "./auth_settings_pb";
|
||||
import { GetAuthSettingsRequest } from "./service_pb";
|
||||
import { SetGatewayLocalPortRequest } from "./service_pb";
|
||||
import { SetGatewayTargetSubresourceNameRequest } from "./service_pb";
|
||||
import { RemoveGatewayRequest } from "./service_pb";
|
||||
import { Gateway } from "./gateway_pb";
|
||||
import { CreateGatewayRequest } from "./service_pb";
|
||||
import { ListGatewaysResponse } from "./service_pb";
|
||||
import { ListGatewaysRequest } from "./service_pb";
|
||||
import { RemoveClusterRequest } from "./service_pb";
|
||||
import { Cluster } from "./cluster_pb";
|
||||
import { AddClusterRequest } from "./service_pb";
|
||||
import { GetAppsResponse } from "./service_pb";
|
||||
import { GetAppsRequest } from "./service_pb";
|
||||
import { GetKubesResponse } from "./service_pb";
|
||||
import { GetKubesRequest } from "./service_pb";
|
||||
import { GetSuggestedAccessListsResponse } from "./service_pb";
|
||||
import { GetSuggestedAccessListsRequest } from "./service_pb";
|
||||
import { PromoteAccessRequestResponse } from "./service_pb";
|
||||
import { PromoteAccessRequestRequest } from "./service_pb";
|
||||
import { AssumeRoleRequest } from "./service_pb";
|
||||
import { GetRequestableRolesResponse } from "./service_pb";
|
||||
import { GetRequestableRolesRequest } from "./service_pb";
|
||||
import { ReviewAccessRequestResponse } from "./service_pb";
|
||||
import { ReviewAccessRequestRequest } from "./service_pb";
|
||||
import { CreateAccessRequestResponse } from "./service_pb";
|
||||
import { CreateAccessRequestRequest } from "./service_pb";
|
||||
import { EmptyResponse } from "./service_pb";
|
||||
import { DeleteAccessRequestRequest } from "./service_pb";
|
||||
import { GetAccessRequestResponse } from "./service_pb";
|
||||
import { GetAccessRequestRequest } from "./service_pb";
|
||||
import { GetAccessRequestsResponse } from "./service_pb";
|
||||
import { GetAccessRequestsRequest } from "./service_pb";
|
||||
import { GetServersResponse } from "./service_pb";
|
||||
import { GetServersRequest } from "./service_pb";
|
||||
import { ListDatabaseUsersResponse } from "./service_pb";
|
||||
import { ListDatabaseUsersRequest } from "./service_pb";
|
||||
import { GetDatabasesResponse } from "./service_pb";
|
||||
import { GetDatabasesRequest } from "./service_pb";
|
||||
import { ListLeafClustersRequest } from "./service_pb";
|
||||
import { ListClustersResponse } from "./service_pb";
|
||||
import { ListClustersRequest } from "./service_pb";
|
||||
import { UpdateTshdEventsServerAddressResponse } from "./service_pb";
|
||||
import { UpdateTshdEventsServerAddressRequest } from "./service_pb";
|
||||
import type * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* TerminalService is used by the Electron app to communicate with the tsh daemon.
|
||||
*
|
||||
* While we aim to preserve backwards compatibility in order to satisfy CI checks and follow the
|
||||
* proto practices used within the company, this service is not guaranteed to be stable across
|
||||
* versions. The packaging process of Teleport Connect ensures that the server and the client use
|
||||
* the same version of the service.
|
||||
*
|
||||
* @generated from protobuf service teleport.lib.teleterm.v1.TerminalService
|
||||
*/
|
||||
export interface ITerminalService extends grpc.UntypedServiceImplementation {
|
||||
/**
|
||||
* UpdateTshdEventsServerAddress lets the Electron app update the address the tsh daemon is
|
||||
* supposed to use when connecting to the tshd events gRPC service. This RPC needs to be made
|
||||
* before any other from this service.
|
||||
*
|
||||
* The service is supposed to return a response from this call only after the client is ready.
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateTshdEventsServerAddress(teleport.lib.teleterm.v1.UpdateTshdEventsServerAddressRequest) returns (teleport.lib.teleterm.v1.UpdateTshdEventsServerAddressResponse);
|
||||
*/
|
||||
updateTshdEventsServerAddress: grpc.handleUnaryCall<UpdateTshdEventsServerAddressRequest, UpdateTshdEventsServerAddressResponse>;
|
||||
/**
|
||||
* ListRootClusters lists root clusters
|
||||
* Does not include detailed cluster information that would require a network request.
|
||||
*
|
||||
* @generated from protobuf rpc: ListRootClusters(teleport.lib.teleterm.v1.ListClustersRequest) returns (teleport.lib.teleterm.v1.ListClustersResponse);
|
||||
*/
|
||||
listRootClusters: grpc.handleUnaryCall<ListClustersRequest, ListClustersResponse>;
|
||||
/**
|
||||
* ListLeafClusters lists leaf clusters
|
||||
* Does not include detailed cluster information that would require a network request.
|
||||
*
|
||||
* @generated from protobuf rpc: ListLeafClusters(teleport.lib.teleterm.v1.ListLeafClustersRequest) returns (teleport.lib.teleterm.v1.ListClustersResponse);
|
||||
*/
|
||||
listLeafClusters: grpc.handleUnaryCall<ListLeafClustersRequest, ListClustersResponse>;
|
||||
/**
|
||||
* GetDatabases returns a filtered and paginated list of databases
|
||||
*
|
||||
* @generated from protobuf rpc: GetDatabases(teleport.lib.teleterm.v1.GetDatabasesRequest) returns (teleport.lib.teleterm.v1.GetDatabasesResponse);
|
||||
*/
|
||||
getDatabases: grpc.handleUnaryCall<GetDatabasesRequest, GetDatabasesResponse>;
|
||||
/**
|
||||
* ListDatabaseUsers lists allowed users for the given database based on the role set.
|
||||
*
|
||||
* @generated from protobuf rpc: ListDatabaseUsers(teleport.lib.teleterm.v1.ListDatabaseUsersRequest) returns (teleport.lib.teleterm.v1.ListDatabaseUsersResponse);
|
||||
*/
|
||||
listDatabaseUsers: grpc.handleUnaryCall<ListDatabaseUsersRequest, ListDatabaseUsersResponse>;
|
||||
/**
|
||||
* GetServers returns filtered, sorted, and paginated servers
|
||||
*
|
||||
* @generated from protobuf rpc: GetServers(teleport.lib.teleterm.v1.GetServersRequest) returns (teleport.lib.teleterm.v1.GetServersResponse);
|
||||
*/
|
||||
getServers: grpc.handleUnaryCall<GetServersRequest, GetServersResponse>;
|
||||
/**
|
||||
* GetAccessRequests lists filtered AccessRequests
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessRequests(teleport.lib.teleterm.v1.GetAccessRequestsRequest) returns (teleport.lib.teleterm.v1.GetAccessRequestsResponse);
|
||||
*/
|
||||
getAccessRequests: grpc.handleUnaryCall<GetAccessRequestsRequest, GetAccessRequestsResponse>;
|
||||
/**
|
||||
* GetAccessRequest retreives a single Access Request
|
||||
*
|
||||
* @generated from protobuf rpc: GetAccessRequest(teleport.lib.teleterm.v1.GetAccessRequestRequest) returns (teleport.lib.teleterm.v1.GetAccessRequestResponse);
|
||||
*/
|
||||
getAccessRequest: grpc.handleUnaryCall<GetAccessRequestRequest, GetAccessRequestResponse>;
|
||||
/**
|
||||
* DeleteAccessRequest deletes the access request by id
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAccessRequest(teleport.lib.teleterm.v1.DeleteAccessRequestRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
deleteAccessRequest: grpc.handleUnaryCall<DeleteAccessRequestRequest, EmptyResponse>;
|
||||
/**
|
||||
* CreateAccessRequest creates an access request
|
||||
*
|
||||
* @generated from protobuf rpc: CreateAccessRequest(teleport.lib.teleterm.v1.CreateAccessRequestRequest) returns (teleport.lib.teleterm.v1.CreateAccessRequestResponse);
|
||||
*/
|
||||
createAccessRequest: grpc.handleUnaryCall<CreateAccessRequestRequest, CreateAccessRequestResponse>;
|
||||
/**
|
||||
* ReviewAccessRequest submits a review for an Access Request
|
||||
*
|
||||
* @generated from protobuf rpc: ReviewAccessRequest(teleport.lib.teleterm.v1.ReviewAccessRequestRequest) returns (teleport.lib.teleterm.v1.ReviewAccessRequestResponse);
|
||||
*/
|
||||
reviewAccessRequest: grpc.handleUnaryCall<ReviewAccessRequestRequest, ReviewAccessRequestResponse>;
|
||||
/**
|
||||
* GetRequestableRoles gets all requestable roles
|
||||
*
|
||||
* @generated from protobuf rpc: GetRequestableRoles(teleport.lib.teleterm.v1.GetRequestableRolesRequest) returns (teleport.lib.teleterm.v1.GetRequestableRolesResponse);
|
||||
*/
|
||||
getRequestableRoles: grpc.handleUnaryCall<GetRequestableRolesRequest, GetRequestableRolesResponse>;
|
||||
/**
|
||||
* AssumeRole assumes the role of the given access request
|
||||
*
|
||||
* @generated from protobuf rpc: AssumeRole(teleport.lib.teleterm.v1.AssumeRoleRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
assumeRole: grpc.handleUnaryCall<AssumeRoleRequest, EmptyResponse>;
|
||||
/**
|
||||
* PromoteAccessRequest promotes an access request to an access list.
|
||||
*
|
||||
* @generated from protobuf rpc: PromoteAccessRequest(teleport.lib.teleterm.v1.PromoteAccessRequestRequest) returns (teleport.lib.teleterm.v1.PromoteAccessRequestResponse);
|
||||
*/
|
||||
promoteAccessRequest: grpc.handleUnaryCall<PromoteAccessRequestRequest, PromoteAccessRequestResponse>;
|
||||
/**
|
||||
* GetSuggestedAccessLists returns suggested access lists for an access request.
|
||||
*
|
||||
* @generated from protobuf rpc: GetSuggestedAccessLists(teleport.lib.teleterm.v1.GetSuggestedAccessListsRequest) returns (teleport.lib.teleterm.v1.GetSuggestedAccessListsResponse);
|
||||
*/
|
||||
getSuggestedAccessLists: grpc.handleUnaryCall<GetSuggestedAccessListsRequest, GetSuggestedAccessListsResponse>;
|
||||
/**
|
||||
* GetKubes returns filtered, sorted, and paginated kubes
|
||||
*
|
||||
* @generated from protobuf rpc: GetKubes(teleport.lib.teleterm.v1.GetKubesRequest) returns (teleport.lib.teleterm.v1.GetKubesResponse);
|
||||
*/
|
||||
getKubes: grpc.handleUnaryCall<GetKubesRequest, GetKubesResponse>;
|
||||
/**
|
||||
* GetApps returns a filtered and paginated list of apps.
|
||||
*
|
||||
* @generated from protobuf rpc: GetApps(teleport.lib.teleterm.v1.GetAppsRequest) returns (teleport.lib.teleterm.v1.GetAppsResponse);
|
||||
*/
|
||||
getApps: grpc.handleUnaryCall<GetAppsRequest, GetAppsResponse>;
|
||||
/**
|
||||
* AddCluster adds a cluster to profile
|
||||
*
|
||||
* @generated from protobuf rpc: AddCluster(teleport.lib.teleterm.v1.AddClusterRequest) returns (teleport.lib.teleterm.v1.Cluster);
|
||||
*/
|
||||
addCluster: grpc.handleUnaryCall<AddClusterRequest, Cluster>;
|
||||
/**
|
||||
* RemoveCluster removes a cluster from profile
|
||||
*
|
||||
* @generated from protobuf rpc: RemoveCluster(teleport.lib.teleterm.v1.RemoveClusterRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
removeCluster: grpc.handleUnaryCall<RemoveClusterRequest, EmptyResponse>;
|
||||
/**
|
||||
* ListGateways lists gateways
|
||||
*
|
||||
* @generated from protobuf rpc: ListGateways(teleport.lib.teleterm.v1.ListGatewaysRequest) returns (teleport.lib.teleterm.v1.ListGatewaysResponse);
|
||||
*/
|
||||
listGateways: grpc.handleUnaryCall<ListGatewaysRequest, ListGatewaysResponse>;
|
||||
/**
|
||||
* CreateGateway creates a gateway
|
||||
*
|
||||
* @generated from protobuf rpc: CreateGateway(teleport.lib.teleterm.v1.CreateGatewayRequest) returns (teleport.lib.teleterm.v1.Gateway);
|
||||
*/
|
||||
createGateway: grpc.handleUnaryCall<CreateGatewayRequest, Gateway>;
|
||||
/**
|
||||
* RemoveGateway removes a gateway
|
||||
*
|
||||
* @generated from protobuf rpc: RemoveGateway(teleport.lib.teleterm.v1.RemoveGatewayRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
removeGateway: grpc.handleUnaryCall<RemoveGatewayRequest, EmptyResponse>;
|
||||
/**
|
||||
* SetGatewayTargetSubresourceName changes the TargetSubresourceName field of gateway.Gateway
|
||||
* and returns the updated version of gateway.Gateway.
|
||||
*
|
||||
* In Connect this is used to update the db name of a db connection along with the CLI command.
|
||||
*
|
||||
* @generated from protobuf rpc: SetGatewayTargetSubresourceName(teleport.lib.teleterm.v1.SetGatewayTargetSubresourceNameRequest) returns (teleport.lib.teleterm.v1.Gateway);
|
||||
*/
|
||||
setGatewayTargetSubresourceName: grpc.handleUnaryCall<SetGatewayTargetSubresourceNameRequest, Gateway>;
|
||||
/**
|
||||
* SetGatewayLocalPort starts a new gateway on the new port, stops the old gateway and then
|
||||
* assigns the URI of the old gateway to the new one. It does so without fetching a new db cert.
|
||||
*
|
||||
* @generated from protobuf rpc: SetGatewayLocalPort(teleport.lib.teleterm.v1.SetGatewayLocalPortRequest) returns (teleport.lib.teleterm.v1.Gateway);
|
||||
*/
|
||||
setGatewayLocalPort: grpc.handleUnaryCall<SetGatewayLocalPortRequest, Gateway>;
|
||||
/**
|
||||
* GetAuthSettings returns cluster auth settigns
|
||||
*
|
||||
* @generated from protobuf rpc: GetAuthSettings(teleport.lib.teleterm.v1.GetAuthSettingsRequest) returns (teleport.lib.teleterm.v1.AuthSettings);
|
||||
*/
|
||||
getAuthSettings: grpc.handleUnaryCall<GetAuthSettingsRequest, AuthSettings>;
|
||||
/**
|
||||
* GetCluster returns cluster. Makes a network request and includes detailed
|
||||
* information about enterprise features availabed on the connected auth server
|
||||
*
|
||||
* @generated from protobuf rpc: GetCluster(teleport.lib.teleterm.v1.GetClusterRequest) returns (teleport.lib.teleterm.v1.Cluster);
|
||||
*/
|
||||
getCluster: grpc.handleUnaryCall<GetClusterRequest, Cluster>;
|
||||
/**
|
||||
* Login logs in a user to a cluster
|
||||
*
|
||||
* @generated from protobuf rpc: Login(teleport.lib.teleterm.v1.LoginRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
login: grpc.handleUnaryCall<LoginRequest, EmptyResponse>;
|
||||
/**
|
||||
* LoginPasswordless logs in a user to a cluster passwordlessly.
|
||||
*
|
||||
* The RPC is streaming both ways and the message sequence example for hardware keys are:
|
||||
* (-> means client-to-server, <- means server-to-client)
|
||||
*
|
||||
* Hardware keys:
|
||||
* -> Init
|
||||
* <- Send PasswordlessPrompt enum TAP to choose a device
|
||||
* -> Receive TAP device response
|
||||
* <- Send PasswordlessPrompt enum PIN
|
||||
* -> Receive PIN response
|
||||
* <- Send PasswordlessPrompt enum RETAP to confirm
|
||||
* -> Receive RETAP device response
|
||||
* <- Send list of credentials (e.g. usernames) associated with device
|
||||
* -> Receive the index number associated with the selected credential in list
|
||||
* <- End
|
||||
*
|
||||
* @generated from protobuf rpc: LoginPasswordless(stream teleport.lib.teleterm.v1.LoginPasswordlessRequest) returns (stream teleport.lib.teleterm.v1.LoginPasswordlessResponse);
|
||||
*/
|
||||
loginPasswordless: grpc.handleBidiStreamingCall<LoginPasswordlessRequest, LoginPasswordlessResponse>;
|
||||
/**
|
||||
* ClusterLogin logs out a user from cluster
|
||||
*
|
||||
* @generated from protobuf rpc: Logout(teleport.lib.teleterm.v1.LogoutRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
logout: grpc.handleUnaryCall<LogoutRequest, EmptyResponse>;
|
||||
/**
|
||||
* TransferFile sends a request to download/upload a file
|
||||
*
|
||||
* @generated from protobuf rpc: TransferFile(teleport.lib.teleterm.v1.FileTransferRequest) returns (stream teleport.lib.teleterm.v1.FileTransferProgress);
|
||||
*/
|
||||
transferFile: grpc.handleServerStreamingCall<FileTransferRequest, FileTransferProgress>;
|
||||
/**
|
||||
* ReportUsageEvent allows to send usage events that are then anonymized and forwarded to prehog
|
||||
*
|
||||
* @generated from protobuf rpc: ReportUsageEvent(teleport.lib.teleterm.v1.ReportUsageEventRequest) returns (teleport.lib.teleterm.v1.EmptyResponse);
|
||||
*/
|
||||
reportUsageEvent: grpc.handleUnaryCall<ReportUsageEventRequest, EmptyResponse>;
|
||||
/**
|
||||
* UpdateHeadlessAuthenticationState updates a headless authentication resource's state.
|
||||
* An MFA challenge will be prompted when approving a headless authentication.
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateHeadlessAuthenticationState(teleport.lib.teleterm.v1.UpdateHeadlessAuthenticationStateRequest) returns (teleport.lib.teleterm.v1.UpdateHeadlessAuthenticationStateResponse);
|
||||
*/
|
||||
updateHeadlessAuthenticationState: grpc.handleUnaryCall<UpdateHeadlessAuthenticationStateRequest, UpdateHeadlessAuthenticationStateResponse>;
|
||||
/**
|
||||
* CreateConnectMyComputerRole creates a role which allows access to nodes with the label
|
||||
* teleport.dev/connect-my-computer/owner: <cluster user> and allows logging in to those nodes as
|
||||
* the current system user.
|
||||
*
|
||||
* @generated from protobuf rpc: CreateConnectMyComputerRole(teleport.lib.teleterm.v1.CreateConnectMyComputerRoleRequest) returns (teleport.lib.teleterm.v1.CreateConnectMyComputerRoleResponse);
|
||||
*/
|
||||
createConnectMyComputerRole: grpc.handleUnaryCall<CreateConnectMyComputerRoleRequest, CreateConnectMyComputerRoleResponse>;
|
||||
/**
|
||||
* CreateConnectMyComputerNodeToken creates a node join token that is valid for 5 minutes
|
||||
*
|
||||
* @generated from protobuf rpc: CreateConnectMyComputerNodeToken(teleport.lib.teleterm.v1.CreateConnectMyComputerNodeTokenRequest) returns (teleport.lib.teleterm.v1.CreateConnectMyComputerNodeTokenResponse);
|
||||
*/
|
||||
createConnectMyComputerNodeToken: grpc.handleUnaryCall<CreateConnectMyComputerNodeTokenRequest, CreateConnectMyComputerNodeTokenResponse>;
|
||||
/**
|
||||
* DeleteConnectMyComputerToken deletes a join token
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteConnectMyComputerToken(teleport.lib.teleterm.v1.DeleteConnectMyComputerTokenRequest) returns (teleport.lib.teleterm.v1.DeleteConnectMyComputerTokenResponse);
|
||||
*/
|
||||
deleteConnectMyComputerToken: grpc.handleUnaryCall<DeleteConnectMyComputerTokenRequest, DeleteConnectMyComputerTokenResponse>;
|
||||
/**
|
||||
* WaitForConnectMyComputerNodeJoin sets up a watcher and returns a response only after detecting
|
||||
* that the Connect My Computer node for the particular cluster has joined the cluster (the
|
||||
* OpPut event).
|
||||
*
|
||||
* This RPC times out by itself after a minute to prevent the request from hanging forever, in
|
||||
* case the client didn't set a deadline or doesn't abort the request.
|
||||
*
|
||||
* @generated from protobuf rpc: WaitForConnectMyComputerNodeJoin(teleport.lib.teleterm.v1.WaitForConnectMyComputerNodeJoinRequest) returns (teleport.lib.teleterm.v1.WaitForConnectMyComputerNodeJoinResponse);
|
||||
*/
|
||||
waitForConnectMyComputerNodeJoin: grpc.handleUnaryCall<WaitForConnectMyComputerNodeJoinRequest, WaitForConnectMyComputerNodeJoinResponse>;
|
||||
/**
|
||||
* DeleteConnectMyComputerNode deletes the Connect My Computer node.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteConnectMyComputerNode(teleport.lib.teleterm.v1.DeleteConnectMyComputerNodeRequest) returns (teleport.lib.teleterm.v1.DeleteConnectMyComputerNodeResponse);
|
||||
*/
|
||||
deleteConnectMyComputerNode: grpc.handleUnaryCall<DeleteConnectMyComputerNodeRequest, DeleteConnectMyComputerNodeResponse>;
|
||||
/**
|
||||
* GetConnectMyComputerNodeName reads the Connect My Computer node name (UUID) from a disk.
|
||||
*
|
||||
* @generated from protobuf rpc: GetConnectMyComputerNodeName(teleport.lib.teleterm.v1.GetConnectMyComputerNodeNameRequest) returns (teleport.lib.teleterm.v1.GetConnectMyComputerNodeNameResponse);
|
||||
*/
|
||||
getConnectMyComputerNodeName: grpc.handleUnaryCall<GetConnectMyComputerNodeNameRequest, GetConnectMyComputerNodeNameResponse>;
|
||||
/**
|
||||
* ListUnifiedResources retrieves a paginated list of all resource types displayable in the UI.
|
||||
*
|
||||
* @generated from protobuf rpc: ListUnifiedResources(teleport.lib.teleterm.v1.ListUnifiedResourcesRequest) returns (teleport.lib.teleterm.v1.ListUnifiedResourcesResponse);
|
||||
*/
|
||||
listUnifiedResources: grpc.handleUnaryCall<ListUnifiedResourcesRequest, ListUnifiedResourcesResponse>;
|
||||
/**
|
||||
* GetUserPreferences returns the combined (root + leaf cluster) preferences for a given user.
|
||||
*
|
||||
* @generated from protobuf rpc: GetUserPreferences(teleport.lib.teleterm.v1.GetUserPreferencesRequest) returns (teleport.lib.teleterm.v1.GetUserPreferencesResponse);
|
||||
*/
|
||||
getUserPreferences: grpc.handleUnaryCall<GetUserPreferencesRequest, GetUserPreferencesResponse>;
|
||||
/**
|
||||
* UpdateUserPreferences updates the preferences for a given user in appropriate root and leaf clusters.
|
||||
* Only the properties that are set (cluster_preferences, unified_resource_preferences) will be updated.
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateUserPreferences(teleport.lib.teleterm.v1.UpdateUserPreferencesRequest) returns (teleport.lib.teleterm.v1.UpdateUserPreferencesResponse);
|
||||
*/
|
||||
updateUserPreferences: grpc.handleUnaryCall<UpdateUserPreferencesRequest, UpdateUserPreferencesResponse>;
|
||||
}
|
||||
/**
|
||||
* @grpc/grpc-js definition for the protobuf service teleport.lib.teleterm.v1.TerminalService.
|
||||
*
|
||||
* Usage: Implement the interface ITerminalService and add to a grpc server.
|
||||
*
|
||||
* ```typescript
|
||||
* const server = new grpc.Server();
|
||||
* const service: ITerminalService = ...
|
||||
* server.addService(terminalServiceDefinition, service);
|
||||
* ```
|
||||
*/
|
||||
export const terminalServiceDefinition: grpc.ServiceDefinition<ITerminalService> = {
|
||||
updateTshdEventsServerAddress: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/UpdateTshdEventsServerAddress",
|
||||
originalName: "UpdateTshdEventsServerAddress",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => UpdateTshdEventsServerAddressResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => UpdateTshdEventsServerAddressRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(UpdateTshdEventsServerAddressResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(UpdateTshdEventsServerAddressRequest.toBinary(value))
|
||||
},
|
||||
listRootClusters: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/ListRootClusters",
|
||||
originalName: "ListRootClusters",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListClustersResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListClustersRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListClustersResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListClustersRequest.toBinary(value))
|
||||
},
|
||||
listLeafClusters: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/ListLeafClusters",
|
||||
originalName: "ListLeafClusters",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListClustersResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListLeafClustersRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListClustersResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListLeafClustersRequest.toBinary(value))
|
||||
},
|
||||
getDatabases: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetDatabases",
|
||||
originalName: "GetDatabases",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetDatabasesResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetDatabasesRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetDatabasesResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetDatabasesRequest.toBinary(value))
|
||||
},
|
||||
listDatabaseUsers: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/ListDatabaseUsers",
|
||||
originalName: "ListDatabaseUsers",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListDatabaseUsersResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListDatabaseUsersRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListDatabaseUsersResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListDatabaseUsersRequest.toBinary(value))
|
||||
},
|
||||
getServers: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetServers",
|
||||
originalName: "GetServers",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetServersResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetServersRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetServersResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetServersRequest.toBinary(value))
|
||||
},
|
||||
getAccessRequests: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetAccessRequests",
|
||||
originalName: "GetAccessRequests",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetAccessRequestsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetAccessRequestsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetAccessRequestsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetAccessRequestsRequest.toBinary(value))
|
||||
},
|
||||
getAccessRequest: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetAccessRequest",
|
||||
originalName: "GetAccessRequest",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetAccessRequestResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetAccessRequestRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetAccessRequestResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetAccessRequestRequest.toBinary(value))
|
||||
},
|
||||
deleteAccessRequest: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/DeleteAccessRequest",
|
||||
originalName: "DeleteAccessRequest",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => EmptyResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => DeleteAccessRequestRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(EmptyResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(DeleteAccessRequestRequest.toBinary(value))
|
||||
},
|
||||
createAccessRequest: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/CreateAccessRequest",
|
||||
originalName: "CreateAccessRequest",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => CreateAccessRequestResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => CreateAccessRequestRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(CreateAccessRequestResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(CreateAccessRequestRequest.toBinary(value))
|
||||
},
|
||||
reviewAccessRequest: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/ReviewAccessRequest",
|
||||
originalName: "ReviewAccessRequest",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ReviewAccessRequestResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ReviewAccessRequestRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ReviewAccessRequestResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ReviewAccessRequestRequest.toBinary(value))
|
||||
},
|
||||
getRequestableRoles: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetRequestableRoles",
|
||||
originalName: "GetRequestableRoles",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetRequestableRolesResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetRequestableRolesRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetRequestableRolesResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetRequestableRolesRequest.toBinary(value))
|
||||
},
|
||||
assumeRole: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/AssumeRole",
|
||||
originalName: "AssumeRole",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => EmptyResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => AssumeRoleRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(EmptyResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(AssumeRoleRequest.toBinary(value))
|
||||
},
|
||||
promoteAccessRequest: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/PromoteAccessRequest",
|
||||
originalName: "PromoteAccessRequest",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => PromoteAccessRequestResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => PromoteAccessRequestRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(PromoteAccessRequestResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(PromoteAccessRequestRequest.toBinary(value))
|
||||
},
|
||||
getSuggestedAccessLists: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetSuggestedAccessLists",
|
||||
originalName: "GetSuggestedAccessLists",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetSuggestedAccessListsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetSuggestedAccessListsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetSuggestedAccessListsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetSuggestedAccessListsRequest.toBinary(value))
|
||||
},
|
||||
getKubes: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetKubes",
|
||||
originalName: "GetKubes",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetKubesResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetKubesRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetKubesResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetKubesRequest.toBinary(value))
|
||||
},
|
||||
getApps: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetApps",
|
||||
originalName: "GetApps",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetAppsResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetAppsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetAppsResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetAppsRequest.toBinary(value))
|
||||
},
|
||||
addCluster: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/AddCluster",
|
||||
originalName: "AddCluster",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Cluster.fromBinary(bytes),
|
||||
requestDeserialize: bytes => AddClusterRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Cluster.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(AddClusterRequest.toBinary(value))
|
||||
},
|
||||
removeCluster: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/RemoveCluster",
|
||||
originalName: "RemoveCluster",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => EmptyResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => RemoveClusterRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(EmptyResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(RemoveClusterRequest.toBinary(value))
|
||||
},
|
||||
listGateways: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/ListGateways",
|
||||
originalName: "ListGateways",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListGatewaysResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListGatewaysRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListGatewaysResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListGatewaysRequest.toBinary(value))
|
||||
},
|
||||
createGateway: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/CreateGateway",
|
||||
originalName: "CreateGateway",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Gateway.fromBinary(bytes),
|
||||
requestDeserialize: bytes => CreateGatewayRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Gateway.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(CreateGatewayRequest.toBinary(value))
|
||||
},
|
||||
removeGateway: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/RemoveGateway",
|
||||
originalName: "RemoveGateway",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => EmptyResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => RemoveGatewayRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(EmptyResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(RemoveGatewayRequest.toBinary(value))
|
||||
},
|
||||
setGatewayTargetSubresourceName: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/SetGatewayTargetSubresourceName",
|
||||
originalName: "SetGatewayTargetSubresourceName",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Gateway.fromBinary(bytes),
|
||||
requestDeserialize: bytes => SetGatewayTargetSubresourceNameRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Gateway.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(SetGatewayTargetSubresourceNameRequest.toBinary(value))
|
||||
},
|
||||
setGatewayLocalPort: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/SetGatewayLocalPort",
|
||||
originalName: "SetGatewayLocalPort",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Gateway.fromBinary(bytes),
|
||||
requestDeserialize: bytes => SetGatewayLocalPortRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Gateway.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(SetGatewayLocalPortRequest.toBinary(value))
|
||||
},
|
||||
getAuthSettings: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetAuthSettings",
|
||||
originalName: "GetAuthSettings",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => AuthSettings.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetAuthSettingsRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(AuthSettings.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetAuthSettingsRequest.toBinary(value))
|
||||
},
|
||||
getCluster: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetCluster",
|
||||
originalName: "GetCluster",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Cluster.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetClusterRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Cluster.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetClusterRequest.toBinary(value))
|
||||
},
|
||||
login: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/Login",
|
||||
originalName: "Login",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => EmptyResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => LoginRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(EmptyResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(LoginRequest.toBinary(value))
|
||||
},
|
||||
loginPasswordless: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/LoginPasswordless",
|
||||
originalName: "LoginPasswordless",
|
||||
requestStream: true,
|
||||
responseStream: true,
|
||||
responseDeserialize: bytes => LoginPasswordlessResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => LoginPasswordlessRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(LoginPasswordlessResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(LoginPasswordlessRequest.toBinary(value))
|
||||
},
|
||||
logout: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/Logout",
|
||||
originalName: "Logout",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => EmptyResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => LogoutRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(EmptyResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(LogoutRequest.toBinary(value))
|
||||
},
|
||||
transferFile: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/TransferFile",
|
||||
originalName: "TransferFile",
|
||||
requestStream: false,
|
||||
responseStream: true,
|
||||
responseDeserialize: bytes => FileTransferProgress.fromBinary(bytes),
|
||||
requestDeserialize: bytes => FileTransferRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(FileTransferProgress.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(FileTransferRequest.toBinary(value))
|
||||
},
|
||||
reportUsageEvent: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/ReportUsageEvent",
|
||||
originalName: "ReportUsageEvent",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => EmptyResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ReportUsageEventRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(EmptyResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ReportUsageEventRequest.toBinary(value))
|
||||
},
|
||||
updateHeadlessAuthenticationState: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/UpdateHeadlessAuthenticationState",
|
||||
originalName: "UpdateHeadlessAuthenticationState",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => UpdateHeadlessAuthenticationStateResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => UpdateHeadlessAuthenticationStateRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(UpdateHeadlessAuthenticationStateResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(UpdateHeadlessAuthenticationStateRequest.toBinary(value))
|
||||
},
|
||||
createConnectMyComputerRole: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/CreateConnectMyComputerRole",
|
||||
originalName: "CreateConnectMyComputerRole",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => CreateConnectMyComputerRoleResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => CreateConnectMyComputerRoleRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(CreateConnectMyComputerRoleResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(CreateConnectMyComputerRoleRequest.toBinary(value))
|
||||
},
|
||||
createConnectMyComputerNodeToken: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/CreateConnectMyComputerNodeToken",
|
||||
originalName: "CreateConnectMyComputerNodeToken",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => CreateConnectMyComputerNodeTokenResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => CreateConnectMyComputerNodeTokenRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(CreateConnectMyComputerNodeTokenResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(CreateConnectMyComputerNodeTokenRequest.toBinary(value))
|
||||
},
|
||||
deleteConnectMyComputerToken: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/DeleteConnectMyComputerToken",
|
||||
originalName: "DeleteConnectMyComputerToken",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => DeleteConnectMyComputerTokenResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => DeleteConnectMyComputerTokenRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(DeleteConnectMyComputerTokenResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(DeleteConnectMyComputerTokenRequest.toBinary(value))
|
||||
},
|
||||
waitForConnectMyComputerNodeJoin: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/WaitForConnectMyComputerNodeJoin",
|
||||
originalName: "WaitForConnectMyComputerNodeJoin",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => WaitForConnectMyComputerNodeJoinResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => WaitForConnectMyComputerNodeJoinRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(WaitForConnectMyComputerNodeJoinResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(WaitForConnectMyComputerNodeJoinRequest.toBinary(value))
|
||||
},
|
||||
deleteConnectMyComputerNode: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/DeleteConnectMyComputerNode",
|
||||
originalName: "DeleteConnectMyComputerNode",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => DeleteConnectMyComputerNodeResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => DeleteConnectMyComputerNodeRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(DeleteConnectMyComputerNodeResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(DeleteConnectMyComputerNodeRequest.toBinary(value))
|
||||
},
|
||||
getConnectMyComputerNodeName: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetConnectMyComputerNodeName",
|
||||
originalName: "GetConnectMyComputerNodeName",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetConnectMyComputerNodeNameResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetConnectMyComputerNodeNameRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetConnectMyComputerNodeNameResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetConnectMyComputerNodeNameRequest.toBinary(value))
|
||||
},
|
||||
listUnifiedResources: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/ListUnifiedResources",
|
||||
originalName: "ListUnifiedResources",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ListUnifiedResourcesResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ListUnifiedResourcesRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ListUnifiedResourcesResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ListUnifiedResourcesRequest.toBinary(value))
|
||||
},
|
||||
getUserPreferences: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/GetUserPreferences",
|
||||
originalName: "GetUserPreferences",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetUserPreferencesResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetUserPreferencesRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetUserPreferencesResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetUserPreferencesRequest.toBinary(value))
|
||||
},
|
||||
updateUserPreferences: {
|
||||
path: "/teleport.lib.teleterm.v1.TerminalService/UpdateUserPreferences",
|
||||
originalName: "UpdateUserPreferences",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => UpdateUserPreferencesResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => UpdateUserPreferencesRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(UpdateUserPreferencesResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(UpdateUserPreferencesRequest.toBinary(value))
|
||||
}
|
||||
};
|
||||
+5454
File diff suppressed because it is too large
Load Diff
+136
@@ -0,0 +1,136 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/tshd_events_service.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { TshdEventsService } from "./tshd_events_service_pb";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { PromptMFAResponse } from "./tshd_events_service_pb";
|
||||
import type { PromptMFARequest } from "./tshd_events_service_pb";
|
||||
import type { SendPendingHeadlessAuthenticationResponse } from "./tshd_events_service_pb";
|
||||
import type { SendPendingHeadlessAuthenticationRequest } from "./tshd_events_service_pb";
|
||||
import type { SendNotificationResponse } from "./tshd_events_service_pb";
|
||||
import type { SendNotificationRequest } from "./tshd_events_service_pb";
|
||||
import type { ReloginResponse } from "./tshd_events_service_pb";
|
||||
import type { ReloginRequest } from "./tshd_events_service_pb";
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* TshdEventsService is served by the Electron app. The tsh daemon calls this service to notify the
|
||||
* app about actions that happen outside of the app itself.
|
||||
*
|
||||
* @generated from protobuf service teleport.lib.teleterm.v1.TshdEventsService
|
||||
*/
|
||||
export interface ITshdEventsServiceClient {
|
||||
/**
|
||||
* Relogin makes the Electron app display a login modal for the specific root cluster. The request
|
||||
* returns a response after the relogin procedure has been successfully finished.
|
||||
*
|
||||
* @generated from protobuf rpc: Relogin(teleport.lib.teleterm.v1.ReloginRequest) returns (teleport.lib.teleterm.v1.ReloginResponse);
|
||||
*/
|
||||
relogin(input: ReloginRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ReloginResponse) => void): grpc.ClientUnaryCall;
|
||||
relogin(input: ReloginRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ReloginResponse) => void): grpc.ClientUnaryCall;
|
||||
relogin(input: ReloginRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ReloginResponse) => void): grpc.ClientUnaryCall;
|
||||
relogin(input: ReloginRequest, callback: (err: grpc.ServiceError | null, value?: ReloginResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* SendNotification causes the Electron app to display a notification in the UI. The request
|
||||
* accepts a specific message rather than a generic string so that the Electron is in control as
|
||||
* to what message is displayed and how exactly it looks.
|
||||
*
|
||||
* @generated from protobuf rpc: SendNotification(teleport.lib.teleterm.v1.SendNotificationRequest) returns (teleport.lib.teleterm.v1.SendNotificationResponse);
|
||||
*/
|
||||
sendNotification(input: SendNotificationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SendNotificationResponse) => void): grpc.ClientUnaryCall;
|
||||
sendNotification(input: SendNotificationRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SendNotificationResponse) => void): grpc.ClientUnaryCall;
|
||||
sendNotification(input: SendNotificationRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SendNotificationResponse) => void): grpc.ClientUnaryCall;
|
||||
sendNotification(input: SendNotificationRequest, callback: (err: grpc.ServiceError | null, value?: SendNotificationResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* SendPendingHeadlessAuthentication notifies the Electron app of a pending headless authentication,
|
||||
* which it can use to initiate headless authentication resolution in the UI.
|
||||
*
|
||||
* @generated from protobuf rpc: SendPendingHeadlessAuthentication(teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationRequest) returns (teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationResponse);
|
||||
*/
|
||||
sendPendingHeadlessAuthentication(input: SendPendingHeadlessAuthenticationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SendPendingHeadlessAuthenticationResponse) => void): grpc.ClientUnaryCall;
|
||||
sendPendingHeadlessAuthentication(input: SendPendingHeadlessAuthenticationRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SendPendingHeadlessAuthenticationResponse) => void): grpc.ClientUnaryCall;
|
||||
sendPendingHeadlessAuthentication(input: SendPendingHeadlessAuthenticationRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SendPendingHeadlessAuthenticationResponse) => void): grpc.ClientUnaryCall;
|
||||
sendPendingHeadlessAuthentication(input: SendPendingHeadlessAuthenticationRequest, callback: (err: grpc.ServiceError | null, value?: SendPendingHeadlessAuthenticationResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* PromptMFA notifies the Electron app that the daemon is waiting for the user to answer an MFA prompt.
|
||||
*
|
||||
* @generated from protobuf rpc: PromptMFA(teleport.lib.teleterm.v1.PromptMFARequest) returns (teleport.lib.teleterm.v1.PromptMFAResponse);
|
||||
*/
|
||||
promptMFA(input: PromptMFARequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: PromptMFAResponse) => void): grpc.ClientUnaryCall;
|
||||
promptMFA(input: PromptMFARequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: PromptMFAResponse) => void): grpc.ClientUnaryCall;
|
||||
promptMFA(input: PromptMFARequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: PromptMFAResponse) => void): grpc.ClientUnaryCall;
|
||||
promptMFA(input: PromptMFARequest, callback: (err: grpc.ServiceError | null, value?: PromptMFAResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
/**
|
||||
* TshdEventsService is served by the Electron app. The tsh daemon calls this service to notify the
|
||||
* app about actions that happen outside of the app itself.
|
||||
*
|
||||
* @generated from protobuf service teleport.lib.teleterm.v1.TshdEventsService
|
||||
*/
|
||||
export class TshdEventsServiceClient extends grpc.Client implements ITshdEventsServiceClient {
|
||||
private readonly _binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions>;
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions> = {}) {
|
||||
super(address, credentials, options);
|
||||
this._binaryOptions = binaryOptions;
|
||||
}
|
||||
/**
|
||||
* Relogin makes the Electron app display a login modal for the specific root cluster. The request
|
||||
* returns a response after the relogin procedure has been successfully finished.
|
||||
*
|
||||
* @generated from protobuf rpc: Relogin(teleport.lib.teleterm.v1.ReloginRequest) returns (teleport.lib.teleterm.v1.ReloginResponse);
|
||||
*/
|
||||
relogin(input: ReloginRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ReloginResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ReloginResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ReloginResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TshdEventsService.methods[0];
|
||||
return this.makeUnaryRequest<ReloginRequest, ReloginResponse>(`/${TshdEventsService.typeName}/${method.name}`, (value: ReloginRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ReloginResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* SendNotification causes the Electron app to display a notification in the UI. The request
|
||||
* accepts a specific message rather than a generic string so that the Electron is in control as
|
||||
* to what message is displayed and how exactly it looks.
|
||||
*
|
||||
* @generated from protobuf rpc: SendNotification(teleport.lib.teleterm.v1.SendNotificationRequest) returns (teleport.lib.teleterm.v1.SendNotificationResponse);
|
||||
*/
|
||||
sendNotification(input: SendNotificationRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SendNotificationResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SendNotificationResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SendNotificationResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TshdEventsService.methods[1];
|
||||
return this.makeUnaryRequest<SendNotificationRequest, SendNotificationResponse>(`/${TshdEventsService.typeName}/${method.name}`, (value: SendNotificationRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SendNotificationResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* SendPendingHeadlessAuthentication notifies the Electron app of a pending headless authentication,
|
||||
* which it can use to initiate headless authentication resolution in the UI.
|
||||
*
|
||||
* @generated from protobuf rpc: SendPendingHeadlessAuthentication(teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationRequest) returns (teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationResponse);
|
||||
*/
|
||||
sendPendingHeadlessAuthentication(input: SendPendingHeadlessAuthenticationRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SendPendingHeadlessAuthenticationResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SendPendingHeadlessAuthenticationResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SendPendingHeadlessAuthenticationResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TshdEventsService.methods[2];
|
||||
return this.makeUnaryRequest<SendPendingHeadlessAuthenticationRequest, SendPendingHeadlessAuthenticationResponse>(`/${TshdEventsService.typeName}/${method.name}`, (value: SendPendingHeadlessAuthenticationRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SendPendingHeadlessAuthenticationResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* PromptMFA notifies the Electron app that the daemon is waiting for the user to answer an MFA prompt.
|
||||
*
|
||||
* @generated from protobuf rpc: PromptMFA(teleport.lib.teleterm.v1.PromptMFARequest) returns (teleport.lib.teleterm.v1.PromptMFAResponse);
|
||||
*/
|
||||
promptMFA(input: PromptMFARequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: PromptMFAResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: PromptMFAResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: PromptMFAResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = TshdEventsService.methods[3];
|
||||
return this.makeUnaryRequest<PromptMFARequest, PromptMFAResponse>(`/${TshdEventsService.typeName}/${method.name}`, (value: PromptMFARequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): PromptMFAResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
}
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/tshd_events_service.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { PromptMFAResponse } from "./tshd_events_service_pb";
|
||||
import { PromptMFARequest } from "./tshd_events_service_pb";
|
||||
import { SendPendingHeadlessAuthenticationResponse } from "./tshd_events_service_pb";
|
||||
import { SendPendingHeadlessAuthenticationRequest } from "./tshd_events_service_pb";
|
||||
import { SendNotificationResponse } from "./tshd_events_service_pb";
|
||||
import { SendNotificationRequest } from "./tshd_events_service_pb";
|
||||
import { ReloginResponse } from "./tshd_events_service_pb";
|
||||
import { ReloginRequest } from "./tshd_events_service_pb";
|
||||
import type * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* TshdEventsService is served by the Electron app. The tsh daemon calls this service to notify the
|
||||
* app about actions that happen outside of the app itself.
|
||||
*
|
||||
* @generated from protobuf service teleport.lib.teleterm.v1.TshdEventsService
|
||||
*/
|
||||
export interface ITshdEventsService extends grpc.UntypedServiceImplementation {
|
||||
/**
|
||||
* Relogin makes the Electron app display a login modal for the specific root cluster. The request
|
||||
* returns a response after the relogin procedure has been successfully finished.
|
||||
*
|
||||
* @generated from protobuf rpc: Relogin(teleport.lib.teleterm.v1.ReloginRequest) returns (teleport.lib.teleterm.v1.ReloginResponse);
|
||||
*/
|
||||
relogin: grpc.handleUnaryCall<ReloginRequest, ReloginResponse>;
|
||||
/**
|
||||
* SendNotification causes the Electron app to display a notification in the UI. The request
|
||||
* accepts a specific message rather than a generic string so that the Electron is in control as
|
||||
* to what message is displayed and how exactly it looks.
|
||||
*
|
||||
* @generated from protobuf rpc: SendNotification(teleport.lib.teleterm.v1.SendNotificationRequest) returns (teleport.lib.teleterm.v1.SendNotificationResponse);
|
||||
*/
|
||||
sendNotification: grpc.handleUnaryCall<SendNotificationRequest, SendNotificationResponse>;
|
||||
/**
|
||||
* SendPendingHeadlessAuthentication notifies the Electron app of a pending headless authentication,
|
||||
* which it can use to initiate headless authentication resolution in the UI.
|
||||
*
|
||||
* @generated from protobuf rpc: SendPendingHeadlessAuthentication(teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationRequest) returns (teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationResponse);
|
||||
*/
|
||||
sendPendingHeadlessAuthentication: grpc.handleUnaryCall<SendPendingHeadlessAuthenticationRequest, SendPendingHeadlessAuthenticationResponse>;
|
||||
/**
|
||||
* PromptMFA notifies the Electron app that the daemon is waiting for the user to answer an MFA prompt.
|
||||
*
|
||||
* @generated from protobuf rpc: PromptMFA(teleport.lib.teleterm.v1.PromptMFARequest) returns (teleport.lib.teleterm.v1.PromptMFAResponse);
|
||||
*/
|
||||
promptMFA: grpc.handleUnaryCall<PromptMFARequest, PromptMFAResponse>;
|
||||
}
|
||||
/**
|
||||
* @grpc/grpc-js definition for the protobuf service teleport.lib.teleterm.v1.TshdEventsService.
|
||||
*
|
||||
* Usage: Implement the interface ITshdEventsService and add to a grpc server.
|
||||
*
|
||||
* ```typescript
|
||||
* const server = new grpc.Server();
|
||||
* const service: ITshdEventsService = ...
|
||||
* server.addService(tshdEventsServiceDefinition, service);
|
||||
* ```
|
||||
*/
|
||||
export const tshdEventsServiceDefinition: grpc.ServiceDefinition<ITshdEventsService> = {
|
||||
relogin: {
|
||||
path: "/teleport.lib.teleterm.v1.TshdEventsService/Relogin",
|
||||
originalName: "Relogin",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => ReloginResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => ReloginRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(ReloginResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(ReloginRequest.toBinary(value))
|
||||
},
|
||||
sendNotification: {
|
||||
path: "/teleport.lib.teleterm.v1.TshdEventsService/SendNotification",
|
||||
originalName: "SendNotification",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => SendNotificationResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => SendNotificationRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(SendNotificationResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(SendNotificationRequest.toBinary(value))
|
||||
},
|
||||
sendPendingHeadlessAuthentication: {
|
||||
path: "/teleport.lib.teleterm.v1.TshdEventsService/SendPendingHeadlessAuthentication",
|
||||
originalName: "SendPendingHeadlessAuthentication",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => SendPendingHeadlessAuthenticationResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => SendPendingHeadlessAuthenticationRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(SendPendingHeadlessAuthenticationResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(SendPendingHeadlessAuthenticationRequest.toBinary(value))
|
||||
},
|
||||
promptMFA: {
|
||||
path: "/teleport.lib.teleterm.v1.TshdEventsService/PromptMFA",
|
||||
originalName: "PromptMFA",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => PromptMFAResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => PromptMFARequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(PromptMFAResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(PromptMFARequest.toBinary(value))
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,674 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/tshd_events_service.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
// Relogin
|
||||
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.ReloginRequest
|
||||
*/
|
||||
export interface ReloginRequest {
|
||||
/**
|
||||
* @generated from protobuf field: string root_cluster_uri = 1;
|
||||
*/
|
||||
rootClusterUri: string;
|
||||
/**
|
||||
* @generated from protobuf oneof: reason
|
||||
*/
|
||||
reason: {
|
||||
oneofKind: "gatewayCertExpired";
|
||||
/**
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.GatewayCertExpired gateway_cert_expired = 2;
|
||||
*/
|
||||
gatewayCertExpired: GatewayCertExpired;
|
||||
} | {
|
||||
oneofKind: undefined;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* GatewayCertExpired is given as the reason when a database client attempts to make a connection
|
||||
* through the gateway, the gateway middleware notices that the db cert has expired and tries to
|
||||
* connect to the cluster to reissue the cert, but fails because the user cert has expired as well.
|
||||
*
|
||||
* At that point in order to let the connection through, tshd needs the Electron app to refresh the
|
||||
* user cert by asking the user to log in again.
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.GatewayCertExpired
|
||||
*/
|
||||
export interface GatewayCertExpired {
|
||||
/**
|
||||
* @generated from protobuf field: string gateway_uri = 1;
|
||||
*/
|
||||
gatewayUri: string;
|
||||
/**
|
||||
* @generated from protobuf field: string target_uri = 2;
|
||||
*/
|
||||
targetUri: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.ReloginResponse
|
||||
*/
|
||||
export interface ReloginResponse {
|
||||
}
|
||||
// SendNotification
|
||||
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.SendNotificationRequest
|
||||
*/
|
||||
export interface SendNotificationRequest {
|
||||
/**
|
||||
* @generated from protobuf oneof: subject
|
||||
*/
|
||||
subject: {
|
||||
oneofKind: "cannotProxyGatewayConnection";
|
||||
/**
|
||||
* @generated from protobuf field: teleport.lib.teleterm.v1.CannotProxyGatewayConnection cannot_proxy_gateway_connection = 1;
|
||||
*/
|
||||
cannotProxyGatewayConnection: CannotProxyGatewayConnection;
|
||||
} | {
|
||||
oneofKind: undefined;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* CannotProxyGatewayConnection is the subject when the middleware used by the gateway encounters an
|
||||
* unrecoverable error and cannot let the connection through. The middleware code is executed within
|
||||
* a separate goroutine so if the error wasn't passed to the Electron app, it would have been
|
||||
* visible only in the logs.
|
||||
*
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.CannotProxyGatewayConnection
|
||||
*/
|
||||
export interface CannotProxyGatewayConnection {
|
||||
/**
|
||||
* @generated from protobuf field: string gateway_uri = 1;
|
||||
*/
|
||||
gatewayUri: string;
|
||||
/**
|
||||
* @generated from protobuf field: string target_uri = 2;
|
||||
*/
|
||||
targetUri: string;
|
||||
/**
|
||||
* @generated from protobuf field: string error = 3;
|
||||
*/
|
||||
error: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.SendNotificationResponse
|
||||
*/
|
||||
export interface SendNotificationResponse {
|
||||
}
|
||||
// SendPendingHeadlessAuthentication
|
||||
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationRequest
|
||||
*/
|
||||
export interface SendPendingHeadlessAuthenticationRequest {
|
||||
/**
|
||||
* @generated from protobuf field: string root_cluster_uri = 1;
|
||||
*/
|
||||
rootClusterUri: string;
|
||||
/**
|
||||
* @generated from protobuf field: string headless_authentication_id = 2;
|
||||
*/
|
||||
headlessAuthenticationId: string;
|
||||
/**
|
||||
* @generated from protobuf field: string headless_authentication_client_ip = 3;
|
||||
*/
|
||||
headlessAuthenticationClientIp: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationResponse
|
||||
*/
|
||||
export interface SendPendingHeadlessAuthenticationResponse {
|
||||
}
|
||||
// PromptMFA
|
||||
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.PromptMFARequest
|
||||
*/
|
||||
export interface PromptMFARequest {
|
||||
/**
|
||||
* @generated from protobuf field: string root_cluster_uri = 1;
|
||||
*/
|
||||
rootClusterUri: string;
|
||||
/**
|
||||
* @generated from protobuf field: string reason = 2;
|
||||
*/
|
||||
reason: string;
|
||||
/**
|
||||
* @generated from protobuf field: bool totp = 3;
|
||||
*/
|
||||
totp: boolean;
|
||||
/**
|
||||
* @generated from protobuf field: bool webauthn = 4;
|
||||
*/
|
||||
webauthn: boolean;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.PromptMFAResponse
|
||||
*/
|
||||
export interface PromptMFAResponse {
|
||||
/**
|
||||
* @generated from protobuf field: string totp_code = 1;
|
||||
*/
|
||||
totpCode: string;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ReloginRequest$Type extends MessageType<ReloginRequest> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.ReloginRequest", [
|
||||
{ no: 1, name: "root_cluster_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "gateway_cert_expired", kind: "message", oneof: "reason", T: () => GatewayCertExpired }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ReloginRequest>): ReloginRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.rootClusterUri = "";
|
||||
message.reason = { oneofKind: undefined };
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ReloginRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReloginRequest): ReloginRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string root_cluster_uri */ 1:
|
||||
message.rootClusterUri = reader.string();
|
||||
break;
|
||||
case /* teleport.lib.teleterm.v1.GatewayCertExpired gateway_cert_expired */ 2:
|
||||
message.reason = {
|
||||
oneofKind: "gatewayCertExpired",
|
||||
gatewayCertExpired: GatewayCertExpired.internalBinaryRead(reader, reader.uint32(), options, (message.reason as any).gatewayCertExpired)
|
||||
};
|
||||
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: ReloginRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string root_cluster_uri = 1; */
|
||||
if (message.rootClusterUri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.rootClusterUri);
|
||||
/* teleport.lib.teleterm.v1.GatewayCertExpired gateway_cert_expired = 2; */
|
||||
if (message.reason.oneofKind === "gatewayCertExpired")
|
||||
GatewayCertExpired.internalBinaryWrite(message.reason.gatewayCertExpired, 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 teleport.lib.teleterm.v1.ReloginRequest
|
||||
*/
|
||||
export const ReloginRequest = new ReloginRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class GatewayCertExpired$Type extends MessageType<GatewayCertExpired> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.GatewayCertExpired", [
|
||||
{ no: 1, name: "gateway_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "target_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<GatewayCertExpired>): GatewayCertExpired {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.gatewayUri = "";
|
||||
message.targetUri = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<GatewayCertExpired>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GatewayCertExpired): GatewayCertExpired {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string gateway_uri */ 1:
|
||||
message.gatewayUri = reader.string();
|
||||
break;
|
||||
case /* string target_uri */ 2:
|
||||
message.targetUri = 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: GatewayCertExpired, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string gateway_uri = 1; */
|
||||
if (message.gatewayUri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.gatewayUri);
|
||||
/* string target_uri = 2; */
|
||||
if (message.targetUri !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.targetUri);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.GatewayCertExpired
|
||||
*/
|
||||
export const GatewayCertExpired = new GatewayCertExpired$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ReloginResponse$Type extends MessageType<ReloginResponse> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.ReloginResponse", []);
|
||||
}
|
||||
create(value?: PartialMessage<ReloginResponse>): ReloginResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ReloginResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReloginResponse): ReloginResponse {
|
||||
return target ?? this.create();
|
||||
}
|
||||
internalBinaryWrite(message: ReloginResponse, 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 teleport.lib.teleterm.v1.ReloginResponse
|
||||
*/
|
||||
export const ReloginResponse = new ReloginResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SendNotificationRequest$Type extends MessageType<SendNotificationRequest> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.SendNotificationRequest", [
|
||||
{ no: 1, name: "cannot_proxy_gateway_connection", kind: "message", oneof: "subject", T: () => CannotProxyGatewayConnection }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SendNotificationRequest>): SendNotificationRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.subject = { oneofKind: undefined };
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SendNotificationRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendNotificationRequest): SendNotificationRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* teleport.lib.teleterm.v1.CannotProxyGatewayConnection cannot_proxy_gateway_connection */ 1:
|
||||
message.subject = {
|
||||
oneofKind: "cannotProxyGatewayConnection",
|
||||
cannotProxyGatewayConnection: CannotProxyGatewayConnection.internalBinaryRead(reader, reader.uint32(), options, (message.subject as any).cannotProxyGatewayConnection)
|
||||
};
|
||||
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: SendNotificationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* teleport.lib.teleterm.v1.CannotProxyGatewayConnection cannot_proxy_gateway_connection = 1; */
|
||||
if (message.subject.oneofKind === "cannotProxyGatewayConnection")
|
||||
CannotProxyGatewayConnection.internalBinaryWrite(message.subject.cannotProxyGatewayConnection, 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 teleport.lib.teleterm.v1.SendNotificationRequest
|
||||
*/
|
||||
export const SendNotificationRequest = new SendNotificationRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class CannotProxyGatewayConnection$Type extends MessageType<CannotProxyGatewayConnection> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.CannotProxyGatewayConnection", [
|
||||
{ no: 1, name: "gateway_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "target_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "error", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<CannotProxyGatewayConnection>): CannotProxyGatewayConnection {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.gatewayUri = "";
|
||||
message.targetUri = "";
|
||||
message.error = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<CannotProxyGatewayConnection>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CannotProxyGatewayConnection): CannotProxyGatewayConnection {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string gateway_uri */ 1:
|
||||
message.gatewayUri = reader.string();
|
||||
break;
|
||||
case /* string target_uri */ 2:
|
||||
message.targetUri = reader.string();
|
||||
break;
|
||||
case /* string error */ 3:
|
||||
message.error = 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: CannotProxyGatewayConnection, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string gateway_uri = 1; */
|
||||
if (message.gatewayUri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.gatewayUri);
|
||||
/* string target_uri = 2; */
|
||||
if (message.targetUri !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.targetUri);
|
||||
/* string error = 3; */
|
||||
if (message.error !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.error);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.CannotProxyGatewayConnection
|
||||
*/
|
||||
export const CannotProxyGatewayConnection = new CannotProxyGatewayConnection$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SendNotificationResponse$Type extends MessageType<SendNotificationResponse> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.SendNotificationResponse", []);
|
||||
}
|
||||
create(value?: PartialMessage<SendNotificationResponse>): SendNotificationResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SendNotificationResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendNotificationResponse): SendNotificationResponse {
|
||||
return target ?? this.create();
|
||||
}
|
||||
internalBinaryWrite(message: SendNotificationResponse, 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 teleport.lib.teleterm.v1.SendNotificationResponse
|
||||
*/
|
||||
export const SendNotificationResponse = new SendNotificationResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SendPendingHeadlessAuthenticationRequest$Type extends MessageType<SendPendingHeadlessAuthenticationRequest> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationRequest", [
|
||||
{ no: 1, name: "root_cluster_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "headless_authentication_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "headless_authentication_client_ip", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SendPendingHeadlessAuthenticationRequest>): SendPendingHeadlessAuthenticationRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.rootClusterUri = "";
|
||||
message.headlessAuthenticationId = "";
|
||||
message.headlessAuthenticationClientIp = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SendPendingHeadlessAuthenticationRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendPendingHeadlessAuthenticationRequest): SendPendingHeadlessAuthenticationRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string root_cluster_uri */ 1:
|
||||
message.rootClusterUri = reader.string();
|
||||
break;
|
||||
case /* string headless_authentication_id */ 2:
|
||||
message.headlessAuthenticationId = reader.string();
|
||||
break;
|
||||
case /* string headless_authentication_client_ip */ 3:
|
||||
message.headlessAuthenticationClientIp = 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: SendPendingHeadlessAuthenticationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string root_cluster_uri = 1; */
|
||||
if (message.rootClusterUri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.rootClusterUri);
|
||||
/* string headless_authentication_id = 2; */
|
||||
if (message.headlessAuthenticationId !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.headlessAuthenticationId);
|
||||
/* string headless_authentication_client_ip = 3; */
|
||||
if (message.headlessAuthenticationClientIp !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.headlessAuthenticationClientIp);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationRequest
|
||||
*/
|
||||
export const SendPendingHeadlessAuthenticationRequest = new SendPendingHeadlessAuthenticationRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SendPendingHeadlessAuthenticationResponse$Type extends MessageType<SendPendingHeadlessAuthenticationResponse> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationResponse", []);
|
||||
}
|
||||
create(value?: PartialMessage<SendPendingHeadlessAuthenticationResponse>): SendPendingHeadlessAuthenticationResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SendPendingHeadlessAuthenticationResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendPendingHeadlessAuthenticationResponse): SendPendingHeadlessAuthenticationResponse {
|
||||
return target ?? this.create();
|
||||
}
|
||||
internalBinaryWrite(message: SendPendingHeadlessAuthenticationResponse, 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 teleport.lib.teleterm.v1.SendPendingHeadlessAuthenticationResponse
|
||||
*/
|
||||
export const SendPendingHeadlessAuthenticationResponse = new SendPendingHeadlessAuthenticationResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class PromptMFARequest$Type extends MessageType<PromptMFARequest> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.PromptMFARequest", [
|
||||
{ no: 1, name: "root_cluster_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "totp", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 4, name: "webauthn", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<PromptMFARequest>): PromptMFARequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.rootClusterUri = "";
|
||||
message.reason = "";
|
||||
message.totp = false;
|
||||
message.webauthn = false;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<PromptMFARequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PromptMFARequest): PromptMFARequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string root_cluster_uri */ 1:
|
||||
message.rootClusterUri = reader.string();
|
||||
break;
|
||||
case /* string reason */ 2:
|
||||
message.reason = reader.string();
|
||||
break;
|
||||
case /* bool totp */ 3:
|
||||
message.totp = reader.bool();
|
||||
break;
|
||||
case /* bool webauthn */ 4:
|
||||
message.webauthn = reader.bool();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: PromptMFARequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string root_cluster_uri = 1; */
|
||||
if (message.rootClusterUri !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.rootClusterUri);
|
||||
/* string reason = 2; */
|
||||
if (message.reason !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.reason);
|
||||
/* bool totp = 3; */
|
||||
if (message.totp !== false)
|
||||
writer.tag(3, WireType.Varint).bool(message.totp);
|
||||
/* bool webauthn = 4; */
|
||||
if (message.webauthn !== false)
|
||||
writer.tag(4, WireType.Varint).bool(message.webauthn);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.PromptMFARequest
|
||||
*/
|
||||
export const PromptMFARequest = new PromptMFARequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class PromptMFAResponse$Type extends MessageType<PromptMFAResponse> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.PromptMFAResponse", [
|
||||
{ no: 1, name: "totp_code", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<PromptMFAResponse>): PromptMFAResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.totpCode = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<PromptMFAResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PromptMFAResponse): PromptMFAResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string totp_code */ 1:
|
||||
message.totpCode = 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: PromptMFAResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string totp_code = 1; */
|
||||
if (message.totpCode !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.totpCode);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.lib.teleterm.v1.PromptMFAResponse
|
||||
*/
|
||||
export const PromptMFAResponse = new PromptMFAResponse$Type();
|
||||
/**
|
||||
* @generated ServiceType for protobuf service teleport.lib.teleterm.v1.TshdEventsService
|
||||
*/
|
||||
export const TshdEventsService = new ServiceType("teleport.lib.teleterm.v1.TshdEventsService", [
|
||||
{ name: "Relogin", options: {}, I: ReloginRequest, O: ReloginResponse },
|
||||
{ name: "SendNotification", options: {}, I: SendNotificationRequest, O: SendNotificationResponse },
|
||||
{ name: "SendPendingHeadlessAuthentication", options: {}, I: SendPendingHeadlessAuthenticationRequest, O: SendPendingHeadlessAuthenticationResponse },
|
||||
{ name: "PromptMFA", options: {}, I: PromptMFARequest, O: PromptMFAResponse }
|
||||
]);
|
||||
@@ -0,0 +1,100 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/lib/teleterm/v1/usage_events.proto" (package "teleport.lib.teleterm.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
//
|
||||
// Teleport
|
||||
// Copyright (C) 2023 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { SubmitConnectEventRequest } from "../../../../prehog/v1alpha/connect_pb";
|
||||
/**
|
||||
* @generated from protobuf message teleport.lib.teleterm.v1.ReportUsageEventRequest
|
||||
*/
|
||||
export interface ReportUsageEventRequest {
|
||||
/**
|
||||
* @generated from protobuf field: string auth_cluster_id = 1;
|
||||
*/
|
||||
authClusterId: string;
|
||||
/**
|
||||
* @generated from protobuf field: prehog.v1alpha.SubmitConnectEventRequest prehog_req = 2;
|
||||
*/
|
||||
prehogReq?: SubmitConnectEventRequest;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ReportUsageEventRequest$Type extends MessageType<ReportUsageEventRequest> {
|
||||
constructor() {
|
||||
super("teleport.lib.teleterm.v1.ReportUsageEventRequest", [
|
||||
{ no: 1, name: "auth_cluster_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "prehog_req", kind: "message", T: () => SubmitConnectEventRequest }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ReportUsageEventRequest>): ReportUsageEventRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.authClusterId = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ReportUsageEventRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReportUsageEventRequest): ReportUsageEventRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string auth_cluster_id */ 1:
|
||||
message.authClusterId = reader.string();
|
||||
break;
|
||||
case /* prehog.v1alpha.SubmitConnectEventRequest prehog_req */ 2:
|
||||
message.prehogReq = SubmitConnectEventRequest.internalBinaryRead(reader, reader.uint32(), options, message.prehogReq);
|
||||
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: ReportUsageEventRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string auth_cluster_id = 1; */
|
||||
if (message.authClusterId !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.authClusterId);
|
||||
/* prehog.v1alpha.SubmitConnectEventRequest prehog_req = 2; */
|
||||
if (message.prehogReq)
|
||||
SubmitConnectEventRequest.internalBinaryWrite(message.prehogReq, 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 teleport.lib.teleterm.v1.ReportUsageEventRequest
|
||||
*/
|
||||
export const ReportUsageEventRequest = new ReportUsageEventRequest$Type();
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/trait/v1/trait.proto" (package "teleport.trait.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* Trait is a trait that can be use in various resources.
|
||||
*
|
||||
* @generated from protobuf message teleport.trait.v1.Trait
|
||||
*/
|
||||
export interface Trait {
|
||||
/**
|
||||
* key is the name of the trait.
|
||||
*
|
||||
* @generated from protobuf field: string key = 1;
|
||||
*/
|
||||
key: string;
|
||||
/**
|
||||
* values is the list of trait values.
|
||||
*
|
||||
* @generated from protobuf field: repeated string values = 2;
|
||||
*/
|
||||
values: string[];
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Trait$Type extends MessageType<Trait> {
|
||||
constructor() {
|
||||
super("teleport.trait.v1.Trait", [
|
||||
{ no: 1, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Trait>): Trait {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.key = "";
|
||||
message.values = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Trait>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trait): Trait {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string key */ 1:
|
||||
message.key = reader.string();
|
||||
break;
|
||||
case /* repeated string values */ 2:
|
||||
message.values.push(reader.string());
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: Trait, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string key = 1; */
|
||||
if (message.key !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.key);
|
||||
/* repeated string values = 2; */
|
||||
for (let i = 0; i < message.values.length; i++)
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.values[i]);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.trait.v1.Trait
|
||||
*/
|
||||
export const Trait = new Trait$Type();
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/userpreferences/v1/assist.proto" (package "teleport.userpreferences.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* AssistUserPreferences is the user preferences for Assist.
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.AssistUserPreferences
|
||||
*/
|
||||
export interface AssistUserPreferences {
|
||||
/**
|
||||
* preferredLogins is an array of the logins a user would prefer to use when running a command, ordered by preference.
|
||||
*
|
||||
* @generated from protobuf field: repeated string preferred_logins = 1;
|
||||
*/
|
||||
preferredLogins: string[];
|
||||
/**
|
||||
* viewMode is the way the assistant is displayed.
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.AssistViewMode view_mode = 2;
|
||||
*/
|
||||
viewMode: AssistViewMode;
|
||||
}
|
||||
/**
|
||||
* AssistViewMode is the way the assistant is displayed.
|
||||
*
|
||||
* @generated from protobuf enum teleport.userpreferences.v1.AssistViewMode
|
||||
*/
|
||||
export enum AssistViewMode {
|
||||
/**
|
||||
* @generated from protobuf enum value: ASSIST_VIEW_MODE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* DOCKED is the assistant is docked to the right hand side of the screen.
|
||||
*
|
||||
* @generated from protobuf enum value: ASSIST_VIEW_MODE_DOCKED = 1;
|
||||
*/
|
||||
DOCKED = 1,
|
||||
/**
|
||||
* POPUP is the assistant is displayed as a popup.
|
||||
*
|
||||
* @generated from protobuf enum value: ASSIST_VIEW_MODE_POPUP = 2;
|
||||
*/
|
||||
POPUP = 2,
|
||||
/**
|
||||
* POPUP_EXPANDED is the assistant is displayed as a popup and expanded.
|
||||
*
|
||||
* @generated from protobuf enum value: ASSIST_VIEW_MODE_POPUP_EXPANDED = 3;
|
||||
*/
|
||||
POPUP_EXPANDED = 3,
|
||||
/**
|
||||
* POPUP_EXPANDED_SIDEBAR_VISIBLE is the assistant is displayed as a popup and expanded with the sidebar visible.
|
||||
*
|
||||
* @generated from protobuf enum value: ASSIST_VIEW_MODE_POPUP_EXPANDED_SIDEBAR_VISIBLE = 4;
|
||||
*/
|
||||
POPUP_EXPANDED_SIDEBAR_VISIBLE = 4
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class AssistUserPreferences$Type extends MessageType<AssistUserPreferences> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.AssistUserPreferences", [
|
||||
{ no: 1, name: "preferred_logins", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "view_mode", kind: "enum", T: () => ["teleport.userpreferences.v1.AssistViewMode", AssistViewMode, "ASSIST_VIEW_MODE_"] }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<AssistUserPreferences>): AssistUserPreferences {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.preferredLogins = [];
|
||||
message.viewMode = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<AssistUserPreferences>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssistUserPreferences): AssistUserPreferences {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* repeated string preferred_logins */ 1:
|
||||
message.preferredLogins.push(reader.string());
|
||||
break;
|
||||
case /* teleport.userpreferences.v1.AssistViewMode view_mode */ 2:
|
||||
message.viewMode = reader.int32();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: AssistUserPreferences, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* repeated string preferred_logins = 1; */
|
||||
for (let i = 0; i < message.preferredLogins.length; i++)
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.preferredLogins[i]);
|
||||
/* teleport.userpreferences.v1.AssistViewMode view_mode = 2; */
|
||||
if (message.viewMode !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.viewMode);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.userpreferences.v1.AssistUserPreferences
|
||||
*/
|
||||
export const AssistUserPreferences = new AssistUserPreferences$Type();
|
||||
@@ -0,0 +1,149 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/userpreferences/v1/cluster_preferences.proto" (package "teleport.userpreferences.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* PinnedResourcesUserPreferences is a collection of resource IDs that will be
|
||||
* displayed in the user's pinned resources tab in the Web UI.
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.PinnedResourcesUserPreferences
|
||||
*/
|
||||
export interface PinnedResourcesUserPreferences {
|
||||
/**
|
||||
* resource_ids is a list of unified resource name sort keys.
|
||||
*
|
||||
* @generated from protobuf field: repeated string resource_ids = 1;
|
||||
*/
|
||||
resourceIds: string[];
|
||||
}
|
||||
/**
|
||||
* ClusterUserPreferences are user preferences saved per cluster.
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.ClusterUserPreferences
|
||||
*/
|
||||
export interface ClusterUserPreferences {
|
||||
/**
|
||||
* pinned_resources is a list of pinned resources.
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.PinnedResourcesUserPreferences pinned_resources = 1;
|
||||
*/
|
||||
pinnedResources?: PinnedResourcesUserPreferences;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class PinnedResourcesUserPreferences$Type extends MessageType<PinnedResourcesUserPreferences> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.PinnedResourcesUserPreferences", [
|
||||
{ no: 1, name: "resource_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<PinnedResourcesUserPreferences>): PinnedResourcesUserPreferences {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.resourceIds = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<PinnedResourcesUserPreferences>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PinnedResourcesUserPreferences): PinnedResourcesUserPreferences {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* repeated string resource_ids */ 1:
|
||||
message.resourceIds.push(reader.string());
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: PinnedResourcesUserPreferences, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* repeated string resource_ids = 1; */
|
||||
for (let i = 0; i < message.resourceIds.length; i++)
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.resourceIds[i]);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.userpreferences.v1.PinnedResourcesUserPreferences
|
||||
*/
|
||||
export const PinnedResourcesUserPreferences = new PinnedResourcesUserPreferences$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ClusterUserPreferences$Type extends MessageType<ClusterUserPreferences> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.ClusterUserPreferences", [
|
||||
{ no: 1, name: "pinned_resources", kind: "message", T: () => PinnedResourcesUserPreferences }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ClusterUserPreferences>): ClusterUserPreferences {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ClusterUserPreferences>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClusterUserPreferences): ClusterUserPreferences {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* teleport.userpreferences.v1.PinnedResourcesUserPreferences pinned_resources */ 1:
|
||||
message.pinnedResources = PinnedResourcesUserPreferences.internalBinaryRead(reader, reader.uint32(), options, message.pinnedResources);
|
||||
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: ClusterUserPreferences, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* teleport.userpreferences.v1.PinnedResourcesUserPreferences pinned_resources = 1; */
|
||||
if (message.pinnedResources)
|
||||
PinnedResourcesUserPreferences.internalBinaryWrite(message.pinnedResources, 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 teleport.userpreferences.v1.ClusterUserPreferences
|
||||
*/
|
||||
export const ClusterUserPreferences = new ClusterUserPreferences$Type();
|
||||
+245
@@ -0,0 +1,245 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/userpreferences/v1/onboard.proto" (package "teleport.userpreferences.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* MarketingParams are the parameters associated with a user via marketing campaign at the time of sign up.
|
||||
* They contain both traditional Urchin Tracking Module (UTM) parameters as well as custom parameters.
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.MarketingParams
|
||||
*/
|
||||
export interface MarketingParams {
|
||||
/**
|
||||
* campaign is the UTM campaign parameter which identifies a specific product promotion
|
||||
*
|
||||
* @generated from protobuf field: string campaign = 1;
|
||||
*/
|
||||
campaign: string;
|
||||
/**
|
||||
* source is the UTM source parameter which identifies which site sent the traffic
|
||||
*
|
||||
* @generated from protobuf field: string source = 2;
|
||||
*/
|
||||
source: string;
|
||||
/**
|
||||
* medium is the UTM medium parameter which identifies what type of link was used
|
||||
*
|
||||
* @generated from protobuf field: string medium = 3;
|
||||
*/
|
||||
medium: string;
|
||||
/**
|
||||
* intent is the internal query param, which identifies any additional marketing intentions
|
||||
* via internally set and directed parameters.
|
||||
*
|
||||
* @generated from protobuf field: string intent = 4;
|
||||
*/
|
||||
intent: string;
|
||||
}
|
||||
/**
|
||||
* OnboardUserPreferences is the user preferences selected during onboarding.
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.OnboardUserPreferences
|
||||
*/
|
||||
export interface OnboardUserPreferences {
|
||||
/**
|
||||
* preferredResources is an array of the resources a user selected during their onboarding questionnaire.
|
||||
*
|
||||
* @generated from protobuf field: repeated teleport.userpreferences.v1.Resource preferred_resources = 1;
|
||||
*/
|
||||
preferredResources: Resource[];
|
||||
/**
|
||||
* marketingParams are the parameters associated with a user via marketing campaign at the time of sign up
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.MarketingParams marketing_params = 2;
|
||||
*/
|
||||
marketingParams?: MarketingParams;
|
||||
}
|
||||
/**
|
||||
* Resources are the Resource options in the onboarding questionnaire
|
||||
*
|
||||
* @generated from protobuf enum teleport.userpreferences.v1.Resource
|
||||
*/
|
||||
export enum Resource {
|
||||
/**
|
||||
* @generated from protobuf enum value: RESOURCE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* @generated from protobuf enum value: RESOURCE_WINDOWS_DESKTOPS = 1;
|
||||
*/
|
||||
WINDOWS_DESKTOPS = 1,
|
||||
/**
|
||||
* @generated from protobuf enum value: RESOURCE_SERVER_SSH = 2;
|
||||
*/
|
||||
SERVER_SSH = 2,
|
||||
/**
|
||||
* @generated from protobuf enum value: RESOURCE_DATABASES = 3;
|
||||
*/
|
||||
DATABASES = 3,
|
||||
/**
|
||||
* @generated from protobuf enum value: RESOURCE_KUBERNETES = 4;
|
||||
*/
|
||||
KUBERNETES = 4,
|
||||
/**
|
||||
* @generated from protobuf enum value: RESOURCE_WEB_APPLICATIONS = 5;
|
||||
*/
|
||||
WEB_APPLICATIONS = 5
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class MarketingParams$Type extends MessageType<MarketingParams> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.MarketingParams", [
|
||||
{ no: 1, name: "campaign", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "source", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "medium", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "intent", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<MarketingParams>): MarketingParams {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.campaign = "";
|
||||
message.source = "";
|
||||
message.medium = "";
|
||||
message.intent = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<MarketingParams>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MarketingParams): MarketingParams {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string campaign */ 1:
|
||||
message.campaign = reader.string();
|
||||
break;
|
||||
case /* string source */ 2:
|
||||
message.source = reader.string();
|
||||
break;
|
||||
case /* string medium */ 3:
|
||||
message.medium = reader.string();
|
||||
break;
|
||||
case /* string intent */ 4:
|
||||
message.intent = 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: MarketingParams, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string campaign = 1; */
|
||||
if (message.campaign !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.campaign);
|
||||
/* string source = 2; */
|
||||
if (message.source !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.source);
|
||||
/* string medium = 3; */
|
||||
if (message.medium !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.medium);
|
||||
/* string intent = 4; */
|
||||
if (message.intent !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.intent);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.userpreferences.v1.MarketingParams
|
||||
*/
|
||||
export const MarketingParams = new MarketingParams$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class OnboardUserPreferences$Type extends MessageType<OnboardUserPreferences> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.OnboardUserPreferences", [
|
||||
{ no: 1, name: "preferred_resources", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["teleport.userpreferences.v1.Resource", Resource, "RESOURCE_"] },
|
||||
{ no: 2, name: "marketing_params", kind: "message", T: () => MarketingParams }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<OnboardUserPreferences>): OnboardUserPreferences {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.preferredResources = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<OnboardUserPreferences>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OnboardUserPreferences): OnboardUserPreferences {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* repeated teleport.userpreferences.v1.Resource preferred_resources */ 1:
|
||||
if (wireType === WireType.LengthDelimited)
|
||||
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
||||
message.preferredResources.push(reader.int32());
|
||||
else
|
||||
message.preferredResources.push(reader.int32());
|
||||
break;
|
||||
case /* teleport.userpreferences.v1.MarketingParams marketing_params */ 2:
|
||||
message.marketingParams = MarketingParams.internalBinaryRead(reader, reader.uint32(), options, message.marketingParams);
|
||||
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: OnboardUserPreferences, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* repeated teleport.userpreferences.v1.Resource preferred_resources = 1; */
|
||||
if (message.preferredResources.length) {
|
||||
writer.tag(1, WireType.LengthDelimited).fork();
|
||||
for (let i = 0; i < message.preferredResources.length; i++)
|
||||
writer.int32(message.preferredResources[i]);
|
||||
writer.join();
|
||||
}
|
||||
/* teleport.userpreferences.v1.MarketingParams marketing_params = 2; */
|
||||
if (message.marketingParams)
|
||||
MarketingParams.internalBinaryWrite(message.marketingParams, 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 teleport.userpreferences.v1.OnboardUserPreferences
|
||||
*/
|
||||
export const OnboardUserPreferences = new OnboardUserPreferences$Type();
|
||||
@@ -0,0 +1,43 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/userpreferences/v1/theme.proto" (package "teleport.userpreferences.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
/**
|
||||
* Theme is a frontend theme.
|
||||
*
|
||||
* @generated from protobuf enum teleport.userpreferences.v1.Theme
|
||||
*/
|
||||
export enum Theme {
|
||||
/**
|
||||
* @generated from protobuf enum value: THEME_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* THEME_LIGHT is the light theme.
|
||||
*
|
||||
* @generated from protobuf enum value: THEME_LIGHT = 1;
|
||||
*/
|
||||
LIGHT = 1,
|
||||
/**
|
||||
* THEME_DARK is the dark theme.
|
||||
*
|
||||
* @generated from protobuf enum value: THEME_DARK = 2;
|
||||
*/
|
||||
DARK = 2
|
||||
}
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/userpreferences/v1/unified_resource_preferences.proto" (package "teleport.userpreferences.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
/**
|
||||
* UnifiedResourcePreferences are preferences used in the Unified Resource web UI
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.UnifiedResourcePreferences
|
||||
*/
|
||||
export interface UnifiedResourcePreferences {
|
||||
/**
|
||||
* default_tab is the default tab selected in the unified resource web UI
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.DefaultTab default_tab = 1;
|
||||
*/
|
||||
defaultTab: DefaultTab;
|
||||
/**
|
||||
* view_mode is the view mode selected in the unified resource Web UI
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.ViewMode view_mode = 2;
|
||||
*/
|
||||
viewMode: ViewMode;
|
||||
/**
|
||||
* labels_view_mode is whether the labels for resources should all be collapsed or expanded in the unified resource Web UI list view.
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.LabelsViewMode labels_view_mode = 3;
|
||||
*/
|
||||
labelsViewMode: LabelsViewMode;
|
||||
}
|
||||
/**
|
||||
* DefaultTab is the default tab selected in the unified resource web UI
|
||||
*
|
||||
* @generated from protobuf enum teleport.userpreferences.v1.DefaultTab
|
||||
*/
|
||||
export enum DefaultTab {
|
||||
/**
|
||||
* @generated from protobuf enum value: DEFAULT_TAB_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* ALL is all resources
|
||||
*
|
||||
* @generated from protobuf enum value: DEFAULT_TAB_ALL = 1;
|
||||
*/
|
||||
ALL = 1,
|
||||
/**
|
||||
* PINNED is only pinned resources
|
||||
*
|
||||
* @generated from protobuf enum value: DEFAULT_TAB_PINNED = 2;
|
||||
*/
|
||||
PINNED = 2
|
||||
}
|
||||
/**
|
||||
* ViewMode is the view mode selected in the unified resource Web UI
|
||||
*
|
||||
* @generated from protobuf enum teleport.userpreferences.v1.ViewMode
|
||||
*/
|
||||
export enum ViewMode {
|
||||
/**
|
||||
* @generated from protobuf enum value: VIEW_MODE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* CARD is the card view
|
||||
*
|
||||
* @generated from protobuf enum value: VIEW_MODE_CARD = 1;
|
||||
*/
|
||||
CARD = 1,
|
||||
/**
|
||||
* LIST is the list view
|
||||
*
|
||||
* @generated from protobuf enum value: VIEW_MODE_LIST = 2;
|
||||
*/
|
||||
LIST = 2
|
||||
}
|
||||
/**
|
||||
* * LabelsViewMode is whether the labels for resources should all be collapsed or expanded. This only applies to the list view.
|
||||
*
|
||||
* @generated from protobuf enum teleport.userpreferences.v1.LabelsViewMode
|
||||
*/
|
||||
export enum LabelsViewMode {
|
||||
/**
|
||||
* @generated from protobuf enum value: LABELS_VIEW_MODE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
/**
|
||||
* EXPANDED is the expanded state which shows all labels for every resource.
|
||||
*
|
||||
* @generated from protobuf enum value: LABELS_VIEW_MODE_EXPANDED = 1;
|
||||
*/
|
||||
EXPANDED = 1,
|
||||
/**
|
||||
* COLLAPSED is the collapsed state which hides all labels for every resource.
|
||||
*
|
||||
* @generated from protobuf enum value: LABELS_VIEW_MODE_COLLAPSED = 2;
|
||||
*/
|
||||
COLLAPSED = 2
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class UnifiedResourcePreferences$Type extends MessageType<UnifiedResourcePreferences> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.UnifiedResourcePreferences", [
|
||||
{ no: 1, name: "default_tab", kind: "enum", T: () => ["teleport.userpreferences.v1.DefaultTab", DefaultTab, "DEFAULT_TAB_"] },
|
||||
{ no: 2, name: "view_mode", kind: "enum", T: () => ["teleport.userpreferences.v1.ViewMode", ViewMode, "VIEW_MODE_"] },
|
||||
{ no: 3, name: "labels_view_mode", kind: "enum", T: () => ["teleport.userpreferences.v1.LabelsViewMode", LabelsViewMode, "LABELS_VIEW_MODE_"] }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<UnifiedResourcePreferences>): UnifiedResourcePreferences {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.defaultTab = 0;
|
||||
message.viewMode = 0;
|
||||
message.labelsViewMode = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<UnifiedResourcePreferences>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnifiedResourcePreferences): UnifiedResourcePreferences {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* teleport.userpreferences.v1.DefaultTab default_tab */ 1:
|
||||
message.defaultTab = reader.int32();
|
||||
break;
|
||||
case /* teleport.userpreferences.v1.ViewMode view_mode */ 2:
|
||||
message.viewMode = reader.int32();
|
||||
break;
|
||||
case /* teleport.userpreferences.v1.LabelsViewMode labels_view_mode */ 3:
|
||||
message.labelsViewMode = reader.int32();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: UnifiedResourcePreferences, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* teleport.userpreferences.v1.DefaultTab default_tab = 1; */
|
||||
if (message.defaultTab !== 0)
|
||||
writer.tag(1, WireType.Varint).int32(message.defaultTab);
|
||||
/* teleport.userpreferences.v1.ViewMode view_mode = 2; */
|
||||
if (message.viewMode !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.viewMode);
|
||||
/* teleport.userpreferences.v1.LabelsViewMode labels_view_mode = 3; */
|
||||
if (message.labelsViewMode !== 0)
|
||||
writer.tag(3, WireType.Varint).int32(message.labelsViewMode);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message teleport.userpreferences.v1.UnifiedResourcePreferences
|
||||
*/
|
||||
export const UnifiedResourcePreferences = new UnifiedResourcePreferences$Type();
|
||||
@@ -0,0 +1,83 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/userpreferences/v1/userpreferences.proto" (package "teleport.userpreferences.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import { UserPreferencesService } from "./userpreferences_pb";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { Empty } from "../../../google/protobuf/empty_pb";
|
||||
import type { UpsertUserPreferencesRequest } from "./userpreferences_pb";
|
||||
import type { GetUserPreferencesResponse } from "./userpreferences_pb";
|
||||
import type { GetUserPreferencesRequest } from "./userpreferences_pb";
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* UserPreferencesService is a service that stores user settings.
|
||||
*
|
||||
* @generated from protobuf service teleport.userpreferences.v1.UserPreferencesService
|
||||
*/
|
||||
export interface IUserPreferencesServiceClient {
|
||||
/**
|
||||
* GetUserPreferences returns the user preferences for a given user.
|
||||
*
|
||||
* @generated from protobuf rpc: GetUserPreferences(teleport.userpreferences.v1.GetUserPreferencesRequest) returns (teleport.userpreferences.v1.GetUserPreferencesResponse);
|
||||
*/
|
||||
getUserPreferences(input: GetUserPreferencesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
getUserPreferences(input: GetUserPreferencesRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
getUserPreferences(input: GetUserPreferencesRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
getUserPreferences(input: GetUserPreferencesRequest, callback: (err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* UpsertUserPreferences creates or updates user preferences for a given username.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertUserPreferences(teleport.userpreferences.v1.UpsertUserPreferencesRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
upsertUserPreferences(input: UpsertUserPreferencesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
upsertUserPreferences(input: UpsertUserPreferencesRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
upsertUserPreferences(input: UpsertUserPreferencesRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
upsertUserPreferences(input: UpsertUserPreferencesRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
/**
|
||||
* UserPreferencesService is a service that stores user settings.
|
||||
*
|
||||
* @generated from protobuf service teleport.userpreferences.v1.UserPreferencesService
|
||||
*/
|
||||
export class UserPreferencesServiceClient extends grpc.Client implements IUserPreferencesServiceClient {
|
||||
private readonly _binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions>;
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial<BinaryReadOptions & BinaryWriteOptions> = {}) {
|
||||
super(address, credentials, options);
|
||||
this._binaryOptions = binaryOptions;
|
||||
}
|
||||
/**
|
||||
* GetUserPreferences returns the user preferences for a given user.
|
||||
*
|
||||
* @generated from protobuf rpc: GetUserPreferences(teleport.userpreferences.v1.GetUserPreferencesRequest) returns (teleport.userpreferences.v1.GetUserPreferencesResponse);
|
||||
*/
|
||||
getUserPreferences(input: GetUserPreferencesRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetUserPreferencesResponse) => void)): grpc.ClientUnaryCall {
|
||||
const method = UserPreferencesService.methods[0];
|
||||
return this.makeUnaryRequest<GetUserPreferencesRequest, GetUserPreferencesResponse>(`/${UserPreferencesService.typeName}/${method.name}`, (value: GetUserPreferencesRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetUserPreferencesResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
/**
|
||||
* UpsertUserPreferences creates or updates user preferences for a given username.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertUserPreferences(teleport.userpreferences.v1.UpsertUserPreferencesRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
upsertUserPreferences(input: UpsertUserPreferencesRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall {
|
||||
const method = UserPreferencesService.methods[1];
|
||||
return this.makeUnaryRequest<UpsertUserPreferencesRequest, Empty>(`/${UserPreferencesService.typeName}/${method.name}`, (value: UpsertUserPreferencesRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/userpreferences/v1/userpreferences.proto" (package "teleport.userpreferences.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import { Empty } from "../../../google/protobuf/empty_pb";
|
||||
import { UpsertUserPreferencesRequest } from "./userpreferences_pb";
|
||||
import { GetUserPreferencesResponse } from "./userpreferences_pb";
|
||||
import { GetUserPreferencesRequest } from "./userpreferences_pb";
|
||||
import type * as grpc from "@grpc/grpc-js";
|
||||
/**
|
||||
* UserPreferencesService is a service that stores user settings.
|
||||
*
|
||||
* @generated from protobuf service teleport.userpreferences.v1.UserPreferencesService
|
||||
*/
|
||||
export interface IUserPreferencesService extends grpc.UntypedServiceImplementation {
|
||||
/**
|
||||
* GetUserPreferences returns the user preferences for a given user.
|
||||
*
|
||||
* @generated from protobuf rpc: GetUserPreferences(teleport.userpreferences.v1.GetUserPreferencesRequest) returns (teleport.userpreferences.v1.GetUserPreferencesResponse);
|
||||
*/
|
||||
getUserPreferences: grpc.handleUnaryCall<GetUserPreferencesRequest, GetUserPreferencesResponse>;
|
||||
/**
|
||||
* UpsertUserPreferences creates or updates user preferences for a given username.
|
||||
*
|
||||
* @generated from protobuf rpc: UpsertUserPreferences(teleport.userpreferences.v1.UpsertUserPreferencesRequest) returns (google.protobuf.Empty);
|
||||
*/
|
||||
upsertUserPreferences: grpc.handleUnaryCall<UpsertUserPreferencesRequest, Empty>;
|
||||
}
|
||||
/**
|
||||
* @grpc/grpc-js definition for the protobuf service teleport.userpreferences.v1.UserPreferencesService.
|
||||
*
|
||||
* Usage: Implement the interface IUserPreferencesService and add to a grpc server.
|
||||
*
|
||||
* ```typescript
|
||||
* const server = new grpc.Server();
|
||||
* const service: IUserPreferencesService = ...
|
||||
* server.addService(userPreferencesServiceDefinition, service);
|
||||
* ```
|
||||
*/
|
||||
export const userPreferencesServiceDefinition: grpc.ServiceDefinition<IUserPreferencesService> = {
|
||||
getUserPreferences: {
|
||||
path: "/teleport.userpreferences.v1.UserPreferencesService/GetUserPreferences",
|
||||
originalName: "GetUserPreferences",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => GetUserPreferencesResponse.fromBinary(bytes),
|
||||
requestDeserialize: bytes => GetUserPreferencesRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(GetUserPreferencesResponse.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(GetUserPreferencesRequest.toBinary(value))
|
||||
},
|
||||
upsertUserPreferences: {
|
||||
path: "/teleport.userpreferences.v1.UserPreferencesService/UpsertUserPreferences",
|
||||
originalName: "UpsertUserPreferences",
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
responseDeserialize: bytes => Empty.fromBinary(bytes),
|
||||
requestDeserialize: bytes => UpsertUserPreferencesRequest.fromBinary(bytes),
|
||||
responseSerialize: value => Buffer.from(Empty.toBinary(value)),
|
||||
requestSerialize: value => Buffer.from(UpsertUserPreferencesRequest.toBinary(value))
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,305 @@
|
||||
/* eslint-disable */
|
||||
// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck
|
||||
// @generated from protobuf file "teleport/userpreferences/v1/userpreferences.proto" (package "teleport.userpreferences.v1", syntax proto3)
|
||||
// tslint:disable
|
||||
// @ts-nocheck
|
||||
//
|
||||
// Copyright 2023 Gravitational, Inc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import { Empty } from "../../../google/protobuf/empty_pb";
|
||||
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { UnifiedResourcePreferences } from "./unified_resource_preferences_pb";
|
||||
import { ClusterUserPreferences } from "./cluster_preferences_pb";
|
||||
import { OnboardUserPreferences } from "./onboard_pb";
|
||||
import { Theme } from "./theme_pb";
|
||||
import { AssistUserPreferences } from "./assist_pb";
|
||||
/**
|
||||
* UserPreferences is a collection of different user changeable preferences for the frontend.
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.UserPreferences
|
||||
*/
|
||||
export interface UserPreferences {
|
||||
/**
|
||||
* assist is the preferences for the Teleport Assist.
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.AssistUserPreferences assist = 1;
|
||||
*/
|
||||
assist?: AssistUserPreferences;
|
||||
/**
|
||||
* theme is the theme of the frontend.
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.Theme theme = 2;
|
||||
*/
|
||||
theme: Theme;
|
||||
/**
|
||||
* onboard is the preferences from the onboarding questionnaire.
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.OnboardUserPreferences onboard = 3;
|
||||
*/
|
||||
onboard?: OnboardUserPreferences;
|
||||
/**
|
||||
* cluster_preferences are user preferences saved per cluster.
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.ClusterUserPreferences cluster_preferences = 4;
|
||||
*/
|
||||
clusterPreferences?: ClusterUserPreferences;
|
||||
/**
|
||||
* unified_resource_preferences are user preferences saved for the Unified Resource web UI
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.UnifiedResourcePreferences unified_resource_preferences = 5;
|
||||
*/
|
||||
unifiedResourcePreferences?: UnifiedResourcePreferences;
|
||||
}
|
||||
/**
|
||||
* GetUserPreferencesRequest is a request to get the user preferences.
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.GetUserPreferencesRequest
|
||||
*/
|
||||
export interface GetUserPreferencesRequest {
|
||||
}
|
||||
/**
|
||||
* GetUserPreferencesResponse is a response to get the user preferences.
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.GetUserPreferencesResponse
|
||||
*/
|
||||
export interface GetUserPreferencesResponse {
|
||||
/**
|
||||
* preferences is the user preferences.
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.UserPreferences preferences = 1;
|
||||
*/
|
||||
preferences?: UserPreferences;
|
||||
}
|
||||
/**
|
||||
* UpsertUserPreferencesRequest is a request to create or update the user preferences.
|
||||
*
|
||||
* @generated from protobuf message teleport.userpreferences.v1.UpsertUserPreferencesRequest
|
||||
*/
|
||||
export interface UpsertUserPreferencesRequest {
|
||||
/**
|
||||
* preferences is the new user preferences to set.
|
||||
*
|
||||
* @generated from protobuf field: teleport.userpreferences.v1.UserPreferences preferences = 1;
|
||||
*/
|
||||
preferences?: UserPreferences;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class UserPreferences$Type extends MessageType<UserPreferences> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.UserPreferences", [
|
||||
{ no: 1, name: "assist", kind: "message", T: () => AssistUserPreferences },
|
||||
{ no: 2, name: "theme", kind: "enum", T: () => ["teleport.userpreferences.v1.Theme", Theme, "THEME_"] },
|
||||
{ no: 3, name: "onboard", kind: "message", T: () => OnboardUserPreferences },
|
||||
{ no: 4, name: "cluster_preferences", kind: "message", T: () => ClusterUserPreferences },
|
||||
{ no: 5, name: "unified_resource_preferences", kind: "message", T: () => UnifiedResourcePreferences }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<UserPreferences>): UserPreferences {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.theme = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<UserPreferences>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserPreferences): UserPreferences {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* teleport.userpreferences.v1.AssistUserPreferences assist */ 1:
|
||||
message.assist = AssistUserPreferences.internalBinaryRead(reader, reader.uint32(), options, message.assist);
|
||||
break;
|
||||
case /* teleport.userpreferences.v1.Theme theme */ 2:
|
||||
message.theme = reader.int32();
|
||||
break;
|
||||
case /* teleport.userpreferences.v1.OnboardUserPreferences onboard */ 3:
|
||||
message.onboard = OnboardUserPreferences.internalBinaryRead(reader, reader.uint32(), options, message.onboard);
|
||||
break;
|
||||
case /* teleport.userpreferences.v1.ClusterUserPreferences cluster_preferences */ 4:
|
||||
message.clusterPreferences = ClusterUserPreferences.internalBinaryRead(reader, reader.uint32(), options, message.clusterPreferences);
|
||||
break;
|
||||
case /* teleport.userpreferences.v1.UnifiedResourcePreferences unified_resource_preferences */ 5:
|
||||
message.unifiedResourcePreferences = UnifiedResourcePreferences.internalBinaryRead(reader, reader.uint32(), options, message.unifiedResourcePreferences);
|
||||
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: UserPreferences, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* teleport.userpreferences.v1.AssistUserPreferences assist = 1; */
|
||||
if (message.assist)
|
||||
AssistUserPreferences.internalBinaryWrite(message.assist, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.userpreferences.v1.Theme theme = 2; */
|
||||
if (message.theme !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.theme);
|
||||
/* teleport.userpreferences.v1.OnboardUserPreferences onboard = 3; */
|
||||
if (message.onboard)
|
||||
OnboardUserPreferences.internalBinaryWrite(message.onboard, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.userpreferences.v1.ClusterUserPreferences cluster_preferences = 4; */
|
||||
if (message.clusterPreferences)
|
||||
ClusterUserPreferences.internalBinaryWrite(message.clusterPreferences, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||
/* teleport.userpreferences.v1.UnifiedResourcePreferences unified_resource_preferences = 5; */
|
||||
if (message.unifiedResourcePreferences)
|
||||
UnifiedResourcePreferences.internalBinaryWrite(message.unifiedResourcePreferences, writer.tag(5, 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 teleport.userpreferences.v1.UserPreferences
|
||||
*/
|
||||
export const UserPreferences = new UserPreferences$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class GetUserPreferencesRequest$Type extends MessageType<GetUserPreferencesRequest> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.GetUserPreferencesRequest", []);
|
||||
}
|
||||
create(value?: PartialMessage<GetUserPreferencesRequest>): GetUserPreferencesRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<GetUserPreferencesRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserPreferencesRequest): GetUserPreferencesRequest {
|
||||
return target ?? this.create();
|
||||
}
|
||||
internalBinaryWrite(message: GetUserPreferencesRequest, 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 teleport.userpreferences.v1.GetUserPreferencesRequest
|
||||
*/
|
||||
export const GetUserPreferencesRequest = new GetUserPreferencesRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class GetUserPreferencesResponse$Type extends MessageType<GetUserPreferencesResponse> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.GetUserPreferencesResponse", [
|
||||
{ no: 1, name: "preferences", kind: "message", T: () => UserPreferences }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<GetUserPreferencesResponse>): GetUserPreferencesResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<GetUserPreferencesResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserPreferencesResponse): GetUserPreferencesResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* teleport.userpreferences.v1.UserPreferences preferences */ 1:
|
||||
message.preferences = UserPreferences.internalBinaryRead(reader, reader.uint32(), options, message.preferences);
|
||||
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: GetUserPreferencesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* teleport.userpreferences.v1.UserPreferences preferences = 1; */
|
||||
if (message.preferences)
|
||||
UserPreferences.internalBinaryWrite(message.preferences, 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 teleport.userpreferences.v1.GetUserPreferencesResponse
|
||||
*/
|
||||
export const GetUserPreferencesResponse = new GetUserPreferencesResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class UpsertUserPreferencesRequest$Type extends MessageType<UpsertUserPreferencesRequest> {
|
||||
constructor() {
|
||||
super("teleport.userpreferences.v1.UpsertUserPreferencesRequest", [
|
||||
{ no: 1, name: "preferences", kind: "message", T: () => UserPreferences }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<UpsertUserPreferencesRequest>): UpsertUserPreferencesRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<UpsertUserPreferencesRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpsertUserPreferencesRequest): UpsertUserPreferencesRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* teleport.userpreferences.v1.UserPreferences preferences */ 1:
|
||||
message.preferences = UserPreferences.internalBinaryRead(reader, reader.uint32(), options, message.preferences);
|
||||
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: UpsertUserPreferencesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* teleport.userpreferences.v1.UserPreferences preferences = 1; */
|
||||
if (message.preferences)
|
||||
UserPreferences.internalBinaryWrite(message.preferences, 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 teleport.userpreferences.v1.UpsertUserPreferencesRequest
|
||||
*/
|
||||
export const UpsertUserPreferencesRequest = new UpsertUserPreferencesRequest$Type();
|
||||
/**
|
||||
* @generated ServiceType for protobuf service teleport.userpreferences.v1.UserPreferencesService
|
||||
*/
|
||||
export const UserPreferencesService = new ServiceType("teleport.userpreferences.v1.UserPreferencesService", [
|
||||
{ name: "GetUserPreferences", options: {}, I: GetUserPreferencesRequest, O: GetUserPreferencesResponse },
|
||||
{ name: "UpsertUserPreferences", options: {}, I: UpsertUserPreferencesRequest, O: Empty }
|
||||
]);
|
||||
@@ -32,6 +32,7 @@
|
||||
"e-teleport/*": ["e/web/teleport/src/*"],
|
||||
"e-teleterm/*": ["e/web/teleterm/src/*"],
|
||||
"gen-proto-js/*": ["gen/proto/js/*"],
|
||||
"gen-proto-ts/*": ["gen/proto/ts/*"],
|
||||
"access-graph": ["e/web/teleport/src/AccessGraph/Loader.tsx"],
|
||||
},
|
||||
"outDir": "dist"
|
||||
|
||||
@@ -31,6 +31,7 @@ module.exports = {
|
||||
'^e-teleport/(.*)$': '<rootDir>/e/web/teleport/src/$1',
|
||||
'^e-teleterm/(.*)$': '<rootDir>/e/web/teleterm/src/$1',
|
||||
'^gen-proto-js/(.*)$': '<rootDir>/gen/proto/js/$1',
|
||||
'^gen-proto-ts/(.*)$': '<rootDir>/gen/proto/ts/$1',
|
||||
},
|
||||
// Keep pre-v29 snapshot format to avoid existing snapshots breaking.
|
||||
// https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
|
||||
|
||||
Reference in New Issue
Block a user