feat: grpc bindings

This commit is contained in:
DecDuck
2025-05-12 12:25:22 +10:00
parent c98b99d807
commit 88fc4ddbbf
17 changed files with 10990 additions and 3 deletions

4
buf.gen.yaml Normal file
View File

@@ -0,0 +1,4 @@
version: v2
plugins:
- remote: buf.build/community/timostamm-protobuf-ts:v2.10.0
out: ../../src/grpc/generated

View File

@@ -18,20 +18,26 @@
"dev": "jiti ./src/cli.ts",
"start": "npx concurrently 'yarn dev' 'node server.mjs'",
"release": "yarn test && standard-version && git push --follow-tags && npm publish --access=public",
"test": "yarn lint"
"test": "yarn lint",
"generate": "cp buf.gen.yaml headscale/proto/ && cd headscale/proto && buf generate && rm buf.gen.yaml"
},
"dependencies": {
"@protobuf-ts/grpcweb-transport": "^2.10.0",
"@protobuf-ts/runtime": "^2.10.0",
"@protobuf-ts/runtime-rpc": "^2.10.0",
"execa": "^9.5.3",
"fs-extra": "^11.3.0",
"node-graceful-shutdown": "^1.1.5",
"ofetch": "^1.4.1"
},
"devDependencies": {
"@bufbuild/buf": "^1.53.0",
"@nuxtjs/eslint-config-typescript": "^6.0.1",
"@types/node": "^22.15.17",
"eslint": "^7.30.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-prettier": "^5.4.0",
"grpc-tools": "^1.13.0",
"jiti": "^2.4.2",
"standard-version": "^9.3.0",
"typescript": "^4.3.5",

View File

@@ -45,7 +45,7 @@ listen_addr: 127.0.0.1:${opts.port}
#
# For production:
# grpc_listen_addr: 0.0.0.0:50443
# grpc_listen_addr: 127.0.0.1:50443
grpc_listen_addr: 127.0.0.1:50443
# Allow the gRPC admin interface to run in INSECURE
# mode. This is not recommended as the traffic will

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,287 @@
// @generated by protobuf-ts 2.10.0
// @generated from protobuf file "google/protobuf/timestamp.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// 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: bigint;
/**
* 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: 0 /*LongType.BIGINT*/ },
{ 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)).toBigInt();
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)).toBigInt();
msg.nanos = ((ms % 1000) + (ms < 0 && ms % 1000 !== 0 ? 1000 : 0)) * 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).toBigInt();
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 = 0n;
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().toBigInt();
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 !== 0n)
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();

View File

@@ -0,0 +1,522 @@
// @generated by protobuf-ts 2.10.0
// @generated from protobuf file "headscale/v1/apikey.proto" (package "headscale.v1", syntax proto3)
// tslint:disable
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";
/**
* @generated from protobuf message headscale.v1.ApiKey
*/
export interface ApiKey {
/**
* @generated from protobuf field: uint64 id = 1;
*/
id: bigint;
/**
* @generated from protobuf field: string prefix = 2;
*/
prefix: string;
/**
* @generated from protobuf field: google.protobuf.Timestamp expiration = 3;
*/
expiration?: Timestamp;
/**
* @generated from protobuf field: google.protobuf.Timestamp created_at = 4;
*/
createdAt?: Timestamp;
/**
* @generated from protobuf field: google.protobuf.Timestamp last_seen = 5;
*/
lastSeen?: Timestamp;
}
/**
* @generated from protobuf message headscale.v1.CreateApiKeyRequest
*/
export interface CreateApiKeyRequest {
/**
* @generated from protobuf field: google.protobuf.Timestamp expiration = 1;
*/
expiration?: Timestamp;
}
/**
* @generated from protobuf message headscale.v1.CreateApiKeyResponse
*/
export interface CreateApiKeyResponse {
/**
* @generated from protobuf field: string api_key = 1;
*/
apiKey: string;
}
/**
* @generated from protobuf message headscale.v1.ExpireApiKeyRequest
*/
export interface ExpireApiKeyRequest {
/**
* @generated from protobuf field: string prefix = 1;
*/
prefix: string;
}
/**
* @generated from protobuf message headscale.v1.ExpireApiKeyResponse
*/
export interface ExpireApiKeyResponse {
}
/**
* @generated from protobuf message headscale.v1.ListApiKeysRequest
*/
export interface ListApiKeysRequest {
}
/**
* @generated from protobuf message headscale.v1.ListApiKeysResponse
*/
export interface ListApiKeysResponse {
/**
* @generated from protobuf field: repeated headscale.v1.ApiKey api_keys = 1;
*/
apiKeys: ApiKey[];
}
/**
* @generated from protobuf message headscale.v1.DeleteApiKeyRequest
*/
export interface DeleteApiKeyRequest {
/**
* @generated from protobuf field: string prefix = 1;
*/
prefix: string;
}
/**
* @generated from protobuf message headscale.v1.DeleteApiKeyResponse
*/
export interface DeleteApiKeyResponse {
}
// @generated message type with reflection information, may provide speed optimized methods
class ApiKey$Type extends MessageType<ApiKey> {
constructor() {
super("headscale.v1.ApiKey", [
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 2, name: "prefix", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "expiration", kind: "message", T: () => Timestamp },
{ no: 4, name: "created_at", kind: "message", T: () => Timestamp },
{ no: 5, name: "last_seen", kind: "message", T: () => Timestamp }
]);
}
create(value?: PartialMessage<ApiKey>): ApiKey {
const message = globalThis.Object.create((this.messagePrototype!));
message.id = 0n;
message.prefix = "";
if (value !== undefined)
reflectionMergePartial<ApiKey>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ApiKey): ApiKey {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 id */ 1:
message.id = reader.uint64().toBigInt();
break;
case /* string prefix */ 2:
message.prefix = reader.string();
break;
case /* google.protobuf.Timestamp expiration */ 3:
message.expiration = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiration);
break;
case /* google.protobuf.Timestamp created_at */ 4:
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
break;
case /* google.protobuf.Timestamp last_seen */ 5:
message.lastSeen = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastSeen);
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: ApiKey, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 id = 1; */
if (message.id !== 0n)
writer.tag(1, WireType.Varint).uint64(message.id);
/* string prefix = 2; */
if (message.prefix !== "")
writer.tag(2, WireType.LengthDelimited).string(message.prefix);
/* google.protobuf.Timestamp expiration = 3; */
if (message.expiration)
Timestamp.internalBinaryWrite(message.expiration, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Timestamp created_at = 4; */
if (message.createdAt)
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Timestamp last_seen = 5; */
if (message.lastSeen)
Timestamp.internalBinaryWrite(message.lastSeen, 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 headscale.v1.ApiKey
*/
export const ApiKey = new ApiKey$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateApiKeyRequest$Type extends MessageType<CreateApiKeyRequest> {
constructor() {
super("headscale.v1.CreateApiKeyRequest", [
{ no: 1, name: "expiration", kind: "message", T: () => Timestamp }
]);
}
create(value?: PartialMessage<CreateApiKeyRequest>): CreateApiKeyRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<CreateApiKeyRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateApiKeyRequest): CreateApiKeyRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* google.protobuf.Timestamp expiration */ 1:
message.expiration = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiration);
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: CreateApiKeyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* google.protobuf.Timestamp expiration = 1; */
if (message.expiration)
Timestamp.internalBinaryWrite(message.expiration, 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 headscale.v1.CreateApiKeyRequest
*/
export const CreateApiKeyRequest = new CreateApiKeyRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateApiKeyResponse$Type extends MessageType<CreateApiKeyResponse> {
constructor() {
super("headscale.v1.CreateApiKeyResponse", [
{ no: 1, name: "api_key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<CreateApiKeyResponse>): CreateApiKeyResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.apiKey = "";
if (value !== undefined)
reflectionMergePartial<CreateApiKeyResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateApiKeyResponse): CreateApiKeyResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string api_key */ 1:
message.apiKey = 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: CreateApiKeyResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string api_key = 1; */
if (message.apiKey !== "")
writer.tag(1, WireType.LengthDelimited).string(message.apiKey);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.CreateApiKeyResponse
*/
export const CreateApiKeyResponse = new CreateApiKeyResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExpireApiKeyRequest$Type extends MessageType<ExpireApiKeyRequest> {
constructor() {
super("headscale.v1.ExpireApiKeyRequest", [
{ no: 1, name: "prefix", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<ExpireApiKeyRequest>): ExpireApiKeyRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.prefix = "";
if (value !== undefined)
reflectionMergePartial<ExpireApiKeyRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExpireApiKeyRequest): ExpireApiKeyRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string prefix */ 1:
message.prefix = 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: ExpireApiKeyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string prefix = 1; */
if (message.prefix !== "")
writer.tag(1, WireType.LengthDelimited).string(message.prefix);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.ExpireApiKeyRequest
*/
export const ExpireApiKeyRequest = new ExpireApiKeyRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExpireApiKeyResponse$Type extends MessageType<ExpireApiKeyResponse> {
constructor() {
super("headscale.v1.ExpireApiKeyResponse", []);
}
create(value?: PartialMessage<ExpireApiKeyResponse>): ExpireApiKeyResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExpireApiKeyResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExpireApiKeyResponse): ExpireApiKeyResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: ExpireApiKeyResponse, 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 headscale.v1.ExpireApiKeyResponse
*/
export const ExpireApiKeyResponse = new ExpireApiKeyResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListApiKeysRequest$Type extends MessageType<ListApiKeysRequest> {
constructor() {
super("headscale.v1.ListApiKeysRequest", []);
}
create(value?: PartialMessage<ListApiKeysRequest>): ListApiKeysRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ListApiKeysRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListApiKeysRequest): ListApiKeysRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: ListApiKeysRequest, 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 headscale.v1.ListApiKeysRequest
*/
export const ListApiKeysRequest = new ListApiKeysRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListApiKeysResponse$Type extends MessageType<ListApiKeysResponse> {
constructor() {
super("headscale.v1.ListApiKeysResponse", [
{ no: 1, name: "api_keys", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ApiKey }
]);
}
create(value?: PartialMessage<ListApiKeysResponse>): ListApiKeysResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.apiKeys = [];
if (value !== undefined)
reflectionMergePartial<ListApiKeysResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListApiKeysResponse): ListApiKeysResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated headscale.v1.ApiKey api_keys */ 1:
message.apiKeys.push(ApiKey.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: ListApiKeysResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated headscale.v1.ApiKey api_keys = 1; */
for (let i = 0; i < message.apiKeys.length; i++)
ApiKey.internalBinaryWrite(message.apiKeys[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.ListApiKeysResponse
*/
export const ListApiKeysResponse = new ListApiKeysResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteApiKeyRequest$Type extends MessageType<DeleteApiKeyRequest> {
constructor() {
super("headscale.v1.DeleteApiKeyRequest", [
{ no: 1, name: "prefix", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<DeleteApiKeyRequest>): DeleteApiKeyRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.prefix = "";
if (value !== undefined)
reflectionMergePartial<DeleteApiKeyRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteApiKeyRequest): DeleteApiKeyRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string prefix */ 1:
message.prefix = 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: DeleteApiKeyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string prefix = 1; */
if (message.prefix !== "")
writer.tag(1, WireType.LengthDelimited).string(message.prefix);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.DeleteApiKeyRequest
*/
export const DeleteApiKeyRequest = new DeleteApiKeyRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteApiKeyResponse$Type extends MessageType<DeleteApiKeyResponse> {
constructor() {
super("headscale.v1.DeleteApiKeyResponse", []);
}
create(value?: PartialMessage<DeleteApiKeyResponse>): DeleteApiKeyResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteApiKeyResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteApiKeyResponse): DeleteApiKeyResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: DeleteApiKeyResponse, 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 headscale.v1.DeleteApiKeyResponse
*/
export const DeleteApiKeyResponse = new DeleteApiKeyResponse$Type();

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,420 @@
// @generated by protobuf-ts 2.10.0
// @generated from protobuf file "headscale/v1/headscale.proto" (package "headscale.v1", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { HeadscaleService } from "./headscale";
import type { SetPolicyResponse } from "./policy";
import type { SetPolicyRequest } from "./policy";
import type { GetPolicyResponse } from "./policy";
import type { GetPolicyRequest } from "./policy";
import type { DeleteApiKeyResponse } from "./apikey";
import type { DeleteApiKeyRequest } from "./apikey";
import type { ListApiKeysResponse } from "./apikey";
import type { ListApiKeysRequest } from "./apikey";
import type { ExpireApiKeyResponse } from "./apikey";
import type { ExpireApiKeyRequest } from "./apikey";
import type { CreateApiKeyResponse } from "./apikey";
import type { CreateApiKeyRequest } from "./apikey";
import type { DeleteRouteResponse } from "./routes";
import type { DeleteRouteRequest } from "./routes";
import type { GetNodeRoutesResponse } from "./routes";
import type { GetNodeRoutesRequest } from "./routes";
import type { DisableRouteResponse } from "./routes";
import type { DisableRouteRequest } from "./routes";
import type { EnableRouteResponse } from "./routes";
import type { EnableRouteRequest } from "./routes";
import type { GetRoutesResponse } from "./routes";
import type { GetRoutesRequest } from "./routes";
import type { BackfillNodeIPsResponse } from "./node";
import type { BackfillNodeIPsRequest } from "./node";
import type { MoveNodeResponse } from "./node";
import type { MoveNodeRequest } from "./node";
import type { ListNodesResponse } from "./node";
import type { ListNodesRequest } from "./node";
import type { RenameNodeResponse } from "./node";
import type { RenameNodeRequest } from "./node";
import type { ExpireNodeResponse } from "./node";
import type { ExpireNodeRequest } from "./node";
import type { DeleteNodeResponse } from "./node";
import type { DeleteNodeRequest } from "./node";
import type { RegisterNodeResponse } from "./node";
import type { RegisterNodeRequest } from "./node";
import type { SetTagsResponse } from "./node";
import type { SetTagsRequest } from "./node";
import type { GetNodeResponse } from "./node";
import type { GetNodeRequest } from "./node";
import type { DebugCreateNodeResponse } from "./node";
import type { DebugCreateNodeRequest } from "./node";
import type { ListPreAuthKeysResponse } from "./preauthkey";
import type { ListPreAuthKeysRequest } from "./preauthkey";
import type { ExpirePreAuthKeyResponse } from "./preauthkey";
import type { ExpirePreAuthKeyRequest } from "./preauthkey";
import type { CreatePreAuthKeyResponse } from "./preauthkey";
import type { CreatePreAuthKeyRequest } from "./preauthkey";
import type { ListUsersResponse } from "./user";
import type { ListUsersRequest } from "./user";
import type { DeleteUserResponse } from "./user";
import type { DeleteUserRequest } from "./user";
import type { RenameUserResponse } from "./user";
import type { RenameUserRequest } from "./user";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { CreateUserResponse } from "./user";
import type { CreateUserRequest } from "./user";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service headscale.v1.HeadscaleService
*/
export interface IHeadscaleServiceClient {
/**
* --- User start ---
*
* @generated from protobuf rpc: CreateUser(headscale.v1.CreateUserRequest) returns (headscale.v1.CreateUserResponse);
*/
createUser(input: CreateUserRequest, options?: RpcOptions): UnaryCall<CreateUserRequest, CreateUserResponse>;
/**
* @generated from protobuf rpc: RenameUser(headscale.v1.RenameUserRequest) returns (headscale.v1.RenameUserResponse);
*/
renameUser(input: RenameUserRequest, options?: RpcOptions): UnaryCall<RenameUserRequest, RenameUserResponse>;
/**
* @generated from protobuf rpc: DeleteUser(headscale.v1.DeleteUserRequest) returns (headscale.v1.DeleteUserResponse);
*/
deleteUser(input: DeleteUserRequest, options?: RpcOptions): UnaryCall<DeleteUserRequest, DeleteUserResponse>;
/**
* @generated from protobuf rpc: ListUsers(headscale.v1.ListUsersRequest) returns (headscale.v1.ListUsersResponse);
*/
listUsers(input: ListUsersRequest, options?: RpcOptions): UnaryCall<ListUsersRequest, ListUsersResponse>;
/**
* --- PreAuthKeys start ---
*
* @generated from protobuf rpc: CreatePreAuthKey(headscale.v1.CreatePreAuthKeyRequest) returns (headscale.v1.CreatePreAuthKeyResponse);
*/
createPreAuthKey(input: CreatePreAuthKeyRequest, options?: RpcOptions): UnaryCall<CreatePreAuthKeyRequest, CreatePreAuthKeyResponse>;
/**
* @generated from protobuf rpc: ExpirePreAuthKey(headscale.v1.ExpirePreAuthKeyRequest) returns (headscale.v1.ExpirePreAuthKeyResponse);
*/
expirePreAuthKey(input: ExpirePreAuthKeyRequest, options?: RpcOptions): UnaryCall<ExpirePreAuthKeyRequest, ExpirePreAuthKeyResponse>;
/**
* @generated from protobuf rpc: ListPreAuthKeys(headscale.v1.ListPreAuthKeysRequest) returns (headscale.v1.ListPreAuthKeysResponse);
*/
listPreAuthKeys(input: ListPreAuthKeysRequest, options?: RpcOptions): UnaryCall<ListPreAuthKeysRequest, ListPreAuthKeysResponse>;
/**
* --- Node start ---
*
* @generated from protobuf rpc: DebugCreateNode(headscale.v1.DebugCreateNodeRequest) returns (headscale.v1.DebugCreateNodeResponse);
*/
debugCreateNode(input: DebugCreateNodeRequest, options?: RpcOptions): UnaryCall<DebugCreateNodeRequest, DebugCreateNodeResponse>;
/**
* @generated from protobuf rpc: GetNode(headscale.v1.GetNodeRequest) returns (headscale.v1.GetNodeResponse);
*/
getNode(input: GetNodeRequest, options?: RpcOptions): UnaryCall<GetNodeRequest, GetNodeResponse>;
/**
* @generated from protobuf rpc: SetTags(headscale.v1.SetTagsRequest) returns (headscale.v1.SetTagsResponse);
*/
setTags(input: SetTagsRequest, options?: RpcOptions): UnaryCall<SetTagsRequest, SetTagsResponse>;
/**
* @generated from protobuf rpc: RegisterNode(headscale.v1.RegisterNodeRequest) returns (headscale.v1.RegisterNodeResponse);
*/
registerNode(input: RegisterNodeRequest, options?: RpcOptions): UnaryCall<RegisterNodeRequest, RegisterNodeResponse>;
/**
* @generated from protobuf rpc: DeleteNode(headscale.v1.DeleteNodeRequest) returns (headscale.v1.DeleteNodeResponse);
*/
deleteNode(input: DeleteNodeRequest, options?: RpcOptions): UnaryCall<DeleteNodeRequest, DeleteNodeResponse>;
/**
* @generated from protobuf rpc: ExpireNode(headscale.v1.ExpireNodeRequest) returns (headscale.v1.ExpireNodeResponse);
*/
expireNode(input: ExpireNodeRequest, options?: RpcOptions): UnaryCall<ExpireNodeRequest, ExpireNodeResponse>;
/**
* @generated from protobuf rpc: RenameNode(headscale.v1.RenameNodeRequest) returns (headscale.v1.RenameNodeResponse);
*/
renameNode(input: RenameNodeRequest, options?: RpcOptions): UnaryCall<RenameNodeRequest, RenameNodeResponse>;
/**
* @generated from protobuf rpc: ListNodes(headscale.v1.ListNodesRequest) returns (headscale.v1.ListNodesResponse);
*/
listNodes(input: ListNodesRequest, options?: RpcOptions): UnaryCall<ListNodesRequest, ListNodesResponse>;
/**
* @generated from protobuf rpc: MoveNode(headscale.v1.MoveNodeRequest) returns (headscale.v1.MoveNodeResponse);
*/
moveNode(input: MoveNodeRequest, options?: RpcOptions): UnaryCall<MoveNodeRequest, MoveNodeResponse>;
/**
* @generated from protobuf rpc: BackfillNodeIPs(headscale.v1.BackfillNodeIPsRequest) returns (headscale.v1.BackfillNodeIPsResponse);
*/
backfillNodeIPs(input: BackfillNodeIPsRequest, options?: RpcOptions): UnaryCall<BackfillNodeIPsRequest, BackfillNodeIPsResponse>;
// --- Node end ---
/**
* --- Route start ---
*
* @generated from protobuf rpc: GetRoutes(headscale.v1.GetRoutesRequest) returns (headscale.v1.GetRoutesResponse);
*/
getRoutes(input: GetRoutesRequest, options?: RpcOptions): UnaryCall<GetRoutesRequest, GetRoutesResponse>;
/**
* @generated from protobuf rpc: EnableRoute(headscale.v1.EnableRouteRequest) returns (headscale.v1.EnableRouteResponse);
*/
enableRoute(input: EnableRouteRequest, options?: RpcOptions): UnaryCall<EnableRouteRequest, EnableRouteResponse>;
/**
* @generated from protobuf rpc: DisableRoute(headscale.v1.DisableRouteRequest) returns (headscale.v1.DisableRouteResponse);
*/
disableRoute(input: DisableRouteRequest, options?: RpcOptions): UnaryCall<DisableRouteRequest, DisableRouteResponse>;
/**
* @generated from protobuf rpc: GetNodeRoutes(headscale.v1.GetNodeRoutesRequest) returns (headscale.v1.GetNodeRoutesResponse);
*/
getNodeRoutes(input: GetNodeRoutesRequest, options?: RpcOptions): UnaryCall<GetNodeRoutesRequest, GetNodeRoutesResponse>;
/**
* @generated from protobuf rpc: DeleteRoute(headscale.v1.DeleteRouteRequest) returns (headscale.v1.DeleteRouteResponse);
*/
deleteRoute(input: DeleteRouteRequest, options?: RpcOptions): UnaryCall<DeleteRouteRequest, DeleteRouteResponse>;
// --- Route end ---
/**
* --- ApiKeys start ---
*
* @generated from protobuf rpc: CreateApiKey(headscale.v1.CreateApiKeyRequest) returns (headscale.v1.CreateApiKeyResponse);
*/
createApiKey(input: CreateApiKeyRequest, options?: RpcOptions): UnaryCall<CreateApiKeyRequest, CreateApiKeyResponse>;
/**
* @generated from protobuf rpc: ExpireApiKey(headscale.v1.ExpireApiKeyRequest) returns (headscale.v1.ExpireApiKeyResponse);
*/
expireApiKey(input: ExpireApiKeyRequest, options?: RpcOptions): UnaryCall<ExpireApiKeyRequest, ExpireApiKeyResponse>;
/**
* @generated from protobuf rpc: ListApiKeys(headscale.v1.ListApiKeysRequest) returns (headscale.v1.ListApiKeysResponse);
*/
listApiKeys(input: ListApiKeysRequest, options?: RpcOptions): UnaryCall<ListApiKeysRequest, ListApiKeysResponse>;
/**
* @generated from protobuf rpc: DeleteApiKey(headscale.v1.DeleteApiKeyRequest) returns (headscale.v1.DeleteApiKeyResponse);
*/
deleteApiKey(input: DeleteApiKeyRequest, options?: RpcOptions): UnaryCall<DeleteApiKeyRequest, DeleteApiKeyResponse>;
/**
* --- Policy start ---
*
* @generated from protobuf rpc: GetPolicy(headscale.v1.GetPolicyRequest) returns (headscale.v1.GetPolicyResponse);
*/
getPolicy(input: GetPolicyRequest, options?: RpcOptions): UnaryCall<GetPolicyRequest, GetPolicyResponse>;
/**
* @generated from protobuf rpc: SetPolicy(headscale.v1.SetPolicyRequest) returns (headscale.v1.SetPolicyResponse);
*/
setPolicy(input: SetPolicyRequest, options?: RpcOptions): UnaryCall<SetPolicyRequest, SetPolicyResponse>;
}
/**
* @generated from protobuf service headscale.v1.HeadscaleService
*/
export class HeadscaleServiceClient implements IHeadscaleServiceClient, ServiceInfo {
typeName = HeadscaleService.typeName;
methods = HeadscaleService.methods;
options = HeadscaleService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* --- User start ---
*
* @generated from protobuf rpc: CreateUser(headscale.v1.CreateUserRequest) returns (headscale.v1.CreateUserResponse);
*/
createUser(input: CreateUserRequest, options?: RpcOptions): UnaryCall<CreateUserRequest, CreateUserResponse> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<CreateUserRequest, CreateUserResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: RenameUser(headscale.v1.RenameUserRequest) returns (headscale.v1.RenameUserResponse);
*/
renameUser(input: RenameUserRequest, options?: RpcOptions): UnaryCall<RenameUserRequest, RenameUserResponse> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<RenameUserRequest, RenameUserResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteUser(headscale.v1.DeleteUserRequest) returns (headscale.v1.DeleteUserResponse);
*/
deleteUser(input: DeleteUserRequest, options?: RpcOptions): UnaryCall<DeleteUserRequest, DeleteUserResponse> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteUserRequest, DeleteUserResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ListUsers(headscale.v1.ListUsersRequest) returns (headscale.v1.ListUsersResponse);
*/
listUsers(input: ListUsersRequest, options?: RpcOptions): UnaryCall<ListUsersRequest, ListUsersResponse> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<ListUsersRequest, ListUsersResponse>("unary", this._transport, method, opt, input);
}
/**
* --- PreAuthKeys start ---
*
* @generated from protobuf rpc: CreatePreAuthKey(headscale.v1.CreatePreAuthKeyRequest) returns (headscale.v1.CreatePreAuthKeyResponse);
*/
createPreAuthKey(input: CreatePreAuthKeyRequest, options?: RpcOptions): UnaryCall<CreatePreAuthKeyRequest, CreatePreAuthKeyResponse> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<CreatePreAuthKeyRequest, CreatePreAuthKeyResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ExpirePreAuthKey(headscale.v1.ExpirePreAuthKeyRequest) returns (headscale.v1.ExpirePreAuthKeyResponse);
*/
expirePreAuthKey(input: ExpirePreAuthKeyRequest, options?: RpcOptions): UnaryCall<ExpirePreAuthKeyRequest, ExpirePreAuthKeyResponse> {
const method = this.methods[5], opt = this._transport.mergeOptions(options);
return stackIntercept<ExpirePreAuthKeyRequest, ExpirePreAuthKeyResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ListPreAuthKeys(headscale.v1.ListPreAuthKeysRequest) returns (headscale.v1.ListPreAuthKeysResponse);
*/
listPreAuthKeys(input: ListPreAuthKeysRequest, options?: RpcOptions): UnaryCall<ListPreAuthKeysRequest, ListPreAuthKeysResponse> {
const method = this.methods[6], opt = this._transport.mergeOptions(options);
return stackIntercept<ListPreAuthKeysRequest, ListPreAuthKeysResponse>("unary", this._transport, method, opt, input);
}
/**
* --- Node start ---
*
* @generated from protobuf rpc: DebugCreateNode(headscale.v1.DebugCreateNodeRequest) returns (headscale.v1.DebugCreateNodeResponse);
*/
debugCreateNode(input: DebugCreateNodeRequest, options?: RpcOptions): UnaryCall<DebugCreateNodeRequest, DebugCreateNodeResponse> {
const method = this.methods[7], opt = this._transport.mergeOptions(options);
return stackIntercept<DebugCreateNodeRequest, DebugCreateNodeResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: GetNode(headscale.v1.GetNodeRequest) returns (headscale.v1.GetNodeResponse);
*/
getNode(input: GetNodeRequest, options?: RpcOptions): UnaryCall<GetNodeRequest, GetNodeResponse> {
const method = this.methods[8], opt = this._transport.mergeOptions(options);
return stackIntercept<GetNodeRequest, GetNodeResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: SetTags(headscale.v1.SetTagsRequest) returns (headscale.v1.SetTagsResponse);
*/
setTags(input: SetTagsRequest, options?: RpcOptions): UnaryCall<SetTagsRequest, SetTagsResponse> {
const method = this.methods[9], opt = this._transport.mergeOptions(options);
return stackIntercept<SetTagsRequest, SetTagsResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: RegisterNode(headscale.v1.RegisterNodeRequest) returns (headscale.v1.RegisterNodeResponse);
*/
registerNode(input: RegisterNodeRequest, options?: RpcOptions): UnaryCall<RegisterNodeRequest, RegisterNodeResponse> {
const method = this.methods[10], opt = this._transport.mergeOptions(options);
return stackIntercept<RegisterNodeRequest, RegisterNodeResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteNode(headscale.v1.DeleteNodeRequest) returns (headscale.v1.DeleteNodeResponse);
*/
deleteNode(input: DeleteNodeRequest, options?: RpcOptions): UnaryCall<DeleteNodeRequest, DeleteNodeResponse> {
const method = this.methods[11], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteNodeRequest, DeleteNodeResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ExpireNode(headscale.v1.ExpireNodeRequest) returns (headscale.v1.ExpireNodeResponse);
*/
expireNode(input: ExpireNodeRequest, options?: RpcOptions): UnaryCall<ExpireNodeRequest, ExpireNodeResponse> {
const method = this.methods[12], opt = this._transport.mergeOptions(options);
return stackIntercept<ExpireNodeRequest, ExpireNodeResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: RenameNode(headscale.v1.RenameNodeRequest) returns (headscale.v1.RenameNodeResponse);
*/
renameNode(input: RenameNodeRequest, options?: RpcOptions): UnaryCall<RenameNodeRequest, RenameNodeResponse> {
const method = this.methods[13], opt = this._transport.mergeOptions(options);
return stackIntercept<RenameNodeRequest, RenameNodeResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ListNodes(headscale.v1.ListNodesRequest) returns (headscale.v1.ListNodesResponse);
*/
listNodes(input: ListNodesRequest, options?: RpcOptions): UnaryCall<ListNodesRequest, ListNodesResponse> {
const method = this.methods[14], opt = this._transport.mergeOptions(options);
return stackIntercept<ListNodesRequest, ListNodesResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: MoveNode(headscale.v1.MoveNodeRequest) returns (headscale.v1.MoveNodeResponse);
*/
moveNode(input: MoveNodeRequest, options?: RpcOptions): UnaryCall<MoveNodeRequest, MoveNodeResponse> {
const method = this.methods[15], opt = this._transport.mergeOptions(options);
return stackIntercept<MoveNodeRequest, MoveNodeResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: BackfillNodeIPs(headscale.v1.BackfillNodeIPsRequest) returns (headscale.v1.BackfillNodeIPsResponse);
*/
backfillNodeIPs(input: BackfillNodeIPsRequest, options?: RpcOptions): UnaryCall<BackfillNodeIPsRequest, BackfillNodeIPsResponse> {
const method = this.methods[16], opt = this._transport.mergeOptions(options);
return stackIntercept<BackfillNodeIPsRequest, BackfillNodeIPsResponse>("unary", this._transport, method, opt, input);
}
// --- Node end ---
/**
* --- Route start ---
*
* @generated from protobuf rpc: GetRoutes(headscale.v1.GetRoutesRequest) returns (headscale.v1.GetRoutesResponse);
*/
getRoutes(input: GetRoutesRequest, options?: RpcOptions): UnaryCall<GetRoutesRequest, GetRoutesResponse> {
const method = this.methods[17], opt = this._transport.mergeOptions(options);
return stackIntercept<GetRoutesRequest, GetRoutesResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: EnableRoute(headscale.v1.EnableRouteRequest) returns (headscale.v1.EnableRouteResponse);
*/
enableRoute(input: EnableRouteRequest, options?: RpcOptions): UnaryCall<EnableRouteRequest, EnableRouteResponse> {
const method = this.methods[18], opt = this._transport.mergeOptions(options);
return stackIntercept<EnableRouteRequest, EnableRouteResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DisableRoute(headscale.v1.DisableRouteRequest) returns (headscale.v1.DisableRouteResponse);
*/
disableRoute(input: DisableRouteRequest, options?: RpcOptions): UnaryCall<DisableRouteRequest, DisableRouteResponse> {
const method = this.methods[19], opt = this._transport.mergeOptions(options);
return stackIntercept<DisableRouteRequest, DisableRouteResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: GetNodeRoutes(headscale.v1.GetNodeRoutesRequest) returns (headscale.v1.GetNodeRoutesResponse);
*/
getNodeRoutes(input: GetNodeRoutesRequest, options?: RpcOptions): UnaryCall<GetNodeRoutesRequest, GetNodeRoutesResponse> {
const method = this.methods[20], opt = this._transport.mergeOptions(options);
return stackIntercept<GetNodeRoutesRequest, GetNodeRoutesResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteRoute(headscale.v1.DeleteRouteRequest) returns (headscale.v1.DeleteRouteResponse);
*/
deleteRoute(input: DeleteRouteRequest, options?: RpcOptions): UnaryCall<DeleteRouteRequest, DeleteRouteResponse> {
const method = this.methods[21], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteRouteRequest, DeleteRouteResponse>("unary", this._transport, method, opt, input);
}
// --- Route end ---
/**
* --- ApiKeys start ---
*
* @generated from protobuf rpc: CreateApiKey(headscale.v1.CreateApiKeyRequest) returns (headscale.v1.CreateApiKeyResponse);
*/
createApiKey(input: CreateApiKeyRequest, options?: RpcOptions): UnaryCall<CreateApiKeyRequest, CreateApiKeyResponse> {
const method = this.methods[22], opt = this._transport.mergeOptions(options);
return stackIntercept<CreateApiKeyRequest, CreateApiKeyResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ExpireApiKey(headscale.v1.ExpireApiKeyRequest) returns (headscale.v1.ExpireApiKeyResponse);
*/
expireApiKey(input: ExpireApiKeyRequest, options?: RpcOptions): UnaryCall<ExpireApiKeyRequest, ExpireApiKeyResponse> {
const method = this.methods[23], opt = this._transport.mergeOptions(options);
return stackIntercept<ExpireApiKeyRequest, ExpireApiKeyResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ListApiKeys(headscale.v1.ListApiKeysRequest) returns (headscale.v1.ListApiKeysResponse);
*/
listApiKeys(input: ListApiKeysRequest, options?: RpcOptions): UnaryCall<ListApiKeysRequest, ListApiKeysResponse> {
const method = this.methods[24], opt = this._transport.mergeOptions(options);
return stackIntercept<ListApiKeysRequest, ListApiKeysResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteApiKey(headscale.v1.DeleteApiKeyRequest) returns (headscale.v1.DeleteApiKeyResponse);
*/
deleteApiKey(input: DeleteApiKeyRequest, options?: RpcOptions): UnaryCall<DeleteApiKeyRequest, DeleteApiKeyResponse> {
const method = this.methods[25], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteApiKeyRequest, DeleteApiKeyResponse>("unary", this._transport, method, opt, input);
}
/**
* --- Policy start ---
*
* @generated from protobuf rpc: GetPolicy(headscale.v1.GetPolicyRequest) returns (headscale.v1.GetPolicyResponse);
*/
getPolicy(input: GetPolicyRequest, options?: RpcOptions): UnaryCall<GetPolicyRequest, GetPolicyResponse> {
const method = this.methods[26], opt = this._transport.mergeOptions(options);
return stackIntercept<GetPolicyRequest, GetPolicyResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: SetPolicy(headscale.v1.SetPolicyRequest) returns (headscale.v1.SetPolicyResponse);
*/
setPolicy(input: SetPolicyRequest, options?: RpcOptions): UnaryCall<SetPolicyRequest, SetPolicyResponse> {
const method = this.methods[27], opt = this._transport.mergeOptions(options);
return stackIntercept<SetPolicyRequest, SetPolicyResponse>("unary", this._transport, method, opt, input);
}
}

View File

@@ -0,0 +1,93 @@
// @generated by protobuf-ts 2.10.0
// @generated from protobuf file "headscale/v1/headscale.proto" (package "headscale.v1", syntax proto3)
// tslint:disable
import { SetPolicyResponse } from "./policy";
import { SetPolicyRequest } from "./policy";
import { GetPolicyResponse } from "./policy";
import { GetPolicyRequest } from "./policy";
import { DeleteApiKeyResponse } from "./apikey";
import { DeleteApiKeyRequest } from "./apikey";
import { ListApiKeysResponse } from "./apikey";
import { ListApiKeysRequest } from "./apikey";
import { ExpireApiKeyResponse } from "./apikey";
import { ExpireApiKeyRequest } from "./apikey";
import { CreateApiKeyResponse } from "./apikey";
import { CreateApiKeyRequest } from "./apikey";
import { DeleteRouteResponse } from "./routes";
import { DeleteRouteRequest } from "./routes";
import { GetNodeRoutesResponse } from "./routes";
import { GetNodeRoutesRequest } from "./routes";
import { DisableRouteResponse } from "./routes";
import { DisableRouteRequest } from "./routes";
import { EnableRouteResponse } from "./routes";
import { EnableRouteRequest } from "./routes";
import { GetRoutesResponse } from "./routes";
import { GetRoutesRequest } from "./routes";
import { BackfillNodeIPsResponse } from "./node";
import { BackfillNodeIPsRequest } from "./node";
import { MoveNodeResponse } from "./node";
import { MoveNodeRequest } from "./node";
import { ListNodesResponse } from "./node";
import { ListNodesRequest } from "./node";
import { RenameNodeResponse } from "./node";
import { RenameNodeRequest } from "./node";
import { ExpireNodeResponse } from "./node";
import { ExpireNodeRequest } from "./node";
import { DeleteNodeResponse } from "./node";
import { DeleteNodeRequest } from "./node";
import { RegisterNodeResponse } from "./node";
import { RegisterNodeRequest } from "./node";
import { SetTagsResponse } from "./node";
import { SetTagsRequest } from "./node";
import { GetNodeResponse } from "./node";
import { GetNodeRequest } from "./node";
import { DebugCreateNodeResponse } from "./node";
import { DebugCreateNodeRequest } from "./node";
import { ListPreAuthKeysResponse } from "./preauthkey";
import { ListPreAuthKeysRequest } from "./preauthkey";
import { ExpirePreAuthKeyResponse } from "./preauthkey";
import { ExpirePreAuthKeyRequest } from "./preauthkey";
import { CreatePreAuthKeyResponse } from "./preauthkey";
import { CreatePreAuthKeyRequest } from "./preauthkey";
import { ListUsersResponse } from "./user";
import { ListUsersRequest } from "./user";
import { DeleteUserResponse } from "./user";
import { DeleteUserRequest } from "./user";
import { RenameUserResponse } from "./user";
import { RenameUserRequest } from "./user";
import { CreateUserResponse } from "./user";
import { CreateUserRequest } from "./user";
import { ServiceType } from "@protobuf-ts/runtime-rpc";
/**
* @generated ServiceType for protobuf service headscale.v1.HeadscaleService
*/
export const HeadscaleService = new ServiceType("headscale.v1.HeadscaleService", [
{ name: "CreateUser", options: { "google.api.http": { post: "/api/v1/user", body: "*" } }, I: CreateUserRequest, O: CreateUserResponse },
{ name: "RenameUser", options: { "google.api.http": { post: "/api/v1/user/{old_id}/rename/{new_name}" } }, I: RenameUserRequest, O: RenameUserResponse },
{ name: "DeleteUser", options: { "google.api.http": { delete: "/api/v1/user/{id}" } }, I: DeleteUserRequest, O: DeleteUserResponse },
{ name: "ListUsers", options: { "google.api.http": { get: "/api/v1/user" } }, I: ListUsersRequest, O: ListUsersResponse },
{ name: "CreatePreAuthKey", options: { "google.api.http": { post: "/api/v1/preauthkey", body: "*" } }, I: CreatePreAuthKeyRequest, O: CreatePreAuthKeyResponse },
{ name: "ExpirePreAuthKey", options: { "google.api.http": { post: "/api/v1/preauthkey/expire", body: "*" } }, I: ExpirePreAuthKeyRequest, O: ExpirePreAuthKeyResponse },
{ name: "ListPreAuthKeys", options: { "google.api.http": { get: "/api/v1/preauthkey" } }, I: ListPreAuthKeysRequest, O: ListPreAuthKeysResponse },
{ name: "DebugCreateNode", options: { "google.api.http": { post: "/api/v1/debug/node", body: "*" } }, I: DebugCreateNodeRequest, O: DebugCreateNodeResponse },
{ name: "GetNode", options: { "google.api.http": { get: "/api/v1/node/{node_id}" } }, I: GetNodeRequest, O: GetNodeResponse },
{ name: "SetTags", options: { "google.api.http": { post: "/api/v1/node/{node_id}/tags", body: "*" } }, I: SetTagsRequest, O: SetTagsResponse },
{ name: "RegisterNode", options: { "google.api.http": { post: "/api/v1/node/register" } }, I: RegisterNodeRequest, O: RegisterNodeResponse },
{ name: "DeleteNode", options: { "google.api.http": { delete: "/api/v1/node/{node_id}" } }, I: DeleteNodeRequest, O: DeleteNodeResponse },
{ name: "ExpireNode", options: { "google.api.http": { post: "/api/v1/node/{node_id}/expire" } }, I: ExpireNodeRequest, O: ExpireNodeResponse },
{ name: "RenameNode", options: { "google.api.http": { post: "/api/v1/node/{node_id}/rename/{new_name}" } }, I: RenameNodeRequest, O: RenameNodeResponse },
{ name: "ListNodes", options: { "google.api.http": { get: "/api/v1/node" } }, I: ListNodesRequest, O: ListNodesResponse },
{ name: "MoveNode", options: { "google.api.http": { post: "/api/v1/node/{node_id}/user", body: "*" } }, I: MoveNodeRequest, O: MoveNodeResponse },
{ name: "BackfillNodeIPs", options: { "google.api.http": { post: "/api/v1/node/backfillips" } }, I: BackfillNodeIPsRequest, O: BackfillNodeIPsResponse },
{ name: "GetRoutes", options: { "google.api.http": { get: "/api/v1/routes" } }, I: GetRoutesRequest, O: GetRoutesResponse },
{ name: "EnableRoute", options: { "google.api.http": { post: "/api/v1/routes/{route_id}/enable" } }, I: EnableRouteRequest, O: EnableRouteResponse },
{ name: "DisableRoute", options: { "google.api.http": { post: "/api/v1/routes/{route_id}/disable" } }, I: DisableRouteRequest, O: DisableRouteResponse },
{ name: "GetNodeRoutes", options: { "google.api.http": { get: "/api/v1/node/{node_id}/routes" } }, I: GetNodeRoutesRequest, O: GetNodeRoutesResponse },
{ name: "DeleteRoute", options: { "google.api.http": { delete: "/api/v1/routes/{route_id}" } }, I: DeleteRouteRequest, O: DeleteRouteResponse },
{ name: "CreateApiKey", options: { "google.api.http": { post: "/api/v1/apikey", body: "*" } }, I: CreateApiKeyRequest, O: CreateApiKeyResponse },
{ name: "ExpireApiKey", options: { "google.api.http": { post: "/api/v1/apikey/expire", body: "*" } }, I: ExpireApiKeyRequest, O: ExpireApiKeyResponse },
{ name: "ListApiKeys", options: { "google.api.http": { get: "/api/v1/apikey" } }, I: ListApiKeysRequest, O: ListApiKeysResponse },
{ name: "DeleteApiKey", options: { "google.api.http": { delete: "/api/v1/apikey/{prefix}" } }, I: DeleteApiKeyRequest, O: DeleteApiKeyResponse },
{ name: "GetPolicy", options: { "google.api.http": { get: "/api/v1/policy" } }, I: GetPolicyRequest, O: GetPolicyResponse },
{ name: "SetPolicy", options: { "google.api.http": { put: "/api/v1/policy", body: "*" } }, I: SetPolicyRequest, O: SetPolicyResponse }
]);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,246 @@
// @generated by protobuf-ts 2.10.0
// @generated from protobuf file "headscale/v1/policy.proto" (package "headscale.v1", syntax proto3)
// tslint:disable
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";
/**
* @generated from protobuf message headscale.v1.SetPolicyRequest
*/
export interface SetPolicyRequest {
/**
* @generated from protobuf field: string policy = 1;
*/
policy: string;
}
/**
* @generated from protobuf message headscale.v1.SetPolicyResponse
*/
export interface SetPolicyResponse {
/**
* @generated from protobuf field: string policy = 1;
*/
policy: string;
/**
* @generated from protobuf field: google.protobuf.Timestamp updated_at = 2;
*/
updatedAt?: Timestamp;
}
/**
* @generated from protobuf message headscale.v1.GetPolicyRequest
*/
export interface GetPolicyRequest {
}
/**
* @generated from protobuf message headscale.v1.GetPolicyResponse
*/
export interface GetPolicyResponse {
/**
* @generated from protobuf field: string policy = 1;
*/
policy: string;
/**
* @generated from protobuf field: google.protobuf.Timestamp updated_at = 2;
*/
updatedAt?: Timestamp;
}
// @generated message type with reflection information, may provide speed optimized methods
class SetPolicyRequest$Type extends MessageType<SetPolicyRequest> {
constructor() {
super("headscale.v1.SetPolicyRequest", [
{ no: 1, name: "policy", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<SetPolicyRequest>): SetPolicyRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.policy = "";
if (value !== undefined)
reflectionMergePartial<SetPolicyRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetPolicyRequest): SetPolicyRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string policy */ 1:
message.policy = 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: SetPolicyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string policy = 1; */
if (message.policy !== "")
writer.tag(1, WireType.LengthDelimited).string(message.policy);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.SetPolicyRequest
*/
export const SetPolicyRequest = new SetPolicyRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SetPolicyResponse$Type extends MessageType<SetPolicyResponse> {
constructor() {
super("headscale.v1.SetPolicyResponse", [
{ no: 1, name: "policy", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "updated_at", kind: "message", T: () => Timestamp }
]);
}
create(value?: PartialMessage<SetPolicyResponse>): SetPolicyResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.policy = "";
if (value !== undefined)
reflectionMergePartial<SetPolicyResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetPolicyResponse): SetPolicyResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string policy */ 1:
message.policy = reader.string();
break;
case /* google.protobuf.Timestamp updated_at */ 2:
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
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: SetPolicyResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string policy = 1; */
if (message.policy !== "")
writer.tag(1, WireType.LengthDelimited).string(message.policy);
/* google.protobuf.Timestamp updated_at = 2; */
if (message.updatedAt)
Timestamp.internalBinaryWrite(message.updatedAt, 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 headscale.v1.SetPolicyResponse
*/
export const SetPolicyResponse = new SetPolicyResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetPolicyRequest$Type extends MessageType<GetPolicyRequest> {
constructor() {
super("headscale.v1.GetPolicyRequest", []);
}
create(value?: PartialMessage<GetPolicyRequest>): GetPolicyRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<GetPolicyRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPolicyRequest): GetPolicyRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: GetPolicyRequest, 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 headscale.v1.GetPolicyRequest
*/
export const GetPolicyRequest = new GetPolicyRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetPolicyResponse$Type extends MessageType<GetPolicyResponse> {
constructor() {
super("headscale.v1.GetPolicyResponse", [
{ no: 1, name: "policy", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "updated_at", kind: "message", T: () => Timestamp }
]);
}
create(value?: PartialMessage<GetPolicyResponse>): GetPolicyResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.policy = "";
if (value !== undefined)
reflectionMergePartial<GetPolicyResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPolicyResponse): GetPolicyResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string policy */ 1:
message.policy = reader.string();
break;
case /* google.protobuf.Timestamp updated_at */ 2:
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
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: GetPolicyResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string policy = 1; */
if (message.policy !== "")
writer.tag(1, WireType.LengthDelimited).string(message.policy);
/* google.protobuf.Timestamp updated_at = 2; */
if (message.updatedAt)
Timestamp.internalBinaryWrite(message.updatedAt, 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 headscale.v1.GetPolicyResponse
*/
export const GetPolicyResponse = new GetPolicyResponse$Type();

View File

@@ -0,0 +1,544 @@
// @generated by protobuf-ts 2.10.0
// @generated from protobuf file "headscale/v1/preauthkey.proto" (package "headscale.v1", syntax proto3)
// tslint:disable
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";
/**
* @generated from protobuf message headscale.v1.PreAuthKey
*/
export interface PreAuthKey {
/**
* @generated from protobuf field: string user = 1;
*/
user: string;
/**
* @generated from protobuf field: string id = 2;
*/
id: string;
/**
* @generated from protobuf field: string key = 3;
*/
key: string;
/**
* @generated from protobuf field: bool reusable = 4;
*/
reusable: boolean;
/**
* @generated from protobuf field: bool ephemeral = 5;
*/
ephemeral: boolean;
/**
* @generated from protobuf field: bool used = 6;
*/
used: boolean;
/**
* @generated from protobuf field: google.protobuf.Timestamp expiration = 7;
*/
expiration?: Timestamp;
/**
* @generated from protobuf field: google.protobuf.Timestamp created_at = 8;
*/
createdAt?: Timestamp;
/**
* @generated from protobuf field: repeated string acl_tags = 9;
*/
aclTags: string[];
}
/**
* @generated from protobuf message headscale.v1.CreatePreAuthKeyRequest
*/
export interface CreatePreAuthKeyRequest {
/**
* @generated from protobuf field: string user = 1;
*/
user: string;
/**
* @generated from protobuf field: bool reusable = 2;
*/
reusable: boolean;
/**
* @generated from protobuf field: bool ephemeral = 3;
*/
ephemeral: boolean;
/**
* @generated from protobuf field: google.protobuf.Timestamp expiration = 4;
*/
expiration?: Timestamp;
/**
* @generated from protobuf field: repeated string acl_tags = 5;
*/
aclTags: string[];
}
/**
* @generated from protobuf message headscale.v1.CreatePreAuthKeyResponse
*/
export interface CreatePreAuthKeyResponse {
/**
* @generated from protobuf field: headscale.v1.PreAuthKey pre_auth_key = 1;
*/
preAuthKey?: PreAuthKey;
}
/**
* @generated from protobuf message headscale.v1.ExpirePreAuthKeyRequest
*/
export interface ExpirePreAuthKeyRequest {
/**
* @generated from protobuf field: string user = 1;
*/
user: string;
/**
* @generated from protobuf field: string key = 2;
*/
key: string;
}
/**
* @generated from protobuf message headscale.v1.ExpirePreAuthKeyResponse
*/
export interface ExpirePreAuthKeyResponse {
}
/**
* @generated from protobuf message headscale.v1.ListPreAuthKeysRequest
*/
export interface ListPreAuthKeysRequest {
/**
* @generated from protobuf field: string user = 1;
*/
user: string;
}
/**
* @generated from protobuf message headscale.v1.ListPreAuthKeysResponse
*/
export interface ListPreAuthKeysResponse {
/**
* @generated from protobuf field: repeated headscale.v1.PreAuthKey pre_auth_keys = 1;
*/
preAuthKeys: PreAuthKey[];
}
// @generated message type with reflection information, may provide speed optimized methods
class PreAuthKey$Type extends MessageType<PreAuthKey> {
constructor() {
super("headscale.v1.PreAuthKey", [
{ no: 1, name: "user", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "reusable", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 5, name: "ephemeral", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 6, name: "used", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 7, name: "expiration", kind: "message", T: () => Timestamp },
{ no: 8, name: "created_at", kind: "message", T: () => Timestamp },
{ no: 9, name: "acl_tags", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<PreAuthKey>): PreAuthKey {
const message = globalThis.Object.create((this.messagePrototype!));
message.user = "";
message.id = "";
message.key = "";
message.reusable = false;
message.ephemeral = false;
message.used = false;
message.aclTags = [];
if (value !== undefined)
reflectionMergePartial<PreAuthKey>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PreAuthKey): PreAuthKey {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string user */ 1:
message.user = reader.string();
break;
case /* string id */ 2:
message.id = reader.string();
break;
case /* string key */ 3:
message.key = reader.string();
break;
case /* bool reusable */ 4:
message.reusable = reader.bool();
break;
case /* bool ephemeral */ 5:
message.ephemeral = reader.bool();
break;
case /* bool used */ 6:
message.used = reader.bool();
break;
case /* google.protobuf.Timestamp expiration */ 7:
message.expiration = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiration);
break;
case /* google.protobuf.Timestamp created_at */ 8:
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
break;
case /* repeated string acl_tags */ 9:
message.aclTags.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: PreAuthKey, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string user = 1; */
if (message.user !== "")
writer.tag(1, WireType.LengthDelimited).string(message.user);
/* string id = 2; */
if (message.id !== "")
writer.tag(2, WireType.LengthDelimited).string(message.id);
/* string key = 3; */
if (message.key !== "")
writer.tag(3, WireType.LengthDelimited).string(message.key);
/* bool reusable = 4; */
if (message.reusable !== false)
writer.tag(4, WireType.Varint).bool(message.reusable);
/* bool ephemeral = 5; */
if (message.ephemeral !== false)
writer.tag(5, WireType.Varint).bool(message.ephemeral);
/* bool used = 6; */
if (message.used !== false)
writer.tag(6, WireType.Varint).bool(message.used);
/* google.protobuf.Timestamp expiration = 7; */
if (message.expiration)
Timestamp.internalBinaryWrite(message.expiration, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Timestamp created_at = 8; */
if (message.createdAt)
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
/* repeated string acl_tags = 9; */
for (let i = 0; i < message.aclTags.length; i++)
writer.tag(9, WireType.LengthDelimited).string(message.aclTags[i]);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.PreAuthKey
*/
export const PreAuthKey = new PreAuthKey$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreatePreAuthKeyRequest$Type extends MessageType<CreatePreAuthKeyRequest> {
constructor() {
super("headscale.v1.CreatePreAuthKeyRequest", [
{ no: 1, name: "user", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "reusable", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 3, name: "ephemeral", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 4, name: "expiration", kind: "message", T: () => Timestamp },
{ no: 5, name: "acl_tags", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<CreatePreAuthKeyRequest>): CreatePreAuthKeyRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.user = "";
message.reusable = false;
message.ephemeral = false;
message.aclTags = [];
if (value !== undefined)
reflectionMergePartial<CreatePreAuthKeyRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreatePreAuthKeyRequest): CreatePreAuthKeyRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string user */ 1:
message.user = reader.string();
break;
case /* bool reusable */ 2:
message.reusable = reader.bool();
break;
case /* bool ephemeral */ 3:
message.ephemeral = reader.bool();
break;
case /* google.protobuf.Timestamp expiration */ 4:
message.expiration = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiration);
break;
case /* repeated string acl_tags */ 5:
message.aclTags.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: CreatePreAuthKeyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string user = 1; */
if (message.user !== "")
writer.tag(1, WireType.LengthDelimited).string(message.user);
/* bool reusable = 2; */
if (message.reusable !== false)
writer.tag(2, WireType.Varint).bool(message.reusable);
/* bool ephemeral = 3; */
if (message.ephemeral !== false)
writer.tag(3, WireType.Varint).bool(message.ephemeral);
/* google.protobuf.Timestamp expiration = 4; */
if (message.expiration)
Timestamp.internalBinaryWrite(message.expiration, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* repeated string acl_tags = 5; */
for (let i = 0; i < message.aclTags.length; i++)
writer.tag(5, WireType.LengthDelimited).string(message.aclTags[i]);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.CreatePreAuthKeyRequest
*/
export const CreatePreAuthKeyRequest = new CreatePreAuthKeyRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreatePreAuthKeyResponse$Type extends MessageType<CreatePreAuthKeyResponse> {
constructor() {
super("headscale.v1.CreatePreAuthKeyResponse", [
{ no: 1, name: "pre_auth_key", kind: "message", T: () => PreAuthKey }
]);
}
create(value?: PartialMessage<CreatePreAuthKeyResponse>): CreatePreAuthKeyResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<CreatePreAuthKeyResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreatePreAuthKeyResponse): CreatePreAuthKeyResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* headscale.v1.PreAuthKey pre_auth_key */ 1:
message.preAuthKey = PreAuthKey.internalBinaryRead(reader, reader.uint32(), options, message.preAuthKey);
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: CreatePreAuthKeyResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* headscale.v1.PreAuthKey pre_auth_key = 1; */
if (message.preAuthKey)
PreAuthKey.internalBinaryWrite(message.preAuthKey, 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 headscale.v1.CreatePreAuthKeyResponse
*/
export const CreatePreAuthKeyResponse = new CreatePreAuthKeyResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExpirePreAuthKeyRequest$Type extends MessageType<ExpirePreAuthKeyRequest> {
constructor() {
super("headscale.v1.ExpirePreAuthKeyRequest", [
{ no: 1, name: "user", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<ExpirePreAuthKeyRequest>): ExpirePreAuthKeyRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.user = "";
message.key = "";
if (value !== undefined)
reflectionMergePartial<ExpirePreAuthKeyRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExpirePreAuthKeyRequest): ExpirePreAuthKeyRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string user */ 1:
message.user = reader.string();
break;
case /* string key */ 2:
message.key = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: ExpirePreAuthKeyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string user = 1; */
if (message.user !== "")
writer.tag(1, WireType.LengthDelimited).string(message.user);
/* string key = 2; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.ExpirePreAuthKeyRequest
*/
export const ExpirePreAuthKeyRequest = new ExpirePreAuthKeyRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExpirePreAuthKeyResponse$Type extends MessageType<ExpirePreAuthKeyResponse> {
constructor() {
super("headscale.v1.ExpirePreAuthKeyResponse", []);
}
create(value?: PartialMessage<ExpirePreAuthKeyResponse>): ExpirePreAuthKeyResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExpirePreAuthKeyResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExpirePreAuthKeyResponse): ExpirePreAuthKeyResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: ExpirePreAuthKeyResponse, 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 headscale.v1.ExpirePreAuthKeyResponse
*/
export const ExpirePreAuthKeyResponse = new ExpirePreAuthKeyResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListPreAuthKeysRequest$Type extends MessageType<ListPreAuthKeysRequest> {
constructor() {
super("headscale.v1.ListPreAuthKeysRequest", [
{ no: 1, name: "user", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<ListPreAuthKeysRequest>): ListPreAuthKeysRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.user = "";
if (value !== undefined)
reflectionMergePartial<ListPreAuthKeysRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListPreAuthKeysRequest): ListPreAuthKeysRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string user */ 1:
message.user = 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: ListPreAuthKeysRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string user = 1; */
if (message.user !== "")
writer.tag(1, WireType.LengthDelimited).string(message.user);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.ListPreAuthKeysRequest
*/
export const ListPreAuthKeysRequest = new ListPreAuthKeysRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListPreAuthKeysResponse$Type extends MessageType<ListPreAuthKeysResponse> {
constructor() {
super("headscale.v1.ListPreAuthKeysResponse", [
{ no: 1, name: "pre_auth_keys", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PreAuthKey }
]);
}
create(value?: PartialMessage<ListPreAuthKeysResponse>): ListPreAuthKeysResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.preAuthKeys = [];
if (value !== undefined)
reflectionMergePartial<ListPreAuthKeysResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListPreAuthKeysResponse): ListPreAuthKeysResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated headscale.v1.PreAuthKey pre_auth_keys */ 1:
message.preAuthKeys.push(PreAuthKey.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: ListPreAuthKeysResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated headscale.v1.PreAuthKey pre_auth_keys = 1; */
for (let i = 0; i < message.preAuthKeys.length; i++)
PreAuthKey.internalBinaryWrite(message.preAuthKeys[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.ListPreAuthKeysResponse
*/
export const ListPreAuthKeysResponse = new ListPreAuthKeysResponse$Type();

View File

@@ -0,0 +1,670 @@
// @generated by protobuf-ts 2.10.0
// @generated from protobuf file "headscale/v1/routes.proto" (package "headscale.v1", syntax proto3)
// tslint:disable
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";
import { Node } from "./node";
/**
* @generated from protobuf message headscale.v1.Route
*/
export interface Route {
/**
* @generated from protobuf field: uint64 id = 1;
*/
id: bigint;
/**
* @generated from protobuf field: headscale.v1.Node node = 2;
*/
node?: Node;
/**
* @generated from protobuf field: string prefix = 3;
*/
prefix: string;
/**
* @generated from protobuf field: bool advertised = 4;
*/
advertised: boolean;
/**
* @generated from protobuf field: bool enabled = 5;
*/
enabled: boolean;
/**
* @generated from protobuf field: bool is_primary = 6;
*/
isPrimary: boolean;
/**
* @generated from protobuf field: google.protobuf.Timestamp created_at = 7;
*/
createdAt?: Timestamp;
/**
* @generated from protobuf field: google.protobuf.Timestamp updated_at = 8;
*/
updatedAt?: Timestamp;
/**
* @generated from protobuf field: google.protobuf.Timestamp deleted_at = 9;
*/
deletedAt?: Timestamp;
}
/**
* @generated from protobuf message headscale.v1.GetRoutesRequest
*/
export interface GetRoutesRequest {
}
/**
* @generated from protobuf message headscale.v1.GetRoutesResponse
*/
export interface GetRoutesResponse {
/**
* @generated from protobuf field: repeated headscale.v1.Route routes = 1;
*/
routes: Route[];
}
/**
* @generated from protobuf message headscale.v1.EnableRouteRequest
*/
export interface EnableRouteRequest {
/**
* @generated from protobuf field: uint64 route_id = 1;
*/
routeId: bigint;
}
/**
* @generated from protobuf message headscale.v1.EnableRouteResponse
*/
export interface EnableRouteResponse {
}
/**
* @generated from protobuf message headscale.v1.DisableRouteRequest
*/
export interface DisableRouteRequest {
/**
* @generated from protobuf field: uint64 route_id = 1;
*/
routeId: bigint;
}
/**
* @generated from protobuf message headscale.v1.DisableRouteResponse
*/
export interface DisableRouteResponse {
}
/**
* @generated from protobuf message headscale.v1.GetNodeRoutesRequest
*/
export interface GetNodeRoutesRequest {
/**
* @generated from protobuf field: uint64 node_id = 1;
*/
nodeId: bigint;
}
/**
* @generated from protobuf message headscale.v1.GetNodeRoutesResponse
*/
export interface GetNodeRoutesResponse {
/**
* @generated from protobuf field: repeated headscale.v1.Route routes = 1;
*/
routes: Route[];
}
/**
* @generated from protobuf message headscale.v1.DeleteRouteRequest
*/
export interface DeleteRouteRequest {
/**
* @generated from protobuf field: uint64 route_id = 1;
*/
routeId: bigint;
}
/**
* @generated from protobuf message headscale.v1.DeleteRouteResponse
*/
export interface DeleteRouteResponse {
}
// @generated message type with reflection information, may provide speed optimized methods
class Route$Type extends MessageType<Route> {
constructor() {
super("headscale.v1.Route", [
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 2, name: "node", kind: "message", T: () => Node },
{ no: 3, name: "prefix", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "advertised", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 5, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 6, name: "is_primary", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 7, name: "created_at", kind: "message", T: () => Timestamp },
{ no: 8, name: "updated_at", kind: "message", T: () => Timestamp },
{ no: 9, name: "deleted_at", kind: "message", T: () => Timestamp }
]);
}
create(value?: PartialMessage<Route>): Route {
const message = globalThis.Object.create((this.messagePrototype!));
message.id = 0n;
message.prefix = "";
message.advertised = false;
message.enabled = false;
message.isPrimary = false;
if (value !== undefined)
reflectionMergePartial<Route>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Route): Route {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 id */ 1:
message.id = reader.uint64().toBigInt();
break;
case /* headscale.v1.Node node */ 2:
message.node = Node.internalBinaryRead(reader, reader.uint32(), options, message.node);
break;
case /* string prefix */ 3:
message.prefix = reader.string();
break;
case /* bool advertised */ 4:
message.advertised = reader.bool();
break;
case /* bool enabled */ 5:
message.enabled = reader.bool();
break;
case /* bool is_primary */ 6:
message.isPrimary = reader.bool();
break;
case /* google.protobuf.Timestamp created_at */ 7:
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
break;
case /* google.protobuf.Timestamp updated_at */ 8:
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
break;
case /* google.protobuf.Timestamp deleted_at */ 9:
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
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: Route, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 id = 1; */
if (message.id !== 0n)
writer.tag(1, WireType.Varint).uint64(message.id);
/* headscale.v1.Node node = 2; */
if (message.node)
Node.internalBinaryWrite(message.node, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* string prefix = 3; */
if (message.prefix !== "")
writer.tag(3, WireType.LengthDelimited).string(message.prefix);
/* bool advertised = 4; */
if (message.advertised !== false)
writer.tag(4, WireType.Varint).bool(message.advertised);
/* bool enabled = 5; */
if (message.enabled !== false)
writer.tag(5, WireType.Varint).bool(message.enabled);
/* bool is_primary = 6; */
if (message.isPrimary !== false)
writer.tag(6, WireType.Varint).bool(message.isPrimary);
/* google.protobuf.Timestamp created_at = 7; */
if (message.createdAt)
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Timestamp updated_at = 8; */
if (message.updatedAt)
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Timestamp deleted_at = 9; */
if (message.deletedAt)
Timestamp.internalBinaryWrite(message.deletedAt, 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 headscale.v1.Route
*/
export const Route = new Route$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetRoutesRequest$Type extends MessageType<GetRoutesRequest> {
constructor() {
super("headscale.v1.GetRoutesRequest", []);
}
create(value?: PartialMessage<GetRoutesRequest>): GetRoutesRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<GetRoutesRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetRoutesRequest): GetRoutesRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: GetRoutesRequest, 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 headscale.v1.GetRoutesRequest
*/
export const GetRoutesRequest = new GetRoutesRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetRoutesResponse$Type extends MessageType<GetRoutesResponse> {
constructor() {
super("headscale.v1.GetRoutesResponse", [
{ no: 1, name: "routes", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Route }
]);
}
create(value?: PartialMessage<GetRoutesResponse>): GetRoutesResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.routes = [];
if (value !== undefined)
reflectionMergePartial<GetRoutesResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetRoutesResponse): GetRoutesResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated headscale.v1.Route routes */ 1:
message.routes.push(Route.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: GetRoutesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated headscale.v1.Route routes = 1; */
for (let i = 0; i < message.routes.length; i++)
Route.internalBinaryWrite(message.routes[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.GetRoutesResponse
*/
export const GetRoutesResponse = new GetRoutesResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class EnableRouteRequest$Type extends MessageType<EnableRouteRequest> {
constructor() {
super("headscale.v1.EnableRouteRequest", [
{ no: 1, name: "route_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<EnableRouteRequest>): EnableRouteRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.routeId = 0n;
if (value !== undefined)
reflectionMergePartial<EnableRouteRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnableRouteRequest): EnableRouteRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 route_id */ 1:
message.routeId = reader.uint64().toBigInt();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: EnableRouteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 route_id = 1; */
if (message.routeId !== 0n)
writer.tag(1, WireType.Varint).uint64(message.routeId);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.EnableRouteRequest
*/
export const EnableRouteRequest = new EnableRouteRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class EnableRouteResponse$Type extends MessageType<EnableRouteResponse> {
constructor() {
super("headscale.v1.EnableRouteResponse", []);
}
create(value?: PartialMessage<EnableRouteResponse>): EnableRouteResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<EnableRouteResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnableRouteResponse): EnableRouteResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: EnableRouteResponse, 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 headscale.v1.EnableRouteResponse
*/
export const EnableRouteResponse = new EnableRouteResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DisableRouteRequest$Type extends MessageType<DisableRouteRequest> {
constructor() {
super("headscale.v1.DisableRouteRequest", [
{ no: 1, name: "route_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<DisableRouteRequest>): DisableRouteRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.routeId = 0n;
if (value !== undefined)
reflectionMergePartial<DisableRouteRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DisableRouteRequest): DisableRouteRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 route_id */ 1:
message.routeId = reader.uint64().toBigInt();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: DisableRouteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 route_id = 1; */
if (message.routeId !== 0n)
writer.tag(1, WireType.Varint).uint64(message.routeId);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.DisableRouteRequest
*/
export const DisableRouteRequest = new DisableRouteRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DisableRouteResponse$Type extends MessageType<DisableRouteResponse> {
constructor() {
super("headscale.v1.DisableRouteResponse", []);
}
create(value?: PartialMessage<DisableRouteResponse>): DisableRouteResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DisableRouteResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DisableRouteResponse): DisableRouteResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: DisableRouteResponse, 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 headscale.v1.DisableRouteResponse
*/
export const DisableRouteResponse = new DisableRouteResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetNodeRoutesRequest$Type extends MessageType<GetNodeRoutesRequest> {
constructor() {
super("headscale.v1.GetNodeRoutesRequest", [
{ no: 1, name: "node_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<GetNodeRoutesRequest>): GetNodeRoutesRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.nodeId = 0n;
if (value !== undefined)
reflectionMergePartial<GetNodeRoutesRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetNodeRoutesRequest): GetNodeRoutesRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 node_id */ 1:
message.nodeId = reader.uint64().toBigInt();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: GetNodeRoutesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 node_id = 1; */
if (message.nodeId !== 0n)
writer.tag(1, WireType.Varint).uint64(message.nodeId);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.GetNodeRoutesRequest
*/
export const GetNodeRoutesRequest = new GetNodeRoutesRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetNodeRoutesResponse$Type extends MessageType<GetNodeRoutesResponse> {
constructor() {
super("headscale.v1.GetNodeRoutesResponse", [
{ no: 1, name: "routes", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Route }
]);
}
create(value?: PartialMessage<GetNodeRoutesResponse>): GetNodeRoutesResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.routes = [];
if (value !== undefined)
reflectionMergePartial<GetNodeRoutesResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetNodeRoutesResponse): GetNodeRoutesResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated headscale.v1.Route routes */ 1:
message.routes.push(Route.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: GetNodeRoutesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated headscale.v1.Route routes = 1; */
for (let i = 0; i < message.routes.length; i++)
Route.internalBinaryWrite(message.routes[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.GetNodeRoutesResponse
*/
export const GetNodeRoutesResponse = new GetNodeRoutesResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteRouteRequest$Type extends MessageType<DeleteRouteRequest> {
constructor() {
super("headscale.v1.DeleteRouteRequest", [
{ no: 1, name: "route_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<DeleteRouteRequest>): DeleteRouteRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.routeId = 0n;
if (value !== undefined)
reflectionMergePartial<DeleteRouteRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRouteRequest): DeleteRouteRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 route_id */ 1:
message.routeId = reader.uint64().toBigInt();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: DeleteRouteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 route_id = 1; */
if (message.routeId !== 0n)
writer.tag(1, WireType.Varint).uint64(message.routeId);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.DeleteRouteRequest
*/
export const DeleteRouteRequest = new DeleteRouteRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteRouteResponse$Type extends MessageType<DeleteRouteResponse> {
constructor() {
super("headscale.v1.DeleteRouteResponse", []);
}
create(value?: PartialMessage<DeleteRouteResponse>): DeleteRouteResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteRouteResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRouteResponse): DeleteRouteResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: DeleteRouteResponse, 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 headscale.v1.DeleteRouteResponse
*/
export const DeleteRouteResponse = new DeleteRouteResponse$Type();

View File

@@ -0,0 +1,657 @@
// @generated by protobuf-ts 2.10.0
// @generated from protobuf file "headscale/v1/user.proto" (package "headscale.v1", syntax proto3)
// tslint:disable
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";
/**
* @generated from protobuf message headscale.v1.User
*/
export interface User {
/**
* @generated from protobuf field: uint64 id = 1;
*/
id: bigint;
/**
* @generated from protobuf field: string name = 2;
*/
name: string;
/**
* @generated from protobuf field: google.protobuf.Timestamp created_at = 3;
*/
createdAt?: Timestamp;
/**
* @generated from protobuf field: string display_name = 4;
*/
displayName: string;
/**
* @generated from protobuf field: string email = 5;
*/
email: string;
/**
* @generated from protobuf field: string provider_id = 6;
*/
providerId: string;
/**
* @generated from protobuf field: string provider = 7;
*/
provider: string;
/**
* @generated from protobuf field: string profile_pic_url = 8;
*/
profilePicUrl: string;
}
/**
* @generated from protobuf message headscale.v1.CreateUserRequest
*/
export interface CreateUserRequest {
/**
* @generated from protobuf field: string name = 1;
*/
name: string;
/**
* @generated from protobuf field: string display_name = 2;
*/
displayName: string;
/**
* @generated from protobuf field: string email = 3;
*/
email: string;
/**
* @generated from protobuf field: string picture_url = 4;
*/
pictureUrl: string;
}
/**
* @generated from protobuf message headscale.v1.CreateUserResponse
*/
export interface CreateUserResponse {
/**
* @generated from protobuf field: headscale.v1.User user = 1;
*/
user?: User;
}
/**
* @generated from protobuf message headscale.v1.RenameUserRequest
*/
export interface RenameUserRequest {
/**
* @generated from protobuf field: uint64 old_id = 1;
*/
oldId: bigint;
/**
* @generated from protobuf field: string new_name = 2;
*/
newName: string;
}
/**
* @generated from protobuf message headscale.v1.RenameUserResponse
*/
export interface RenameUserResponse {
/**
* @generated from protobuf field: headscale.v1.User user = 1;
*/
user?: User;
}
/**
* @generated from protobuf message headscale.v1.DeleteUserRequest
*/
export interface DeleteUserRequest {
/**
* @generated from protobuf field: uint64 id = 1;
*/
id: bigint;
}
/**
* @generated from protobuf message headscale.v1.DeleteUserResponse
*/
export interface DeleteUserResponse {
}
/**
* @generated from protobuf message headscale.v1.ListUsersRequest
*/
export interface ListUsersRequest {
/**
* @generated from protobuf field: uint64 id = 1;
*/
id: bigint;
/**
* @generated from protobuf field: string name = 2;
*/
name: string;
/**
* @generated from protobuf field: string email = 3;
*/
email: string;
}
/**
* @generated from protobuf message headscale.v1.ListUsersResponse
*/
export interface ListUsersResponse {
/**
* @generated from protobuf field: repeated headscale.v1.User users = 1;
*/
users: User[];
}
// @generated message type with reflection information, may provide speed optimized methods
class User$Type extends MessageType<User> {
constructor() {
super("headscale.v1.User", [
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "created_at", kind: "message", T: () => Timestamp },
{ no: 4, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 6, name: "provider_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 7, name: "provider", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 8, name: "profile_pic_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<User>): User {
const message = globalThis.Object.create((this.messagePrototype!));
message.id = 0n;
message.name = "";
message.displayName = "";
message.email = "";
message.providerId = "";
message.provider = "";
message.profilePicUrl = "";
if (value !== undefined)
reflectionMergePartial<User>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: User): User {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 id */ 1:
message.id = reader.uint64().toBigInt();
break;
case /* string name */ 2:
message.name = reader.string();
break;
case /* google.protobuf.Timestamp created_at */ 3:
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
break;
case /* string display_name */ 4:
message.displayName = reader.string();
break;
case /* string email */ 5:
message.email = reader.string();
break;
case /* string provider_id */ 6:
message.providerId = reader.string();
break;
case /* string provider */ 7:
message.provider = reader.string();
break;
case /* string profile_pic_url */ 8:
message.profilePicUrl = 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: User, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 id = 1; */
if (message.id !== 0n)
writer.tag(1, WireType.Varint).uint64(message.id);
/* string name = 2; */
if (message.name !== "")
writer.tag(2, WireType.LengthDelimited).string(message.name);
/* google.protobuf.Timestamp created_at = 3; */
if (message.createdAt)
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* string display_name = 4; */
if (message.displayName !== "")
writer.tag(4, WireType.LengthDelimited).string(message.displayName);
/* string email = 5; */
if (message.email !== "")
writer.tag(5, WireType.LengthDelimited).string(message.email);
/* string provider_id = 6; */
if (message.providerId !== "")
writer.tag(6, WireType.LengthDelimited).string(message.providerId);
/* string provider = 7; */
if (message.provider !== "")
writer.tag(7, WireType.LengthDelimited).string(message.provider);
/* string profile_pic_url = 8; */
if (message.profilePicUrl !== "")
writer.tag(8, WireType.LengthDelimited).string(message.profilePicUrl);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.User
*/
export const User = new User$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateUserRequest$Type extends MessageType<CreateUserRequest> {
constructor() {
super("headscale.v1.CreateUserRequest", [
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "picture_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<CreateUserRequest>): CreateUserRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
message.displayName = "";
message.email = "";
message.pictureUrl = "";
if (value !== undefined)
reflectionMergePartial<CreateUserRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateUserRequest): CreateUserRequest {
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 display_name */ 2:
message.displayName = reader.string();
break;
case /* string email */ 3:
message.email = reader.string();
break;
case /* string picture_url */ 4:
message.pictureUrl = 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: CreateUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string name = 1; */
if (message.name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* string display_name = 2; */
if (message.displayName !== "")
writer.tag(2, WireType.LengthDelimited).string(message.displayName);
/* string email = 3; */
if (message.email !== "")
writer.tag(3, WireType.LengthDelimited).string(message.email);
/* string picture_url = 4; */
if (message.pictureUrl !== "")
writer.tag(4, WireType.LengthDelimited).string(message.pictureUrl);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.CreateUserRequest
*/
export const CreateUserRequest = new CreateUserRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateUserResponse$Type extends MessageType<CreateUserResponse> {
constructor() {
super("headscale.v1.CreateUserResponse", [
{ no: 1, name: "user", kind: "message", T: () => User }
]);
}
create(value?: PartialMessage<CreateUserResponse>): CreateUserResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<CreateUserResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateUserResponse): CreateUserResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* headscale.v1.User user */ 1:
message.user = User.internalBinaryRead(reader, reader.uint32(), options, message.user);
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: CreateUserResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* headscale.v1.User user = 1; */
if (message.user)
User.internalBinaryWrite(message.user, 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 headscale.v1.CreateUserResponse
*/
export const CreateUserResponse = new CreateUserResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RenameUserRequest$Type extends MessageType<RenameUserRequest> {
constructor() {
super("headscale.v1.RenameUserRequest", [
{ no: 1, name: "old_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 2, name: "new_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<RenameUserRequest>): RenameUserRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.oldId = 0n;
message.newName = "";
if (value !== undefined)
reflectionMergePartial<RenameUserRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RenameUserRequest): RenameUserRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 old_id */ 1:
message.oldId = reader.uint64().toBigInt();
break;
case /* string new_name */ 2:
message.newName = 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: RenameUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 old_id = 1; */
if (message.oldId !== 0n)
writer.tag(1, WireType.Varint).uint64(message.oldId);
/* string new_name = 2; */
if (message.newName !== "")
writer.tag(2, WireType.LengthDelimited).string(message.newName);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.RenameUserRequest
*/
export const RenameUserRequest = new RenameUserRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RenameUserResponse$Type extends MessageType<RenameUserResponse> {
constructor() {
super("headscale.v1.RenameUserResponse", [
{ no: 1, name: "user", kind: "message", T: () => User }
]);
}
create(value?: PartialMessage<RenameUserResponse>): RenameUserResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<RenameUserResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RenameUserResponse): RenameUserResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* headscale.v1.User user */ 1:
message.user = User.internalBinaryRead(reader, reader.uint32(), options, message.user);
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: RenameUserResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* headscale.v1.User user = 1; */
if (message.user)
User.internalBinaryWrite(message.user, 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 headscale.v1.RenameUserResponse
*/
export const RenameUserResponse = new RenameUserResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteUserRequest$Type extends MessageType<DeleteUserRequest> {
constructor() {
super("headscale.v1.DeleteUserRequest", [
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<DeleteUserRequest>): DeleteUserRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.id = 0n;
if (value !== undefined)
reflectionMergePartial<DeleteUserRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUserRequest): DeleteUserRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 id */ 1:
message.id = reader.uint64().toBigInt();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: DeleteUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 id = 1; */
if (message.id !== 0n)
writer.tag(1, WireType.Varint).uint64(message.id);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.DeleteUserRequest
*/
export const DeleteUserRequest = new DeleteUserRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteUserResponse$Type extends MessageType<DeleteUserResponse> {
constructor() {
super("headscale.v1.DeleteUserResponse", []);
}
create(value?: PartialMessage<DeleteUserResponse>): DeleteUserResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteUserResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUserResponse): DeleteUserResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: DeleteUserResponse, 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 headscale.v1.DeleteUserResponse
*/
export const DeleteUserResponse = new DeleteUserResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListUsersRequest$Type extends MessageType<ListUsersRequest> {
constructor() {
super("headscale.v1.ListUsersRequest", [
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<ListUsersRequest>): ListUsersRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.id = 0n;
message.name = "";
message.email = "";
if (value !== undefined)
reflectionMergePartial<ListUsersRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUsersRequest): ListUsersRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 id */ 1:
message.id = reader.uint64().toBigInt();
break;
case /* string name */ 2:
message.name = reader.string();
break;
case /* string email */ 3:
message.email = 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: ListUsersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 id = 1; */
if (message.id !== 0n)
writer.tag(1, WireType.Varint).uint64(message.id);
/* string name = 2; */
if (message.name !== "")
writer.tag(2, WireType.LengthDelimited).string(message.name);
/* string email = 3; */
if (message.email !== "")
writer.tag(3, WireType.LengthDelimited).string(message.email);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.ListUsersRequest
*/
export const ListUsersRequest = new ListUsersRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListUsersResponse$Type extends MessageType<ListUsersResponse> {
constructor() {
super("headscale.v1.ListUsersResponse", [
{ no: 1, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => User }
]);
}
create(value?: PartialMessage<ListUsersResponse>): ListUsersResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.users = [];
if (value !== undefined)
reflectionMergePartial<ListUsersResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUsersResponse): ListUsersResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated headscale.v1.User users */ 1:
message.users.push(User.internalBinaryRead(reader, reader.uint32(), options));
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: ListUsersResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated headscale.v1.User users = 1; */
for (let i = 0; i < message.users.length; i++)
User.internalBinaryWrite(message.users[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message headscale.v1.ListUsersResponse
*/
export const ListUsersResponse = new ListUsersResponse$Type();

17
src/grpc/index.ts Normal file
View File

@@ -0,0 +1,17 @@
import { HeadscaleService } from "..";
import { HeadscaleServiceClient } from "./generated/headscale/v1/headscale.client";
import { GrpcWebFetchTransport } from "@protobuf-ts/grpcweb-transport";
class HeadscaleControlService {
private service: HeadscaleService;
client: HeadscaleServiceClient;
constructor(service: HeadscaleService) {
this.service = service;
const transport = new GrpcWebFetchTransport({
baseUrl: this.service.endpoint,
});
this.client = new HeadscaleServiceClient(transport);
}
}

View File

@@ -21,6 +21,7 @@ export type HeadscaleOptionsResolved = Required<HeadscaleOptions>;
export interface HeadscaleService {
service: ResultPromise<{}>;
endpoint: string;
close: () => Promise<boolean>;
}
@@ -123,6 +124,7 @@ export async function startHeadscale(
return {
service,
endpoint: "127.0.0.1:50443",
close,
};
}

322
yarn.lock
View File

@@ -231,6 +231,54 @@
"@babel/helper-validator-identifier" "^7.14.5"
to-fast-properties "^2.0.0"
"@bufbuild/buf-darwin-arm64@1.53.0":
version "1.53.0"
resolved "https://registry.yarnpkg.com/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.53.0.tgz#2c96481594d443e3dcad7c3cd6148c453966124b"
integrity sha512-UVhqDYu54ciiCMeG6RODlrX5XRvLN6PfsVDqMQG0JwmMKtUi326CbUqsqO7xsQbcEUso3FTBaURir4RixoM88w==
"@bufbuild/buf-darwin-x64@1.53.0":
version "1.53.0"
resolved "https://registry.yarnpkg.com/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.53.0.tgz#51375e89aff0996180bc5c771ad588dcaff7a4a3"
integrity sha512-03lKaenjf08HF6DlARPU2lEL2dRxNsU6rb9GbUu+YeLayWy7SUlfeDB8drAZ/GpfSc7SL8TKF7jqRkqxT4wFGA==
"@bufbuild/buf-linux-aarch64@1.53.0":
version "1.53.0"
resolved "https://registry.yarnpkg.com/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.53.0.tgz#28b687e9f4a6afaf236dfafef8b7e4d05eea25f3"
integrity sha512-FlxrB+rZJG5u7v2JovzXvSR/OdXjVXYHTTLnk6vN/73KPbpGPzZrW7mKxlYyn/Uar5tKDAYvmijjuItXZ6i31g==
"@bufbuild/buf-linux-armv7@1.53.0":
version "1.53.0"
resolved "https://registry.yarnpkg.com/@bufbuild/buf-linux-armv7/-/buf-linux-armv7-1.53.0.tgz#c9f74132aef3ae3fbd7877f47110ec89991164d0"
integrity sha512-e9ER+5Os1DPLhr2X1BRPrQpDZWpv5Mkk2PLnmmzh5RL4kOueJKQZj/m1qQr7SQkiPPhS0yMw7EEghsr521FFzQ==
"@bufbuild/buf-linux-x64@1.53.0":
version "1.53.0"
resolved "https://registry.yarnpkg.com/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.53.0.tgz#7056405e014c587804fb6f7de97a72d78ae9682f"
integrity sha512-LehyZPbkRgCvIM56uUnCAUD1QSno2wkBZ5HOvjrjOd0GEjfKgw/fsEu13fJR13bGBNOeOUHbHrd59iUSyY6rGA==
"@bufbuild/buf-win32-arm64@1.53.0":
version "1.53.0"
resolved "https://registry.yarnpkg.com/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.53.0.tgz#e4afdd27da5f865420dafdb38e12d98455eda4ee"
integrity sha512-QRNMHYW6v4keoelIwMNZGQw2R67fsS8lEDnYxrFmiRADwZ/ri/XKJjvQfpoE2Bq0xREB0zZ++RX+1DZOkTA/Iw==
"@bufbuild/buf-win32-x64@1.53.0":
version "1.53.0"
resolved "https://registry.yarnpkg.com/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.53.0.tgz#1596e09833a62278ca5be5f9499652845fff2d76"
integrity sha512-relZlT9gYrZGcEH4dcJhEWrjaHV9drG1PcgW6krqw1AzpQOPxR/loXJ7DycoCAnUhQ9TdsdTfUlVHqiJt98piQ==
"@bufbuild/buf@^1.53.0":
version "1.53.0"
resolved "https://registry.yarnpkg.com/@bufbuild/buf/-/buf-1.53.0.tgz#2f835f23bd904358d1742ee380cb69f533386092"
integrity sha512-GGAztQbbKSv+HaihdDIUpejUcxIx2Fse9SqHfMisJbL/hZ7aOH7BFeSH0q8/g2kSAsLABlenVKeEWKX1uZU3LQ==
optionalDependencies:
"@bufbuild/buf-darwin-arm64" "1.53.0"
"@bufbuild/buf-darwin-x64" "1.53.0"
"@bufbuild/buf-linux-aarch64" "1.53.0"
"@bufbuild/buf-linux-armv7" "1.53.0"
"@bufbuild/buf-linux-x64" "1.53.0"
"@bufbuild/buf-win32-arm64" "1.53.0"
"@bufbuild/buf-win32-x64" "1.53.0"
"@esbuild/aix-ppc64@0.25.4":
version "0.25.4"
resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz#830d6476cbbca0c005136af07303646b419f1162"
@@ -395,6 +443,21 @@
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
"@mapbox/node-pre-gyp@^1.0.5":
version "1.0.11"
resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa"
integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==
dependencies:
detect-libc "^2.0.0"
https-proxy-agent "^5.0.0"
make-dir "^3.1.0"
node-fetch "^2.6.7"
nopt "^5.0.0"
npmlog "^5.0.1"
rimraf "^3.0.2"
semver "^7.3.5"
tar "^6.1.11"
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@@ -444,6 +507,26 @@
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.4.tgz#d897170a2b0ba51f78a099edccd968f7b103387c"
integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==
"@protobuf-ts/grpcweb-transport@^2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@protobuf-ts/grpcweb-transport/-/grpcweb-transport-2.10.0.tgz#c09f29694ec7dc4fc1107a0bf30d359325939311"
integrity sha512-VUyD+8kn4XEfWoEiKjAsWX5XWkt8Gfdp/uquS17yt9hdfMBVx3o5tlXX5ylwfWhcIjbRvkf7WHEEdS2wMuq86Q==
dependencies:
"@protobuf-ts/runtime" "^2.10.0"
"@protobuf-ts/runtime-rpc" "^2.10.0"
"@protobuf-ts/runtime-rpc@^2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.10.0.tgz#68de8dcc369e56579569a4deafd394cf4683dc66"
integrity sha512-8CS/XPv3+pMK4v8UKhtCdvbS4h9l7aqlteKdRt0/UbIKZ8n0qHj6hX8cBhz2ngvohxCOS0N08zPr9aCLBNhW3Q==
dependencies:
"@protobuf-ts/runtime" "^2.10.0"
"@protobuf-ts/runtime@^2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime/-/runtime-2.10.0.tgz#bc90f632647ff2ae72887546ddf3d193f3f43d98"
integrity sha512-ypYwGg9Pn3W/2lZ7/HW60hONGuSdzphvOY8Dq7LeNttymDe0y3LaTUUMRpuGqOT6FfrWEMnfQbyqU8AAreo8wA==
"@rollup/plugin-alias@^5.1.1":
version "5.1.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-5.1.1.tgz#53601d88cda8b1577aa130b4a6e452283605bf26"
@@ -731,6 +814,11 @@ JSONStream@^1.0.4:
jsonparse "^1.2.0"
through ">=2.2.7 <3"
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
acorn-jsx@^5.2.0, acorn-jsx@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
@@ -751,6 +839,13 @@ add-stream@^1.0.0:
resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=
agent-base@6:
version "6.0.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
dependencies:
debug "4"
ajv@^6.10.0, ajv@^6.12.4:
version "6.12.6"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
@@ -781,6 +876,11 @@ ansi-regex@^5.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
@@ -795,6 +895,19 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
dependencies:
color-convert "^2.0.1"
"aproba@^1.0.3 || ^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc"
integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==
are-we-there-yet@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c"
integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==
dependencies:
delegates "^1.0.0"
readable-stream "^3.6.0"
argparse@^1.0.7:
version "1.0.10"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@@ -969,6 +1082,11 @@ chalk@^4.0.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
chownr@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==
ci-info@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
@@ -1021,6 +1139,11 @@ color-name@~1.1.4:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
color-support@^1.1.2:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
colord@^2.9.3:
version "2.9.3"
resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43"
@@ -1079,6 +1202,11 @@ consola@^3.2.3, consola@^3.4.0:
resolved "https://registry.yarnpkg.com/consola/-/consola-3.4.2.tgz#5af110145397bb67afdab77013fdc34cae590ea7"
integrity sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==
console-control-strings@^1.0.0, console-control-strings@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==
conventional-changelog-angular@^5.0.12:
version "5.0.12"
resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9"
@@ -1381,6 +1509,13 @@ dateformat@^3.0.0:
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
debug@4:
version "4.4.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a"
integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==
dependencies:
ms "^2.1.3"
debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -1437,6 +1572,11 @@ defu@^6.1.4:
resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.4.tgz#4e0c9cf9ff68fe5f3d7f2765cc1a012dfdcb0479"
integrity sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==
delegates@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==
destr@^2.0.3:
version "2.0.5"
resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.5.tgz#7d112ff1b925fb8d2079fac5bdb4a90973b51fdb"
@@ -1447,6 +1587,11 @@ detect-indent@^6.0.0:
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6"
integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==
detect-libc@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8"
integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==
detect-newline@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
@@ -2068,6 +2213,13 @@ fs-extra@^11.3.0:
jsonfile "^6.0.1"
universalify "^2.0.0"
fs-minipass@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb"
integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==
dependencies:
minipass "^3.0.0"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
@@ -2093,6 +2245,21 @@ functional-red-black-tree@^1.0.1:
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
gauge@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395"
integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==
dependencies:
aproba "^1.0.3 || ^2.0.0"
color-support "^1.1.2"
console-control-strings "^1.0.0"
has-unicode "^2.0.1"
object-assign "^4.1.1"
signal-exit "^3.0.0"
string-width "^4.2.3"
strip-ansi "^6.0.1"
wide-align "^1.1.2"
gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
@@ -2212,6 +2379,13 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0:
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
grpc-tools@^1.13.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/grpc-tools/-/grpc-tools-1.13.0.tgz#a4fea8eebce51fb9fec00055a3e52016dfd5af89"
integrity sha512-7CbkJ1yWPfX0nHjbYG58BQThNhbICXBZynzCUxCb3LzX5X9B3hQbRY2STiRgIEiLILlK9fgl0z0QVGwPCdXf5g==
dependencies:
"@mapbox/node-pre-gyp" "^1.0.5"
handlebars@^4.7.6:
version "4.7.7"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1"
@@ -2249,6 +2423,11 @@ has-symbols@^1.0.1, has-symbols@^1.0.2:
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423"
integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==
has-unicode@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==
has@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
@@ -2280,6 +2459,14 @@ hosted-git-info@^4.0.0, hosted-git-info@^4.0.1:
dependencies:
lru-cache "^6.0.0"
https-proxy-agent@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==
dependencies:
agent-base "6"
debug "4"
human-signals@^8.0.0:
version "8.0.1"
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-8.0.1.tgz#f08bb593b6d1db353933d06156cedec90abe51fb"
@@ -2686,6 +2873,13 @@ magic-string@^0.30.17, magic-string@^0.30.3:
dependencies:
"@jridgewell/sourcemap-codec" "^1.5.0"
make-dir@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
dependencies:
semver "^6.0.0"
map-obj@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
@@ -2779,6 +2973,31 @@ minimist@^1.2.0, minimist@^1.2.5:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
minipass@^3.0.0:
version "3.3.6"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a"
integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==
dependencies:
yallist "^4.0.0"
minipass@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d"
integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==
minizlib@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931"
integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==
dependencies:
minipass "^3.0.0"
yallist "^4.0.0"
mkdirp@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
mkdist@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/mkdist/-/mkdist-2.3.0.tgz#8cd1c1319ddafd2819721a0cc1faa0a1dbdc1990"
@@ -2823,7 +3042,7 @@ ms@2.1.2:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
ms@^2.1.1:
ms@^2.1.1, ms@^2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
@@ -2853,6 +3072,13 @@ node-fetch-native@^1.6.4:
resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.6.tgz#ae1d0e537af35c2c0b0de81cbff37eedd410aa37"
integrity sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==
node-fetch@^2.6.7:
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"
node-graceful-shutdown@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/node-graceful-shutdown/-/node-graceful-shutdown-1.1.5.tgz#2c5b405a27d712a409e69b67dfe215d30154faff"
@@ -2868,6 +3094,13 @@ node-releases@^2.0.19:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314"
integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==
nopt@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88"
integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==
dependencies:
abbrev "1"
normalize-package-data@^2.3.2, normalize-package-data@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
@@ -2901,6 +3134,16 @@ npm-run-path@^6.0.0:
path-key "^4.0.0"
unicorn-magic "^0.3.0"
npmlog@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0"
integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==
dependencies:
are-we-there-yet "^2.0.0"
console-control-strings "^1.1.0"
gauge "^3.0.0"
set-blocking "^2.0.0"
nth-check@^2.0.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d"
@@ -2913,6 +3156,11 @@ null-check@^1.0.0:
resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd"
integrity sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=
object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
object-inspect@^1.10.3:
version "1.10.3"
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369"
@@ -3495,6 +3743,15 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2:
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
readable-stream@^3.6.0:
version "3.6.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
readable-stream@~2.3.6:
version "2.3.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
@@ -3664,6 +3921,11 @@ semver@^7.7.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f"
integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==
set-blocking@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==
shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
@@ -3676,6 +3938,11 @@ shebang-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
signal-exit@^3.0.0:
version "3.0.7"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
signal-exit@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
@@ -3776,6 +4043,15 @@ standard-version@^9.3.0:
stringify-package "^1.0.1"
yargs "^16.0.0"
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"
string-width@^4.1.0, string-width@^4.2.0:
version "4.2.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"
@@ -3827,6 +4103,13 @@ strip-ansi@^6.0.0:
dependencies:
ansi-regex "^5.0.0"
strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"
strip-bom@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
@@ -3909,6 +4192,18 @@ table@^6.0.9:
string-width "^4.2.0"
strip-ansi "^6.0.0"
tar@^6.1.11:
version "6.2.1"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a"
integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
minipass "^5.0.0"
minizlib "^2.1.1"
mkdirp "^1.0.3"
yallist "^4.0.0"
text-extensions@^1.0.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26"
@@ -3959,6 +4254,11 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"
tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
trim-newlines@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
@@ -4160,6 +4460,19 @@ vue-eslint-parser@^7.6.0:
lodash "^4.17.21"
semver "^6.3.0"
webidl-conversions@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==
whatwg-url@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==
dependencies:
tr46 "~0.0.3"
webidl-conversions "^3.0.0"
which-boxed-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6"
@@ -4178,6 +4491,13 @@ which@^2.0.1:
dependencies:
isexe "^2.0.0"
wide-align@^1.1.2:
version "1.1.5"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3"
integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==
dependencies:
string-width "^1.0.2 || 2 || 3 || 4"
word-wrap@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"