From d9a68148c5de11a418a789dbeb8fa3ab24b3689e Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Thu, 9 Jul 2026 18:15:03 -0600 Subject: [PATCH 1/4] feat(auth): add support for user-based auth, OpenAPI spec client codegen --- autocomplete/fish_autocomplete | 1 + cmd/lk/app.go | 5 +- cmd/lk/experimental_auth.go | 92 + cmd/lk/project.go | 47 +- cmd/lk/utils.go | 33 +- go.mod | 49 +- go.sum | 186 +- pkg/config/config.go | 82 +- pkg/config/config_test.go | 63 + pkg/public/client.go | 154 + pkg/public/gen.go | 45 + pkg/public/oapi/cfg.yaml | 15 + pkg/public/oapi/generate.go | 26 + pkg/public/oapi/generate.sh | 18 + pkg/public/oapi/oapi.gen.go | 5639 ++++++++++++++++++++++++++++++++ 15 files changed, 6409 insertions(+), 46 deletions(-) create mode 100644 cmd/lk/experimental_auth.go create mode 100644 pkg/config/config_test.go create mode 100644 pkg/public/client.go create mode 100644 pkg/public/gen.go create mode 100644 pkg/public/oapi/cfg.yaml create mode 100644 pkg/public/oapi/generate.go create mode 100644 pkg/public/oapi/generate.sh create mode 100644 pkg/public/oapi/oapi.gen.go diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete index 0eaaa7dd7..95cf02ec8 100644 --- a/autocomplete/fish_autocomplete +++ b/autocomplete/fish_autocomplete @@ -20,6 +20,7 @@ complete -c lk -n '__fish_lk_no_subcommand' -f -l curl -d 'Print curl commands f complete -c lk -n '__fish_lk_no_subcommand' -f -l verbose complete -c lk -n '__fish_lk_no_subcommand' -f -l yes -s y -d 'Assume yes for confirmations; fail or use default for other prompts (use in CI/non-interactive)' complete -c lk -n '__fish_lk_no_subcommand' -f -l quiet -s q -s silent -d 'Suppress informational output to stderr (warnings and errors still print)' +complete -c lk -n '__fish_lk_no_subcommand' -f -l experimental-auth -d 'EXPERIMENTAL: use user-based (session) auth against the LiveKit Public API instead of API-key auth. Most commands are not yet supported under this mode.' complete -c lk -n '__fish_lk_no_subcommand' -f -l help -s h -d 'show help' complete -c lk -n '__fish_lk_no_subcommand' -f -l version -s v -d 'print the version' complete -c lk -n '__fish_lk_no_subcommand' -xa '(lk --generate-shell-completion 2>/dev/null)' diff --git a/cmd/lk/app.go b/cmd/lk/app.go index 8a691e2e2..f40945b13 100644 --- a/cmd/lk/app.go +++ b/cmd/lk/app.go @@ -1,4 +1,4 @@ -// Copyright 2024 LiveKit, Inc. +// Copyright 2024-2026 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -133,6 +133,9 @@ func requireProject(ctx context.Context, cmd *cli.Command) (context.Context, err } func requireProjectWithOpts(ctx context.Context, cmd *cli.Command, opts ...loadOption) (context.Context, error) { + if err := experimentalAuthGate(cmd); err != nil { + return ctx, err + } if project != nil { // already resolved (and announced) earlier in this command return ctx, nil diff --git a/cmd/lk/experimental_auth.go b/cmd/lk/experimental_auth.go new file mode 100644 index 000000000..9f15d66c6 --- /dev/null +++ b/cmd/lk/experimental_auth.go @@ -0,0 +1,92 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "errors" + "fmt" + + "github.com/urfave/cli/v3" + + "github.com/livekit/livekit-cli/v2/pkg/config" + "github.com/livekit/livekit-cli/v2/pkg/public" +) + +// experimentalAuthEnabled reports whether the user opted into user-based +// (session) auth via the global --experimental-auth flag. +func experimentalAuthEnabled(cmd *cli.Command) bool { + return cmd.Bool("experimental-auth") +} + +// experimentalAuthGate refuses a command that only supports API-key auth when +// the user requested experimental user-based auth. User auth routes through the +// Public API, which does not yet implement most operations; rather than +// silently fall back to API-key auth — a different security model than the user +// asked for — we fail clearly. Command paths that DO support user auth branch on +// experimentalAuthEnabled before reaching this gate. +func experimentalAuthGate(cmd *cli.Command) error { + if experimentalAuthEnabled(cmd) { + return errors.New("this command is not yet available under --experimental-auth (user-based auth); re-run without it to use API-key authentication") + } + return nil +} + +// requireUserSession loads the CLI config and resolves the default user with a +// valid (unexpired) session, for commands running under --experimental-auth. +// The returned *CLIConfig is the same instance the user was read from, so +// callers may cache data on it (e.g. via SetUserProjects) and persist. +func requireUserSession(cmd *cli.Command) (*config.CLIConfig, *config.UserConfig, error) { + conf, err := config.LoadOrCreate() + if err != nil { + return nil, nil, err + } + if conf.DefaultUser == "" { + return nil, nil, errors.New("no user is signed in (run `lk cloud auth` to sign in)") + } + user := conf.GetUser(conf.DefaultUser) + if user == nil { + return nil, nil, fmt.Errorf("default user %q not found in config", conf.DefaultUser) + } + if !user.SessionValid() { + return nil, nil, fmt.Errorf("session for %s has expired (run `lk cloud auth` to sign in again)", userLabel(user)) + } + return conf, user, nil +} + +// newCloudAPIClient builds a Public API client authenticated as the default +// user, honoring --experimental-api-url. +func newCloudAPIClient(cmd *cli.Command) (*public.Client, *config.CLIConfig, *config.UserConfig, error) { + conf, user, err := requireUserSession(cmd) + if err != nil { + return nil, nil, nil, err + } + client, err := public.New(experimentalAPIURL, user.SessionToken) + if err != nil { + return nil, nil, nil, err + } + return client, conf, user, nil +} + +// userLabel is a human-friendly identifier for a user, preferring email. +func userLabel(u *config.UserConfig) string { + switch { + case u.Email != "": + return u.Email + case u.Name != "": + return u.Name + default: + return u.Id + } +} diff --git a/cmd/lk/project.go b/cmd/lk/project.go index d1c753f3f..ec08d29cf 100644 --- a/cmd/lk/project.go +++ b/cmd/lk/project.go @@ -1,4 +1,4 @@ -// Copyright 2022-2024 LiveKit, Inc. +// Copyright 2022-2026 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package main import ( "context" "errors" + "fmt" "net/url" "regexp" @@ -26,6 +27,7 @@ import ( "github.com/urfave/cli/v3" "github.com/livekit/livekit-cli/v2/pkg/config" + "github.com/livekit/livekit-cli/v2/pkg/public" "github.com/livekit/livekit-cli/v2/pkg/util" ) @@ -269,6 +271,10 @@ func addProject(ctx context.Context, cmd *cli.Command) error { } func listProjects(ctx context.Context, cmd *cli.Command) error { + if experimentalAuthEnabled(cmd) { + return listUserProjects(ctx, cmd) + } + if len(cliConfig.Projects) == 0 { out.Status("No projects configured, use `lk cloud auth` to authenticate a new project.") return nil @@ -308,6 +314,45 @@ func listProjects(ctx context.Context, cmd *cli.Command) error { return nil } +// listUserProjects lists the projects accessible to the signed-in user via the +// Public API (user-based auth). Invoked by `lk project list --experimental-auth`. +// +// NOTE: it fetches live on each call. The per-user project cache +// (config.UserConfig.Projects) exists for project *resolution* by scoped +// commands and is populated there; a read-only list stays quiet and does not +// persist config. +func listUserProjects(ctx context.Context, cmd *cli.Command) error { + client, _, _, err := newCloudAPIClient(cmd) + if err != nil { + return err + } + + projects, err := client.ListProjects(ctx) + if err != nil { + if public.IsUnauthenticated(err) { + return fmt.Errorf("%w (run `lk cloud auth` to sign in again)", err) + } + return err + } + + if cmd.Bool("json") { + util.PrintJSON(projects) + return nil + } + + if len(projects) == 0 { + out.Status("No projects found for this account.") + return nil + } + + table := util.CreateTable().Headers("Project ID") + for _, p := range projects { + table.Row(p.ID) + } + out.Result(table) + return nil +} + func removeProject(ctx context.Context, cmd *cli.Command) error { if cmd.NArg() == 0 { _ = cli.ShowSubcommandHelp(cmd) diff --git a/cmd/lk/utils.go b/cmd/lk/utils.go index 378fdf414..a9d0e2ca3 100644 --- a/cmd/lk/utils.go +++ b/cmd/lk/utils.go @@ -1,4 +1,4 @@ -// Copyright 2021-2024 LiveKit, Inc. +// Copyright 2021-2026 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -39,14 +39,20 @@ import ( const ( cloudAPIServerURL = "https://cloud-api.livekit.io" cloudDashboardURL = "https://cloud.livekit.io" + // publicAPIBaseURL is the production base URL of the user-authenticated + // LiveKit Public API (the OpenAPI REST service). Used only under + // --experimental-auth; override with --experimental-api-url for dev + // (e.g. http://localhost:8000/v1). + publicAPIBaseURL = "https://api.livekit.cloud/v1" ) var ( - printCurl bool - workingDir string = "." - tomlFilename string = config.LiveKitTOMLFile - serverURL string = cloudAPIServerURL - dashboardURL string = cloudDashboardURL + printCurl bool + workingDir string = "." + tomlFilename string = config.LiveKitTOMLFile + serverURL string = cloudAPIServerURL + dashboardURL string = cloudDashboardURL + experimentalAPIURL string = publicAPIBaseURL roomFlag = &TemplateStringFlag{ Name: "room", @@ -166,6 +172,18 @@ var ( Usage: "Assume yes for confirmations; fail or use default for other prompts (use in CI/non-interactive)", }, quietFlag, + &cli.BoolFlag{ + Name: "experimental-auth", + Usage: "EXPERIMENTAL: use user-based (session) auth against the LiveKit Public API instead of API-key auth. Most commands are not yet supported under this mode.", + }, + &cli.StringFlag{ + Name: "experimental-api-url", + Usage: "Base `URL` of the LiveKit Public API used with --experimental-auth", + Value: publicAPIBaseURL, + Destination: &experimentalAPIURL, + Sources: cli.EnvVars("LIVEKIT_API_URL"), + Hidden: true, + }, &cli.StringFlag{ Name: "server-url", Value: cloudAPIServerURL, @@ -438,6 +456,9 @@ func resolveProject(c *cli.Command, p loadParams) (*resolvedProject, error) { // the package-level `project` (app/agent) go through requireProject instead, which layers // interactive selection on top of the same resolver before announcing. func loadProjectDetails(c *cli.Command, opts ...loadOption) (*config.ProjectConfig, error) { + if err := experimentalAuthGate(c); err != nil { + return nil, err + } p := loadParams{requireURL: true} for _, opt := range opts { opt(&p) diff --git a/go.mod b/go.mod index 3d5e11dae..ca7cba8a6 100644 --- a/go.mod +++ b/go.mod @@ -16,20 +16,21 @@ require ( github.com/fsnotify/fsnotify v1.10.1 github.com/go-logr/logr v1.4.3 github.com/go-task/task/v3 v3.51.1 - github.com/google/go-containerregistry v0.21.7 + github.com/google/go-containerregistry v0.20.7 github.com/google/go-querystring v1.2.0 github.com/joho/godotenv v1.5.1 github.com/klauspost/compress v1.18.6 - github.com/livekit/protocol v1.49.1-0.20260712215709-8847d7456816 - github.com/livekit/server-sdk-go/v2 v2.18.1 + github.com/livekit/protocol v1.49.0 + github.com/livekit/server-sdk-go/v2 v2.16.8-0.20260702164219-6126610d4e22 github.com/mattn/go-isatty v0.0.22 github.com/moby/moby/client v0.4.1 github.com/moby/patternmatcher v0.6.1 github.com/modelcontextprotocol/go-sdk v1.6.1 + github.com/oapi-codegen/runtime v1.4.2 github.com/pelletier/go-toml v1.9.5 github.com/pion/rtcp v1.2.16 github.com/pion/rtp v1.10.2 - github.com/pion/webrtc/v4 v4.2.15 + github.com/pion/webrtc/v4 v4.2.14 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c github.com/stretchr/testify v1.11.1 github.com/twitchtv/twirp v8.1.3+incompatible @@ -64,6 +65,7 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/alecthomas/chroma/v2 v2.23.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/aws/aws-sdk-go-v2 v1.41.7 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect github.com/aws/aws-sdk-go-v2/config v1.32.17 // indirect @@ -102,23 +104,27 @@ require ( github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect github.com/containerd/console v1.0.5 // indirect github.com/containerd/containerd/api v1.10.0 // indirect - github.com/containerd/containerd/v2 v2.2.5 // indirect + github.com/containerd/containerd/v2 v2.2.4 // indirect github.com/containerd/continuity v0.4.5 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v1.0.0-rc.2 // indirect + github.com/containerd/stargz-snapshotter/estargz v0.18.2 // indirect github.com/containerd/ttrpc v1.2.8 // indirect github.com/containerd/typeurl/v2 v2.2.3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/iters v1.2.2 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/dlclark/regexp2 v1.11.5 // indirect - github.com/docker/cli v29.5.3+incompatible // indirect + github.com/dlclark/regexp2 v1.12.0 // indirect + github.com/docker/cli v29.4.3+incompatible // indirect + github.com/docker/distribution v2.8.3+incompatible // indirect + github.com/docker/docker v28.5.2+incompatible // indirect github.com/docker/docker-credential-helpers v0.9.5 // indirect github.com/docker/go-connections v0.7.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dominikbraun/graph v0.23.0 // indirect + github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect @@ -128,8 +134,11 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/gammazero/deque v1.2.1 // indirect + github.com/getkin/kin-openapi v0.135.0 // indirect github.com/go-jose/go-jose/v4 v4.1.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/jsonpointer v0.22.5 // indirect + github.com/go-openapi/swag/jsonname v0.25.5 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/go-task/template v0.2.0 // indirect github.com/gofrs/flock v0.13.0 // indirect @@ -153,6 +162,7 @@ require ( github.com/hashicorp/go-version v1.9.0 // indirect github.com/in-toto/attestation v1.1.2 // indirect github.com/in-toto/in-toto-golang v0.11.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/jxskiss/base62 v1.1.0 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/klauspost/pgzip v1.2.6 // indirect @@ -162,6 +172,7 @@ require ( github.com/livekit/psrpc v0.7.2 // indirect github.com/lucasb-eyer/go-colorful v1.4.0 // indirect github.com/magefile/mage v1.17.2 // indirect + github.com/mailru/easyjson v0.9.1 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.23 // indirect @@ -172,6 +183,7 @@ require ( github.com/moby/locker v1.0.1 // indirect github.com/moby/moby/api v1.54.2 // indirect github.com/moby/sys/signal v0.7.1 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/morikuni/aec v1.1.0 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect @@ -180,8 +192,12 @@ require ( github.com/nats-io/nats.go v1.52.0 // indirect github.com/nats-io/nkeys v0.4.16 // indirect github.com/nats-io/nuid v1.0.1 // indirect + github.com/oapi-codegen/oapi-codegen/v2 v2.7.1 // indirect + github.com/oasdiff/yaml v0.0.9 // indirect + github.com/oasdiff/yaml3 v0.0.9 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pierrec/lz4/v4 v4.1.26 // indirect github.com/pion/datachannel v1.6.0 // indirect github.com/pion/dtls/v3 v3.1.4 // indirect @@ -191,11 +207,11 @@ require ( github.com/pion/mdns/v2 v2.1.0 // indirect github.com/pion/randutil v0.1.0 // indirect github.com/pion/sctp v1.10.0 // indirect - github.com/pion/sdp/v3 v3.0.19 // indirect + github.com/pion/sdp/v3 v3.0.18 // indirect github.com/pion/srtp/v3 v3.0.11 // indirect - github.com/pion/stun/v3 v3.1.5 // indirect + github.com/pion/stun/v3 v3.1.4 // indirect github.com/pion/transport/v4 v4.0.2 // indirect - github.com/pion/turn/v5 v5.0.9 // indirect + github.com/pion/turn/v5 v5.0.8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -208,11 +224,13 @@ require ( github.com/rivo/uniseg v0.4.7 // indirect github.com/sajari/fuzzy v1.0.0 // indirect github.com/secure-systems-lab/go-securesystemslib v0.10.0 // indirect - github.com/segmentio/asm v1.1.3 // indirect + github.com/segmentio/asm v1.2.1 // indirect github.com/segmentio/encoding v0.5.4 // indirect github.com/sergi/go-diff v1.4.0 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect github.com/sirupsen/logrus v1.9.4 // indirect + github.com/speakeasy-api/jsonpath v0.6.3 // indirect + github.com/speakeasy-api/openapi v1.19.2 // indirect github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect github.com/stretchr/objx v0.5.3 // indirect github.com/tonistiigi/fsutil v0.0.0-20251211185533-a2aa163d723f // indirect @@ -222,7 +240,10 @@ require ( github.com/u-root/u-root v0.16.0 // indirect github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 // indirect github.com/ulikunitz/xz v0.5.15 // indirect + github.com/vbatts/tar-split v0.12.2 // indirect + github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect github.com/wlynxg/anet v0.0.5 // indirect + github.com/woodsbury/decimal128 v1.4.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/yosida95/uritemplate/v3 v3.0.2 // indirect @@ -245,11 +266,13 @@ require ( go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.53.0 // indirect golang.org/x/exp v0.0.0-20260603202125-055de637280b // indirect - golang.org/x/net v0.55.0 // indirect + golang.org/x/mod v0.37.0 // indirect + golang.org/x/net v0.56.0 // indirect golang.org/x/oauth2 v0.36.0 // indirect golang.org/x/sys v0.46.0 // indirect golang.org/x/term v0.44.0 // indirect golang.org/x/text v0.38.0 // indirect + golang.org/x/tools v0.46.0 // indirect google.golang.org/api v0.275.0 // indirect google.golang.org/genproto v0.0.0-20260406210006-6f92a3bedf2d // indirect google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect @@ -264,3 +287,5 @@ require ( // TEMP (local dev): use local protocol with the WorkerInfo dev message. // Drop once github.com/livekit/protocol publishes it. // replace github.com/livekit/protocol => ../protocol + +tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen diff --git a/go.sum b/go.sum index 8f5ed35ce..66a22d9b1 100644 --- a/go.sum +++ b/go.sum @@ -36,6 +36,8 @@ cyphar.com/go-pathrs v0.2.1 h1:9nx1vOgwVvX1mNBWDu93+vaceedpbsDqo+XuBGL40b8= cyphar.com/go-pathrs v0.2.1/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 h1:rIkQfkCOVKc1OiRCNcSDD8ml5RJlZbH/Xsq7lbpynwc= @@ -58,6 +60,7 @@ github.com/Microsoft/hcsshim v0.14.1 h1:CMuB3fqQVfPdhyXhUqYdUmPUIOhJkmghCx3dJet8 github.com/Microsoft/hcsshim v0.14.1/go.mod h1:VnzvPLyWUhxiPVsJ31P6XadxCcTogTguBFDy/1GR/OM= github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw= github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= @@ -68,6 +71,8 @@ github.com/anchore/go-struct-converter v0.1.0 h1:2rDRssAl6mgKBSLNiVCMADgZRhoqtw9 github.com/anchore/go-struct-converter v0.1.0/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go-v2 v1.41.7 h1:DWpAJt66FmnnaRIOT/8ASTucrvuDPZASqhhLey6tLY8= @@ -118,6 +123,7 @@ github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/brianvoe/gofakeit/v6 v6.28.0 h1:Xib46XXuQfmlLS2EXRuJpqcw8St6qSZz75OUo0tgAW4= github.com/brianvoe/gofakeit/v6 v6.28.0/go.mod h1:Xj58BMSnFqcn/fAQeSK+/PLtC5kSb7FJIq4JyGa8vEs= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= @@ -166,6 +172,9 @@ github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2 github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k= github.com/charmbracelet/x/xpty v0.1.2 h1:Pqmu4TEJ8KeA9uSkISKMU3f+C1F6OGBn8ABuGlqCbtI= github.com/charmbracelet/x/xpty v0.1.2/go.mod h1:XK2Z0id5rtLWcpeNiMYBccNNBrP2IJnzHI0Lq13Xzq4= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8= github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0= github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk= @@ -182,8 +191,8 @@ github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/q github.com/containerd/console v1.0.5/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/containerd/api v1.10.0 h1:5n0oHYVBwN4VhoX9fFykCV9dF1/BvAXeg2F8W6UYq1o= github.com/containerd/containerd/api v1.10.0/go.mod h1:NBm1OAk8ZL+LG8R0ceObGxT5hbUYj7CzTmR3xh0DlMM= -github.com/containerd/containerd/v2 v2.2.5 h1:KTFzB02LviYmmfRmz8r9UFd+n6YlddVFK+5lbgQXUTU= -github.com/containerd/containerd/v2 v2.2.5/go.mod h1:5t2+xFv2dGd/iDYp9Z8DXB4cmWrWQi1XqxGJPS2gBzU= +github.com/containerd/containerd/v2 v2.2.4 h1:8x2UdXqww7NYqGNabQ7i1nAgB5LegzjC9KQzO/900iA= +github.com/containerd/containerd/v2 v2.2.4/go.mod h1:YBcTO8D9149QY9zNmUjy04Mhuc4DlrZQ8FIOwKZEM7o= github.com/containerd/continuity v0.4.5 h1:ZRoN1sXq9u7V6QoHMcVWGhOwDFqZ4B9i5H6un1Wh0x4= github.com/containerd/continuity v0.4.5/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= @@ -200,7 +209,6 @@ github.com/containerd/platforms v1.0.0-rc.2 h1:0SPgaNZPVWGEi4grZdV8VRYQn78y+nm6a github.com/containerd/platforms v1.0.0-rc.2/go.mod h1:J71L7B+aiM5SdIEqmd9wp6THLVRzJGXfNuWCZCllLA4= github.com/containerd/plugin v1.0.0 h1:c8Kf1TNl6+e2TtMHZt+39yAPDbouRH9WAToRjex483Y= github.com/containerd/plugin v1.0.0/go.mod h1:hQfJe5nmWfImiqT1q8Si3jLv3ynMUIBB47bQ+KexvO8= -github.com/containerd/stargz-snapshotter v0.18.2 h1:Ev/sxfQUjwzJQ9eqy3XzttcQ3osMIqkQgMYlcET+10M= github.com/containerd/stargz-snapshotter/estargz v0.18.2 h1:yXkZFYIzz3eoLwlTUZKz2iQ4MrckBxJjkmD16ynUTrw= github.com/containerd/stargz-snapshotter/estargz v0.18.2/go.mod h1:XyVU5tcJ3PRpkA9XS2T5us6Eg35yM0214Y+wvrZTBrY= github.com/containerd/ttrpc v1.2.8 h1:xbVu6D4qF2jihdh9rDVOKqUMiFBQk6YctTdo1zk087Y= @@ -219,10 +227,14 @@ github.com/dennwc/iters v1.2.2 h1:XH2/Etihiy9ZvPOVCR+icQXeYlhbvS7k0qro4x/2qQo= github.com/dennwc/iters v1.2.2/go.mod h1:M9KuuMBeyEXYTmB7EnI9SCyALFCmPWOIxn5W1L0CjGg= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= -github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/docker/cli v29.5.3+incompatible h1:nbEFfz774vBwQ5KRYv7c/AghjReqnGISvrRhzjV0evs= -github.com/docker/cli v29.5.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8= +github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/docker/cli v29.4.3+incompatible h1:u+UliYm2J/rYrIh2FqHQg32neRG8GjbvNuwQRTzGspU= +github.com/docker/cli v29.4.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= +github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM= +github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.9.5 h1:EFNN8DHvaiK8zVqFA2DT6BjXE0GzfLOZ38ggPTKePkY= github.com/docker/docker-credential-helpers v0.9.5/go.mod h1:v1S+hepowrQXITkEfw6o4+BMbGot02wiKpzWhGUZK6c= github.com/docker/go-connections v0.7.0 h1:6SsRfJddP22WMrCkj19x9WKjEDTB+ahsdiGYf0mN39c= @@ -231,6 +243,9 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo= github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C6POAuiViluc= +github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58= +github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 h1:PRxIJD8XjimM5aTknUK9w6DHLDox2r2M3DI4i2pnd3w= +github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936/go.mod h1:ttYvX5qlB+mlV1okblJqcSMtR4c52UKxDiX9GRBS8+Q= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elliotchance/orderedmap/v3 v3.1.0 h1:j4DJ5ObEmMBt/lcwIecKcoRxIQUEnw0L804lXYDt/pg= @@ -251,12 +266,16 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frostbyte73/core v0.1.1 h1:ChhJOR7bAKOCPbA+lqDLE2cGKlCG5JXsDvvQr4YaJIA= github.com/frostbyte73/core v0.1.1/go.mod h1:mhfOtR+xWAvwXiwor7jnqPMnu4fxbv1F2MwZ0BEpzZo= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho= github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/gammazero/deque v1.2.1 h1:9fnQVFCCZ9/NOc7ccTNqzoKd1tCWOqeI05/lPqFPMGQ= github.com/gammazero/deque v1.2.1/go.mod h1:5nSFkzVm+afG9+gy0VIowlqVAW4N8zNcMne+CMQVD2g= +github.com/getkin/kin-openapi v0.135.0 h1:751SjYfbiwqukYuVjwYEIKNfrSwS5YpA7DZnKSwQgtg= +github.com/getkin/kin-openapi v0.135.0/go.mod h1:6dd5FJl6RdX4usBtFBaQhk9q62Yb2J0Mk5IhUO/QqFI= github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -264,14 +283,23 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= +github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= +github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= +github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= +github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvAu+voFM= +github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-task/task/v3 v3.51.1 h1:vu73GWym90MT9tDdUZthkEF5XHQKOfvrxTT5uH1E2t8= github.com/go-task/task/v3 v3.51.1/go.mod h1:qiC1MCFPfGkRunIKqFbl6ybbns1OR34EkJ3Mb6+Jm7U= github.com/go-task/template v0.2.0 h1:xW7ek0o65FUSTbKcSNeg2Vyf/I7wYXFgLUznptvviBE= github.com/go-task/template v0.2.0/go.mod h1:dbdoUb6qKnHQi1y6o+IdIrs0J4o/SEhSTA6bbzZmdtc= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -280,21 +308,35 @@ github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63Y github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/cel-go v0.28.1 h1:YWIwi77J4xIsYUwAF/iIuS6haffzIHS8yWI8glSbLWM= github.com/google/cel-go v0.28.1/go.mod h1:X0bD6iVNR8pkROSOoHVdgTkzmRcosof7WQqCD6wcMc8= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-containerregistry v0.21.7 h1:/vPFuVXDjtFREsVArW+0h1CIl5urnOhzei4X2DMW9IU= -github.com/google/go-containerregistry v0.21.7/go.mod h1:kjSbt7/zMsKLWfnHrIvKvhXHUw91jbe9DNjPPJ32gXE= +github.com/google/go-containerregistry v0.20.7 h1:24VGNpS0IwrOZ2ms2P1QE3Xa5X9p4phx0aUgzYzHW6I= +github.com/google/go-containerregistry v0.20.7/go.mod h1:Lx5LCZQjLH1QBaMPeGwsME9biPeo1lPx6lbGj/UmzgM= github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0= github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE= github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= @@ -323,12 +365,17 @@ github.com/hashicorp/go-version v1.9.0 h1:CeOIz6k+LoN3qX9Z0tyQrPtiB1DFYRPfCIBtaX github.com/hashicorp/go-version v1.9.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/in-toto/attestation v1.1.2 h1:MBFn6lsMq6dptQZJBhalXTcWMb/aJy3V+GX3VYj/V1E= github.com/in-toto/attestation v1.1.2/go.mod h1:gYFddHMZj3DiQ0b62ltNi1Vj5rC879bTmBbrv9CRHpM= github.com/in-toto/in-toto-golang v0.11.0 h1:nfidMYBFx+E0lnmX5KUnN2Pdm8zdNKal1ayjJuzzRoA= github.com/in-toto/in-toto-golang v0.11.0/go.mod h1:u3PjTnwFKjp5a1YCcw8SJg0G+tMeKfVoWsWeFMDCMtw= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/jxskiss/base62 v1.1.0 h1:A5zbF8v8WXx2xixnAKD2w+abC+sIzYJX+nxmhA6HWFw= github.com/jxskiss/base62 v1.1.0/go.mod h1:HhWAlUXvxKThfOlZbcuFzsqwtF5TcqS9ru3y5GfjWAc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -352,16 +399,18 @@ github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731 h1:9x+U2HGLrSw5AT github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ= github.com/livekit/mediatransportutil v0.0.0-20260605212259-862d4a7bcb1e h1:SkgQRcG2VYEhh80Qb/zYZo8rWKJzNfJcfUQnXe6su2M= github.com/livekit/mediatransportutil v0.0.0-20260605212259-862d4a7bcb1e/go.mod h1:o8CFmAdrVwzJNOCsQCLUzXRjokkufNshnQHOe4fRaqU= -github.com/livekit/protocol v1.49.1-0.20260712215709-8847d7456816 h1:MDWDlH5dmcZY4OSljwE4e6B39libPQJIEmBRYaeGAn0= -github.com/livekit/protocol v1.49.1-0.20260712215709-8847d7456816/go.mod h1:jO+y05AU9Ec4JswDyuzKCZ4bhziOS0CzMqgnbj60Dzs= +github.com/livekit/protocol v1.49.0 h1:Q5nthDO1v7c0JHiWjMhgUQTlsKmCsBL/KCKxdHVaz00= +github.com/livekit/protocol v1.49.0/go.mod h1:jO+y05AU9Ec4JswDyuzKCZ4bhziOS0CzMqgnbj60Dzs= github.com/livekit/psrpc v0.7.2 h1:6oZ+NODJ2pLyaT6VqDq1F4Qc/3TpDUSpyphj/P9MhQc= github.com/livekit/psrpc v0.7.2/go.mod h1:rAI+m2+/cb4x9RXhLRtUx5ZwdfjjXOl4zi46IjEetaw= -github.com/livekit/server-sdk-go/v2 v2.18.1 h1:/u0JVII+ErGCivHnAGr6di0wl0NYsfcRvDzEtTAFovo= -github.com/livekit/server-sdk-go/v2 v2.18.1/go.mod h1:su0IvJNWTFCHVwmqpsFvxHfXWs9pn26ms+cKBR1jILU= +github.com/livekit/server-sdk-go/v2 v2.16.8-0.20260702164219-6126610d4e22 h1:xPko28MMS2QCbx9mWAUS5MKgO07AyouADfKCLU+Be5E= +github.com/livekit/server-sdk-go/v2 v2.16.8-0.20260702164219-6126610d4e22/go.mod h1:5nzTfVBH2Jz+TW1SrfpqC7wrbcD1lT94KZCJ9hOMyvk= github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magefile/mage v1.17.2 h1:fyXVu1eadI8Ap1HCCNgEhJ5McIWiYhLR8uol64ZZc40= github.com/magefile/mage v1.17.2/go.mod h1:Yj51kqllmsgFpvvSzgrZPK9WtluG3kUhFaBUVLo4feA= +github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8= +github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4= @@ -388,6 +437,8 @@ github.com/moby/patternmatcher v0.6.1 h1:qlhtafmr6kgMIJjKJMDmMWq7WLkKIo23hsrpR3x github.com/moby/patternmatcher v0.6.1/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/policy-helpers v0.0.0-20260507153417-a39d60132186 h1:AA3y9usJgmJyrOX16s8HsgHA3QP0CSvI9EJ9vVmpgGo= github.com/moby/policy-helpers v0.0.0-20260507153417-a39d60132186/go.mod h1:AbesLhDyQnWkhYOeG5BjDpfUWuyFlSpwv17zBGc03ag= +github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= +github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg= github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4= github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= @@ -398,8 +449,12 @@ github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/modelcontextprotocol/go-sdk v1.6.1 h1:0zOSupjKUxPKSocPT1Wtago+mUHU2/uZ4xSOY0FGReU= github.com/modelcontextprotocol/go-sdk v1.6.1/go.mod h1:kzm3kzFL1/+AziGOE0nUs3gvPoNxMCvkxokMkuFapXQ= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/morikuni/aec v1.1.0 h1:vBBl0pUnvi/Je71dsRrhMBtreIqNMYErSAbEeb8jrXQ= github.com/morikuni/aec v1.1.0/go.mod h1:xDRgiq/iw5l+zkao76YTKzKttOp2cwPEne25HDkJnBw= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= @@ -416,6 +471,32 @@ github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg= github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oapi-codegen/nullable v1.1.0 h1:eAh8JVc5430VtYVnq00Hrbpag9PFRGWLjxR1/3KntMs= +github.com/oapi-codegen/nullable v1.1.0/go.mod h1:KUZ3vUzkmEKY90ksAmit2+5juDIhIZhfDl+0PwOQlFY= +github.com/oapi-codegen/oapi-codegen/v2 v2.7.1 h1:a7Ab7YlpqkVG5HKrTaeFstm32Z5QOnyjnbsCO0jiMYM= +github.com/oapi-codegen/oapi-codegen/v2 v2.7.1/go.mod h1:qzFy6iuobJw/hD1aRILee4G87/ShmhR0xYCwcUtZMCw= +github.com/oapi-codegen/runtime v1.4.2 h1:GMxFVYLzoYLua+/KvzgSphkyK1lLTReQI9Vf4hvATKE= +github.com/oapi-codegen/runtime v1.4.2/go.mod h1:GwV7hC2hviaMzj+ITfHVRESK5J2W/GefVwIND/bMGvU= +github.com/oasdiff/yaml v0.0.9 h1:zQOvd2UKoozsSsAknnWoDJlSK4lC0mpmjfDsfqNwX48= +github.com/oasdiff/yaml v0.0.9/go.mod h1:8lvhgJG4xiKPj3HN5lDow4jZHPlx1i7dIwzkdAo6oAM= +github.com/oasdiff/yaml3 v0.0.9 h1:rWPrKccrdUm8J0F3sGuU+fuh9+1K/RdJlWF7O/9yw2g= +github.com/oasdiff/yaml3 v0.0.9/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= @@ -432,6 +513,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= +github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/pierrec/lz4/v4 v4.1.26 h1:GrpZw1gZttORinvzBdXPUXATeqlJjqUG/D87TKMnhjY= github.com/pierrec/lz4/v4 v4.1.26/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= github.com/pion/datachannel v1.6.0 h1:XecBlj+cvsxhAMZWFfFcPyUaDZtd7IJvrXqlXD/53i0= @@ -454,20 +537,20 @@ github.com/pion/rtp v1.10.2 h1:l+f6tTDcAH6xwepaAoW791ddhuYsJlqRATOzirO04Mo= github.com/pion/rtp v1.10.2/go.mod h1:Au8fc6cEByy8RLTwKTQTEeQqDB/SJDxwL4mZuxYA5Pk= github.com/pion/sctp v1.10.0 h1:qeoD6swF/2M5bYRcAGayqSbTKX3m4AW29CiQxG1+Pfg= github.com/pion/sctp v1.10.0/go.mod h1:N20Dq6LY+JvJDAh9VVh1JELngb2rQ8dPgds5yBWiPgw= -github.com/pion/sdp/v3 v3.0.19 h1:1VMKs3gIkTQV5M3hNKfTAPrDXSNrYtOlmOD8+mSZUGQ= -github.com/pion/sdp/v3 v3.0.19/go.mod h1:dE5WOSlzXrtiE/iuZqe9n+AcEbOjtAd3k5m5NtlV/qU= +github.com/pion/sdp/v3 v3.0.18 h1:l0bAXazKHpepazVdp+tPYnrsy9dfh7ZbT8DxesH5ZnI= +github.com/pion/sdp/v3 v3.0.18/go.mod h1:ZREGo6A9ZygQ9XkqAj5xYCQtQpif0i6Pa81HOiAdqQ8= github.com/pion/srtp/v3 v3.0.11 h1:GiESUr54/K4UuPigfq/CvWUed80JenQAHXn0C2MQQIQ= github.com/pion/srtp/v3 v3.0.11/go.mod h1:EeZOi/sd6glM1EXapg051gdNWO9yWT1YSsgQ4SlJkns= -github.com/pion/stun/v3 v3.1.5 h1:Y1FHlhaI6+4UoC5i/zQf4F7JvdZtB24/05oyy/GF1x8= -github.com/pion/stun/v3 v3.1.5/go.mod h1:zRUghXSQU32Lx5orJsz3uYMkIihweXb3mu5gIns02fs= +github.com/pion/stun/v3 v3.1.4 h1:/7ZL0j0dmLroKOq4GfkyKQ6asByYqntwyHSp5sYLcGY= +github.com/pion/stun/v3 v3.1.4/go.mod h1:ET7PFiXo1nrD2ZNVpbEHDuT0kCPVXhKmyWdiePNMw/U= github.com/pion/transport/v3 v3.1.1 h1:Tr684+fnnKlhPceU+ICdrw6KKkTms+5qHMgw6bIkYOM= github.com/pion/transport/v3 v3.1.1/go.mod h1:+c2eewC5WJQHiAA46fkMMzoYZSuGzA/7E2FPrOYHctQ= github.com/pion/transport/v4 v4.0.2 h1:ifYlPqNwsy6aKQ9y8yzxXlHae5431ZrH2avkD/Rn6Tk= github.com/pion/transport/v4 v4.0.2/go.mod h1:06hFI+jCFcok2X2MekVufNZ/uzNZXivGBPfviSVcjgM= -github.com/pion/turn/v5 v5.0.9 h1:zNeBfRyzGn7MPyUTvmvxeltLEjlFdSLPT1tlakoaOXM= -github.com/pion/turn/v5 v5.0.9/go.mod h1:u3XjBqy2Z4+NhCUpDoOSsNuQDrPLvKStlCGWk6sTQ1E= -github.com/pion/webrtc/v4 v4.2.15 h1:Ir/MauNFCfg+kgyBYPQLiGdVWFlzEcLxqtuzAkYkky0= -github.com/pion/webrtc/v4 v4.2.15/go.mod h1:CPTcyLfIzC4scOkQ4UY4pj6WvbUGhcNLIpK28cP5h6M= +github.com/pion/turn/v5 v5.0.8 h1:pZUCtmwWCMkrRKqh/8pL3WoGADXBe0/lOPkN7oqFjK8= +github.com/pion/turn/v5 v5.0.8/go.mod h1:1VwvxElZaOdJU0liJ/WUSm/Tsh+n2OxS5ISSDxgOWxU= +github.com/pion/webrtc/v4 v4.2.14 h1:Q6zMs+fSDsYuhZcNlvFGBxCOMHVV9oYcDa6O9/HIGTc= +github.com/pion/webrtc/v4 v4.2.14/go.mod h1:87NVKP86+g4OMrRxWhjWfUjeXP4JrV6RTlUrIW+/Jak= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -501,10 +584,11 @@ github.com/sebdah/goldie/v2 v2.8.0 h1:dZb9wR8q5++oplmEiJT+U/5KyotVD+HNGCAc5gNr8r github.com/sebdah/goldie/v2 v2.8.0/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14= github.com/secure-systems-lab/go-securesystemslib v0.10.0/go.mod h1:MRKONWmRoFzPNQ9USRF9i1mc7MvAVvF1LlW8X5VWDvk= -github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= -github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= +github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= +github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/segmentio/encoding v0.5.4 h1:OW1VRern8Nw6ITAtwSZ7Idrl3MXCFwXHPgqESYfvNt0= github.com/segmentio/encoding v0.5.4/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= @@ -519,15 +603,21 @@ github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/spdx/tools-golang v0.5.7 h1:+sWcKGnhwp3vLdMqPcLdA6QK679vd86cK9hQWH3AwCg= github.com/spdx/tools-golang v0.5.7/go.mod h1:jg7w0LOpoNAw6OxKEzCoqPC2GCTj45LyTlVmXubDsYw= +github.com/speakeasy-api/jsonpath v0.6.3 h1:c+QPwzAOdrWvzycuc9HFsIZcxKIaWcNpC+xhOW9rJxU= +github.com/speakeasy-api/jsonpath v0.6.3/go.mod h1:2cXloNuQ+RSXi5HTRaeBh7JEmjRXTiaKpFTdZiL7URI= +github.com/speakeasy-api/openapi v1.19.2 h1:md90tE71/M8jS3cuRlsuWP5Aed4xoG5PSRvXeZgCv/M= +github.com/speakeasy-api/openapi v1.19.2/go.mod h1:UfKa7FqE4jgexJZuj51MmdHAFGmDv0Zaw3+yOd81YKU= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tonistiigi/fsutil v0.0.0-20251211185533-a2aa163d723f h1:Z4NEQ86qFl1mHuCu9gwcE+EYCwDKfXAYXZbdIXyxmEA= @@ -544,14 +634,20 @@ github.com/u-root/u-root v0.16.0 h1:wY40O83MBVks97+Is0WlFlOPSwKQMIrWP9R1IsrExg8= github.com/u-root/u-root v0.16.0/go.mod h1:yL/XdSSW27PdGLgUh4MNRBy54mKM+TBLzpwiB4nwj90= github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 h1:pyC9PaHYZFgEKFdlp3G8RaCKgVpHZnecvArXvPXcFkM= github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701/go.mod h1:P3a5rG4X7tI17Nn3aOIAYr5HbIMukwXG0urG0WuL8OA= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY= github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli/v3 v3.9.0 h1:AV9lIiPv3ukYnxunaCUsHnEozptYmDN2F0+yWqLMn/c= github.com/urfave/cli/v3 v3.9.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/vbatts/tar-split v0.12.2 h1:w/Y6tjxpeiFMR47yzZPlPj/FcPLpXbTUi/9H7d3CPa4= github.com/vbatts/tar-split v0.12.2/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA= +github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= +github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU= github.com/wlynxg/anet v0.0.5/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= +github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQsBgUlc= +github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= @@ -580,6 +676,8 @@ go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 h1:4YsVu3B8+3qtWYYrsUYgn0OG78pN0rnNPRGX4SbokQI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0/go.mod h1:+wnlSn0mD1ADVMe3v9Z/WIaiz6q6gL2J/ejaAmdmv80= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0 h1:lgh3PiVrRUWMLOVSkQicxzZll5NjF1r+AtsX1XRIHw0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0/go.mod h1:5Cnhth3m/AgOeTgE3ex12pPmiu/gGtZit03kSzx9X7s= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.42.0 h1:lSZHgNHfbmQTPfuTmWVkEu8J8qXaQwuV30pjCcAUvP8= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.42.0/go.mod h1:so9ounLcuoRDu033MW/E0AD4hhUjVqswrMF5FoZlBcw= go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= @@ -619,30 +717,50 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ= golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= -golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o= +golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc= golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= @@ -650,6 +768,7 @@ golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.46.0 h1:7jTurBkPZu4moS/Uy4OQT1M+QBlsj3wejyZwsT8Z7rk= golang.org/x/tools v0.46.0/go.mod h1:FrD85F8l+NWL+9XWBSyVSHO6Ne4jutsfIFba7AWQ5Ys= @@ -669,16 +788,33 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1: google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.81.1 h1:VnnIIZ88UzOOKLukQi+ImGz8O1Wdp8nAGGnvOfEIWQQ= google.golang.org/grpc v1.81.1/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI= google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= diff --git a/pkg/config/config.go b/pkg/config/config.go index eebe19d77..2182e3b73 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2022-2024 LiveKit, Inc. +// Copyright 2022-2026 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import ( "os" "path" "strings" + "time" "github.com/livekit/livekit-cli/v2/pkg/util" "gopkg.in/yaml.v3" @@ -27,7 +28,9 @@ import ( type CLIConfig struct { DefaultProject string `yaml:"default_project"` + DefaultUser string `yaml:"default_user"` Projects []ProjectConfig `yaml:"projects"` + Users []UserConfig `yaml:"users"` DeviceName string `yaml:"device_name"` Theme string `yaml:"theme"` // absent from YAML @@ -42,6 +45,83 @@ type ProjectConfig struct { APISecret string `yaml:"api_secret"` } +type UserConfig struct { + Id string `yaml:"id"` + Name string `yaml:"name"` + Email string `yaml:"email"` + SessionToken string `yaml:"session_token"` + SessionExpiry int64 `yaml:"session_expiry"` + // Projects caches the projects this user can access, as last fetched from + // the Public API (listProjects). Caching lets project resolution avoid a + // network round-trip on every command; ProjectsFetchedAt records the Unix + // time it was populated so callers can refresh a stale cache. + Projects []UserProjectConfig `yaml:"projects,omitempty"` + ProjectsFetchedAt int64 `yaml:"projects_fetched_at,omitempty"` +} + +// UserProjectConfig is a project accessible under user-based auth. Unlike +// ProjectConfig it carries no API key/secret: requests are authorized with the +// user's session token and scoped to a project by id. +type UserProjectConfig struct { + ProjectId string `yaml:"project_id"` + Name string `yaml:"name,omitempty"` + Subdomain string `yaml:"subdomain,omitempty"` + URL string `yaml:"url,omitempty"` +} + +// SessionValid reports whether the user has a session token that has not +// expired. A zero SessionExpiry means "no known expiry" and is treated as +// valid, so a manually-injected token without an expiry remains usable. +func (u *UserConfig) SessionValid() bool { + if u == nil || u.SessionToken == "" { + return false + } + return u.SessionExpiry == 0 || time.Now().Unix() < u.SessionExpiry +} + +// GetUser returns the configured user matching idOrEmail (by id, or +// case-insensitively by email), or nil if none is configured. The returned +// pointer aliases the slice element, so mutations persist through a subsequent +// PersistIfNeeded on the same CLIConfig. +func (c *CLIConfig) GetUser(idOrEmail string) *UserConfig { + for i := range c.Users { + u := &c.Users[i] + if u.Id == idOrEmail || (u.Email != "" && strings.EqualFold(u.Email, idOrEmail)) { + return u + } + } + return nil +} + +// LoadDefaultUser returns the configured default user. It mirrors +// LoadDefaultProject and is used by user-based (experimental) auth. +func LoadDefaultUser() (*UserConfig, error) { + conf, err := LoadOrCreate() + if err != nil { + return nil, err + } + if conf.DefaultUser == "" { + return nil, errors.New("no default user set. Run `lk cloud auth` to sign in") + } + if u := conf.GetUser(conf.DefaultUser); u != nil { + return u, nil + } + return nil, fmt.Errorf("default user %q not found in config", conf.DefaultUser) +} + +// SetUserProjects replaces the cached project list for the user identified by +// idOrEmail and persists the config. fetchedAt is the Unix time the list was +// retrieved. +func (c *CLIConfig) SetUserProjects(idOrEmail string, projects []UserProjectConfig, fetchedAt int64) error { + u := c.GetUser(idOrEmail) + if u == nil { + return fmt.Errorf("user %q not found in config", idOrEmail) + } + u.Projects = projects + u.ProjectsFetchedAt = fetchedAt + return c.PersistIfNeeded() +} + func LoadDefaultProject() (*ProjectConfig, error) { conf, err := LoadOrCreate() if err != nil { diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go new file mode 100644 index 000000000..45e4ef4c4 --- /dev/null +++ b/pkg/config/config_test.go @@ -0,0 +1,63 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestUserConfigSessionValid(t *testing.T) { + now := time.Now().Unix() + tests := []struct { + name string + user *UserConfig + want bool + }{ + {"nil user", nil, false}, + {"no token", &UserConfig{SessionToken: ""}, false}, + {"token, no expiry", &UserConfig{SessionToken: "t"}, true}, + {"token, future expiry", &UserConfig{SessionToken: "t", SessionExpiry: now + 3600}, true}, + {"token, past expiry", &UserConfig{SessionToken: "t", SessionExpiry: now - 3600}, false}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equal(t, tt.want, tt.user.SessionValid()) + }) + } +} + +func TestCLIConfigGetUser(t *testing.T) { + c := &CLIConfig{ + Users: []UserConfig{ + {Id: "usr_1", Email: "Alice@LiveKit.io"}, + {Id: "usr_2", Email: "bob@livekit.io"}, + }, + } + + assert.Equal(t, "usr_1", c.GetUser("usr_1").Id) + // email match is case-insensitive + assert.Equal(t, "usr_1", c.GetUser("alice@livekit.io").Id) + assert.Equal(t, "usr_2", c.GetUser("bob@livekit.io").Id) + assert.Nil(t, c.GetUser("nobody@livekit.io")) + assert.Nil(t, c.GetUser("")) + + // GetUser returns an aliasing pointer: mutations are visible on the config. + c.GetUser("usr_1").Projects = []UserProjectConfig{{ProjectId: "p_abc"}} + assert.Len(t, c.Users[0].Projects, 1) + assert.Equal(t, "p_abc", c.Users[0].Projects[0].ProjectId) +} diff --git a/pkg/public/client.go b/pkg/public/client.go new file mode 100644 index 000000000..47bd2c5db --- /dev/null +++ b/pkg/public/client.go @@ -0,0 +1,154 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package public + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "net/http" + "strings" + + "github.com/livekit/livekit-cli/v2/pkg/public/oapi" +) + +// DefaultBaseURL is the production base URL of the LiveKit Public API. Override +// it (e.g. to http://localhost:8000/v1) for local development. +const DefaultBaseURL = "https://api.livekit.cloud/v1" + +// Client is the CLI's client for the user-authenticated LiveKit Public API. It +// wraps the oapi-codegen-generated client (package oapi) and exposes the small +// set of domain types and operations the CLI needs, insulating callers from the +// generated surface (which is regenerated from the OpenAPI spec). +type Client struct { + gen *oapi.ClientWithResponses +} + +// Project is a project the authenticated user can access. +// +// NOTE: the published spec does not yet describe the project endpoints (they +// are 501-only, with no success schema), so ListProjects/GetProject decode +// their responses by hand below rather than through generated types. This +// mirror carries only the id the server currently returns; extend it (and the +// decoding) as the endpoints — ideally the spec itself — grow. +type Project struct { + ID string +} + +// New builds a Client for the Public API at baseURL, authenticating every +// request with the given user session token. If baseURL is empty, DefaultBaseURL +// is used. +func New(baseURL, token string, opts ...oapi.ClientOption) (*Client, error) { + if baseURL == "" { + baseURL = DefaultBaseURL + } + // Prepend the bearer-auth editor so callers' opts can still override it. + opts = append([]oapi.ClientOption{oapi.WithRequestEditorFn(bearerAuth(token))}, opts...) + gen, err := oapi.NewClientWithResponses(baseURL, opts...) + if err != nil { + return nil, err + } + return &Client{gen: gen}, nil +} + +// bearerAuth returns a request editor that authorizes each request with the +// user session token. +func bearerAuth(token string) oapi.RequestEditorFn { + return func(_ context.Context, req *http.Request) error { + req.Header.Set("Authorization", "Bearer "+token) + return nil + } +} + +// ListProjects returns the projects the authenticated user can access. +func (c *Client) ListProjects(ctx context.Context) ([]Project, error) { + resp, err := c.gen.ListProjectsWithResponse(ctx) + if err != nil { + return nil, err + } + if resp.StatusCode() != http.StatusOK { + return nil, responseError(resp.StatusCode(), resp.Body) + } + // The spec has no schema for this endpoint yet, so decode the body directly. + var body []struct { + ID string `json:"id"` + } + if err := json.Unmarshal(resp.Body, &body); err != nil { + return nil, fmt.Errorf("decode projects: %w", err) + } + projects := make([]Project, len(body)) + for i, p := range body { + projects[i] = Project{ID: p.ID} + } + return projects, nil +} + +// GetProject returns a single project by id. +func (c *Client) GetProject(ctx context.Context, projectID string) (*Project, error) { + resp, err := c.gen.GetProjectWithResponse(ctx, projectID) + if err != nil { + return nil, err + } + if resp.StatusCode() != http.StatusOK { + return nil, responseError(resp.StatusCode(), resp.Body) + } + var body struct { + ID string `json:"id"` + } + if err := json.Unmarshal(resp.Body, &body); err != nil { + return nil, fmt.Errorf("decode project: %w", err) + } + return &Project{ID: body.ID}, nil +} + +// APIError is a structured error from the Public API. It carries the HTTP status +// and, when the body decoded as the spec's Error schema, its code and message. +// Callers can errors.As for it — notably via IsUnauthenticated. +type APIError struct { + Status int + Code string + Message string +} + +func (e *APIError) Error() string { + if e.Code == "" { + return e.Message + } + return fmt.Sprintf("%s: %s", e.Code, e.Message) +} + +// IsUnauthenticated reports whether err is an APIError signalling a missing or +// invalid session (HTTP 401), which the CLI surfaces as a prompt to re-run +// `lk cloud auth`. +func IsUnauthenticated(err error) bool { + var apiErr *APIError + return errors.As(err, &apiErr) && (apiErr.Status == http.StatusUnauthorized || apiErr.Code == "unauthenticated") +} + +// responseError builds an APIError from a non-2xx response. It prefers the +// spec's structured Error body ({error:{code,message}}) and falls back to the +// raw body when the server returned an unexpected shape or content type. +func responseError(status int, body []byte) error { + var e oapi.Error + if err := json.Unmarshal(body, &e); err == nil && e.Error.Code != "" { + return &APIError{Status: status, Code: e.Error.Code, Message: e.Error.Message} + } + msg := strings.TrimSpace(string(body)) + if msg == "" { + msg = http.StatusText(status) + } + return &APIError{Status: status, Message: fmt.Sprintf("unexpected response (HTTP %d): %s", status, msg)} +} diff --git a/pkg/public/gen.go b/pkg/public/gen.go new file mode 100644 index 000000000..b8bc096c8 --- /dev/null +++ b/pkg/public/gen.go @@ -0,0 +1,45 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package public is the CLI's client for the LiveKit Public API (the +// user-authenticated OpenAPI REST service), named to match public-api-server. +// The typed client under ./oapi is generated by oapi-codegen from an OpenAPI +// 3.1 spec — the same generator public-api-server uses for its server bindings +// (see ./oapi/generate.go and ./oapi/cfg.yaml). +// +// # Source of truth +// +// The authoritative spec is the published document served by the API itself, +// and no copy is kept in this repo. Regeneration fetches it directly (oapi-codegen +// loads http(s) URLs), defaulting to production; override for a local/staging +// server with LK_OPENAPI_SPEC_URL. +// +// The generate directive is gated behind the `oapigen` build tag so a plain +// `go generate ./...` never reaches the network — regenerate deliberately: +// +// go generate -tags oapigen ./pkg/public/... # prod +// LK_OPENAPI_SPEC_URL=http://localhost:8080/openapi.yaml go generate -tags oapigen ./pkg/public/... +// +// The committed artifact is the generated ./oapi/oapi.gen.go, which is what +// keeps ordinary `go build`/`go test` reproducible and offline — only +// regeneration needs the network. The gated directive and the fetch live in +// ./oapi (generate.go, generate.sh, cfg.yaml). +// +// NOTE (temporary): the published spec does not yet describe the project +// endpoints (listProjects/getProject are 501-only, no success schema), so no +// Project type is generated. The client wraps those two endpoints by hand +// (see Client.ListProjects / GetProject in client.go) until the spec declares +// their schemas, at which point the hand-decoding can be replaced with the +// generated types. +package public diff --git a/pkg/public/oapi/cfg.yaml b/pkg/public/oapi/cfg.yaml new file mode 100644 index 000000000..afbe549f7 --- /dev/null +++ b/pkg/public/oapi/cfg.yaml @@ -0,0 +1,15 @@ +# oapi-codegen configuration for the CLI's LiveKit Public API client. +# +# Generates Go models and a net/http client. The spec is fetched from its +# published URL at generate time (see generate.sh); no spec copy is kept in the +# repo. This mirrors public-api-server's oapi-codegen setup (pkg/api/v1/oapi) so +# the two sides share a generator and conventions — the CLI generates a `client` +# where the server generates a `std-http-server`. See ../gen.go. +package: oapi +output: oapi.gen.go +generate: + models: true + client: true +output-options: + # Keep the generated file readable and stable. + skip-prune: false diff --git a/pkg/public/oapi/generate.go b/pkg/public/oapi/generate.go new file mode 100644 index 000000000..d73f97df2 --- /dev/null +++ b/pkg/public/oapi/generate.go @@ -0,0 +1,26 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build oapigen + +package oapi + +// This file carries only the code-generation directive for package oapi. It is +// gated behind the `oapigen` build tag so a plain `go generate ./...` never +// reaches out to fetch the spec; regenerate deliberately with: +// +// go generate -tags oapigen ./pkg/public/... +// +// See ../gen.go for the source of truth and generate.sh for the fetch itself. +//go:generate sh generate.sh diff --git a/pkg/public/oapi/generate.sh b/pkg/public/oapi/generate.sh new file mode 100644 index 000000000..a639288e5 --- /dev/null +++ b/pkg/public/oapi/generate.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Regenerates oapi.gen.go from the LiveKit Public API OpenAPI spec. +# +# The spec is fetched directly from its published URL by oapi-codegen (which +# loads http(s) URLs natively) — no local copy of the spec is kept in the repo. +# Defaults to production; override for a local/staging server. The directive is +# gated behind the `oapigen` build tag, so regenerate deliberately with: +# +# go generate -tags oapigen ./pkg/public/... +# LK_OPENAPI_SPEC_URL=http://localhost:8080/openapi.yaml go generate -tags oapigen ./pkg/public/... +# +# Invoked by the //go:generate directive in generate.go (runs in this directory, +# alongside cfg.yaml). +set -eu + +SPEC_URL="${LK_OPENAPI_SPEC_URL:-https://api.livekit.io/openapi.yaml}" +echo "oapi-codegen: generating client from ${SPEC_URL}" +exec go tool oapi-codegen -config cfg.yaml "${SPEC_URL}" diff --git a/pkg/public/oapi/oapi.gen.go b/pkg/public/oapi/oapi.gen.go new file mode 100644 index 000000000..23191a301 --- /dev/null +++ b/pkg/public/oapi/oapi.gen.go @@ -0,0 +1,5639 @@ +// Package oapi provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. +package oapi + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + "time" + + "github.com/oapi-codegen/runtime" + openapi_types "github.com/oapi-codegen/runtime/types" +) + +const ( + BearerAuthScopes bearerAuthContextKey = "bearerAuth.Scopes" +) + +// Defines values for EgressState. +const ( + EgressStateActive EgressState = "active" + EgressStateEnded EgressState = "ended" + EgressStateNever EgressState = "never" +) + +// Valid indicates whether the value is a known member of the EgressState enum. +func (e EgressState) Valid() bool { + switch e { + case EgressStateActive: + return true + case EgressStateEnded: + return true + case EgressStateNever: + return true + default: + return false + } +} + +// Defines values for EgressStatus. +const ( + EGRESSABORTED EgressStatus = "EGRESS_ABORTED" + EGRESSACTIVE EgressStatus = "EGRESS_ACTIVE" + EGRESSCOMPLETE EgressStatus = "EGRESS_COMPLETE" + EGRESSENDING EgressStatus = "EGRESS_ENDING" + EGRESSFAILED EgressStatus = "EGRESS_FAILED" + EGRESSLIMITREACHED EgressStatus = "EGRESS_LIMIT_REACHED" + EGRESSSTARTING EgressStatus = "EGRESS_STARTING" +) + +// Valid indicates whether the value is a known member of the EgressStatus enum. +func (e EgressStatus) Valid() bool { + switch e { + case EGRESSABORTED: + return true + case EGRESSACTIVE: + return true + case EGRESSCOMPLETE: + return true + case EGRESSENDING: + return true + case EGRESSFAILED: + return true + case EGRESSLIMITREACHED: + return true + case EGRESSSTARTING: + return true + default: + return false + } +} + +// Defines values for ExportDataset. +const ( + Egresses ExportDataset = "egresses" + Ingresses ExportDataset = "ingresses" + Sessions ExportDataset = "sessions" + SipCalls ExportDataset = "sip-calls" + Usage ExportDataset = "usage" +) + +// Valid indicates whether the value is a known member of the ExportDataset enum. +func (e ExportDataset) Valid() bool { + switch e { + case Egresses: + return true + case Ingresses: + return true + case Sessions: + return true + case SipCalls: + return true + case Usage: + return true + default: + return false + } +} + +// Defines values for ExportFormat. +const ( + Csv ExportFormat = "csv" + Jsonl ExportFormat = "jsonl" +) + +// Valid indicates whether the value is a known member of the ExportFormat enum. +func (e ExportFormat) Valid() bool { + switch e { + case Csv: + return true + case Jsonl: + return true + default: + return false + } +} + +// Defines values for ExportStatus. +const ( + Canceled ExportStatus = "canceled" + Completed ExportStatus = "completed" + Expired ExportStatus = "expired" + Failed ExportStatus = "failed" + Pending ExportStatus = "pending" + Running ExportStatus = "running" +) + +// Valid indicates whether the value is a known member of the ExportStatus enum. +func (e ExportStatus) Valid() bool { + switch e { + case Canceled: + return true + case Completed: + return true + case Expired: + return true + case Failed: + return true + case Pending: + return true + case Running: + return true + default: + return false + } +} + +// Defines values for Feature. +const ( + FeatureAgent Feature = "agent" + FeatureEgress Feature = "egress" + FeatureIngress Feature = "ingress" + FeatureSip Feature = "sip" + FeatureTranscription Feature = "transcription" +) + +// Valid indicates whether the value is a known member of the Feature enum. +func (e Feature) Valid() bool { + switch e { + case FeatureAgent: + return true + case FeatureEgress: + return true + case FeatureIngress: + return true + case FeatureSip: + return true + case FeatureTranscription: + return true + default: + return false + } +} + +// Defines values for IngressStatus. +const ( + ENDPOINTBUFFERING IngressStatus = "ENDPOINT_BUFFERING" + ENDPOINTCOMPLETE IngressStatus = "ENDPOINT_COMPLETE" + ENDPOINTERROR IngressStatus = "ENDPOINT_ERROR" + ENDPOINTINACTIVE IngressStatus = "ENDPOINT_INACTIVE" + ENDPOINTPUBLISHING IngressStatus = "ENDPOINT_PUBLISHING" +) + +// Valid indicates whether the value is a known member of the IngressStatus enum. +func (e IngressStatus) Valid() bool { + switch e { + case ENDPOINTBUFFERING: + return true + case ENDPOINTCOMPLETE: + return true + case ENDPOINTERROR: + return true + case ENDPOINTINACTIVE: + return true + case ENDPOINTPUBLISHING: + return true + default: + return false + } +} + +// Defines values for SessionStatus. +const ( + SessionStatusActive SessionStatus = "active" + SessionStatusClosed SessionStatus = "closed" +) + +// Valid indicates whether the value is a known member of the SessionStatus enum. +func (e SessionStatus) Valid() bool { + switch e { + case SessionStatusActive: + return true + case SessionStatusClosed: + return true + default: + return false + } +} + +// Defines values for SipCallStatus. +const ( + SCSACTIVE SipCallStatus = "SCS_ACTIVE" + SCSCALLINCOMING SipCallStatus = "SCS_CALL_INCOMING" + SCSDISCONNECTED SipCallStatus = "SCS_DISCONNECTED" + SCSERROR SipCallStatus = "SCS_ERROR" + SCSPARTICIPANTJOINED SipCallStatus = "SCS_PARTICIPANT_JOINED" +) + +// Valid indicates whether the value is a known member of the SipCallStatus enum. +func (e SipCallStatus) Valid() bool { + switch e { + case SCSACTIVE: + return true + case SCSCALLINCOMING: + return true + case SCSDISCONNECTED: + return true + case SCSERROR: + return true + case SCSPARTICIPANTJOINED: + return true + default: + return false + } +} + +// Defines values for SipDirection. +const ( + SipDirectionInbound SipDirection = "inbound" + SipDirectionOutbound SipDirection = "outbound" +) + +// Valid indicates whether the value is a known member of the SipDirection enum. +func (e SipDirection) Valid() bool { + switch e { + case SipDirectionInbound: + return true + case SipDirectionOutbound: + return true + default: + return false + } +} + +// Defines values for SipEventEventType. +const ( + SipEventEventTypeSIPCALLENDED SipEventEventType = "SIP_CALL_ENDED" + SipEventEventTypeSIPCALLINCOMING SipEventEventType = "SIP_CALL_INCOMING" + SipEventEventTypeSIPCALLSTARTED SipEventEventType = "SIP_CALL_STARTED" + SipEventEventTypeSIPPARTICIPANTCREATED SipEventEventType = "SIP_PARTICIPANT_CREATED" + SipEventEventTypeSIPTRANSFERCOMPLETE SipEventEventType = "SIP_TRANSFER_COMPLETE" + SipEventEventTypeSIPTRANSFERREQUESTED SipEventEventType = "SIP_TRANSFER_REQUESTED" +) + +// Valid indicates whether the value is a known member of the SipEventEventType enum. +func (e SipEventEventType) Valid() bool { + switch e { + case SipEventEventTypeSIPCALLENDED: + return true + case SipEventEventTypeSIPCALLINCOMING: + return true + case SipEventEventTypeSIPCALLSTARTED: + return true + case SipEventEventTypeSIPPARTICIPANTCREATED: + return true + case SipEventEventTypeSIPTRANSFERCOMPLETE: + return true + case SipEventEventTypeSIPTRANSFERREQUESTED: + return true + default: + return false + } +} + +// Defines values for TimeseriesResponseInterval. +const ( + TimeseriesResponseIntervalDay TimeseriesResponseInterval = "day" + TimeseriesResponseIntervalHour TimeseriesResponseInterval = "hour" + TimeseriesResponseIntervalMinute TimeseriesResponseInterval = "minute" +) + +// Valid indicates whether the value is a known member of the TimeseriesResponseInterval enum. +func (e TimeseriesResponseInterval) Valid() bool { + switch e { + case TimeseriesResponseIntervalDay: + return true + case TimeseriesResponseIntervalHour: + return true + case TimeseriesResponseIntervalMinute: + return true + default: + return false + } +} + +// Defines values for Interval. +const ( + IntervalDay Interval = "day" + IntervalHour Interval = "hour" + IntervalMinute Interval = "minute" +) + +// Valid indicates whether the value is a known member of the Interval enum. +func (e Interval) Valid() bool { + switch e { + case IntervalDay: + return true + case IntervalHour: + return true + case IntervalMinute: + return true + default: + return false + } +} + +// Defines values for Order. +const ( + OrderAsc Order = "asc" + OrderDesc Order = "desc" +) + +// Valid indicates whether the value is a known member of the Order enum. +func (e Order) Valid() bool { + switch e { + case OrderAsc: + return true + case OrderDesc: + return true + default: + return false + } +} + +// Defines values for ListProjectEgressesParamsOrder. +const ( + ListProjectEgressesParamsOrderAsc ListProjectEgressesParamsOrder = "asc" + ListProjectEgressesParamsOrderDesc ListProjectEgressesParamsOrder = "desc" +) + +// Valid indicates whether the value is a known member of the ListProjectEgressesParamsOrder enum. +func (e ListProjectEgressesParamsOrder) Valid() bool { + switch e { + case ListProjectEgressesParamsOrderAsc: + return true + case ListProjectEgressesParamsOrderDesc: + return true + default: + return false + } +} + +// Defines values for ListProjectIngressesParamsOrder. +const ( + ListProjectIngressesParamsOrderAsc ListProjectIngressesParamsOrder = "asc" + ListProjectIngressesParamsOrderDesc ListProjectIngressesParamsOrder = "desc" +) + +// Valid indicates whether the value is a known member of the ListProjectIngressesParamsOrder enum. +func (e ListProjectIngressesParamsOrder) Valid() bool { + switch e { + case ListProjectIngressesParamsOrderAsc: + return true + case ListProjectIngressesParamsOrderDesc: + return true + default: + return false + } +} + +// Defines values for ListProjectSessionsParamsOrder. +const ( + ListProjectSessionsParamsOrderAsc ListProjectSessionsParamsOrder = "asc" + ListProjectSessionsParamsOrderDesc ListProjectSessionsParamsOrder = "desc" +) + +// Valid indicates whether the value is a known member of the ListProjectSessionsParamsOrder enum. +func (e ListProjectSessionsParamsOrder) Valid() bool { + switch e { + case ListProjectSessionsParamsOrderAsc: + return true + case ListProjectSessionsParamsOrderDesc: + return true + default: + return false + } +} + +// Defines values for ListProjectSessionsParamsSort. +const ( + EndedAt ListProjectSessionsParamsSort = "endedAt" + StartedAt ListProjectSessionsParamsSort = "startedAt" +) + +// Valid indicates whether the value is a known member of the ListProjectSessionsParamsSort enum. +func (e ListProjectSessionsParamsSort) Valid() bool { + switch e { + case EndedAt: + return true + case StartedAt: + return true + default: + return false + } +} + +// Defines values for ListProjectSessionsParamsStatus. +const ( + Active ListProjectSessionsParamsStatus = "active" + Closed ListProjectSessionsParamsStatus = "closed" +) + +// Valid indicates whether the value is a known member of the ListProjectSessionsParamsStatus enum. +func (e ListProjectSessionsParamsStatus) Valid() bool { + switch e { + case Active: + return true + case Closed: + return true + default: + return false + } +} + +// Defines values for ListProjectSipCallsParamsOrder. +const ( + ListProjectSipCallsParamsOrderAsc ListProjectSipCallsParamsOrder = "asc" + ListProjectSipCallsParamsOrderDesc ListProjectSipCallsParamsOrder = "desc" +) + +// Valid indicates whether the value is a known member of the ListProjectSipCallsParamsOrder enum. +func (e ListProjectSipCallsParamsOrder) Valid() bool { + switch e { + case ListProjectSipCallsParamsOrderAsc: + return true + case ListProjectSipCallsParamsOrderDesc: + return true + default: + return false + } +} + +// Defines values for ListProjectSipCallsParamsDirection. +const ( + ListProjectSipCallsParamsDirectionInbound ListProjectSipCallsParamsDirection = "inbound" + ListProjectSipCallsParamsDirectionOutbound ListProjectSipCallsParamsDirection = "outbound" +) + +// Valid indicates whether the value is a known member of the ListProjectSipCallsParamsDirection enum. +func (e ListProjectSipCallsParamsDirection) Valid() bool { + switch e { + case ListProjectSipCallsParamsDirectionInbound: + return true + case ListProjectSipCallsParamsDirectionOutbound: + return true + default: + return false + } +} + +// Defines values for ListSipCallEventsParamsOrder. +const ( + ListSipCallEventsParamsOrderAsc ListSipCallEventsParamsOrder = "asc" + ListSipCallEventsParamsOrderDesc ListSipCallEventsParamsOrder = "desc" +) + +// Valid indicates whether the value is a known member of the ListSipCallEventsParamsOrder enum. +func (e ListSipCallEventsParamsOrder) Valid() bool { + switch e { + case ListSipCallEventsParamsOrderAsc: + return true + case ListSipCallEventsParamsOrderDesc: + return true + default: + return false + } +} + +// Defines values for ListSipCallEventsParamsEventType. +const ( + ListSipCallEventsParamsEventTypeSIPCALLENDED ListSipCallEventsParamsEventType = "SIP_CALL_ENDED" + ListSipCallEventsParamsEventTypeSIPCALLINCOMING ListSipCallEventsParamsEventType = "SIP_CALL_INCOMING" + ListSipCallEventsParamsEventTypeSIPCALLSTARTED ListSipCallEventsParamsEventType = "SIP_CALL_STARTED" + ListSipCallEventsParamsEventTypeSIPPARTICIPANTCREATED ListSipCallEventsParamsEventType = "SIP_PARTICIPANT_CREATED" + ListSipCallEventsParamsEventTypeSIPTRANSFERCOMPLETE ListSipCallEventsParamsEventType = "SIP_TRANSFER_COMPLETE" + ListSipCallEventsParamsEventTypeSIPTRANSFERREQUESTED ListSipCallEventsParamsEventType = "SIP_TRANSFER_REQUESTED" +) + +// Valid indicates whether the value is a known member of the ListSipCallEventsParamsEventType enum. +func (e ListSipCallEventsParamsEventType) Valid() bool { + switch e { + case ListSipCallEventsParamsEventTypeSIPCALLENDED: + return true + case ListSipCallEventsParamsEventTypeSIPCALLINCOMING: + return true + case ListSipCallEventsParamsEventTypeSIPCALLSTARTED: + return true + case ListSipCallEventsParamsEventTypeSIPPARTICIPANTCREATED: + return true + case ListSipCallEventsParamsEventTypeSIPTRANSFERCOMPLETE: + return true + case ListSipCallEventsParamsEventTypeSIPTRANSFERREQUESTED: + return true + default: + return false + } +} + +// Defines values for QueryProjectTimeseriesParamsMetric. +const ( + ActiveParticipants QueryProjectTimeseriesParamsMetric = "activeParticipants" + BandwidthIn QueryProjectTimeseriesParamsMetric = "bandwidthIn" + BandwidthOut QueryProjectTimeseriesParamsMetric = "bandwidthOut" + ConnectionQuality QueryProjectTimeseriesParamsMetric = "connectionQuality" + ConnectionSuccessRate QueryProjectTimeseriesParamsMetric = "connectionSuccessRate" + ParticipantMinutes QueryProjectTimeseriesParamsMetric = "participantMinutes" + PublishBitrate QueryProjectTimeseriesParamsMetric = "publishBitrate" + PublishFramerate QueryProjectTimeseriesParamsMetric = "publishFramerate" + SubscribeBitrate QueryProjectTimeseriesParamsMetric = "subscribeBitrate" + SubscribeFramerate QueryProjectTimeseriesParamsMetric = "subscribeFramerate" +) + +// Valid indicates whether the value is a known member of the QueryProjectTimeseriesParamsMetric enum. +func (e QueryProjectTimeseriesParamsMetric) Valid() bool { + switch e { + case ActiveParticipants: + return true + case BandwidthIn: + return true + case BandwidthOut: + return true + case ConnectionQuality: + return true + case ConnectionSuccessRate: + return true + case ParticipantMinutes: + return true + case PublishBitrate: + return true + case PublishFramerate: + return true + case SubscribeBitrate: + return true + case SubscribeFramerate: + return true + default: + return false + } +} + +// Defines values for QueryProjectTimeseriesParamsInterval. +const ( + Day QueryProjectTimeseriesParamsInterval = "day" + Hour QueryProjectTimeseriesParamsInterval = "hour" + Minute QueryProjectTimeseriesParamsInterval = "minute" +) + +// Valid indicates whether the value is a known member of the QueryProjectTimeseriesParamsInterval enum. +func (e QueryProjectTimeseriesParamsInterval) Valid() bool { + switch e { + case Day: + return true + case Hour: + return true + case Minute: + return true + default: + return false + } +} + +// Defines values for QueryProjectTimeseriesParamsGroupBy. +const ( + RoomName QueryProjectTimeseriesParamsGroupBy = "roomName" + SessionId QueryProjectTimeseriesParamsGroupBy = "sessionId" +) + +// Valid indicates whether the value is a known member of the QueryProjectTimeseriesParamsGroupBy enum. +func (e QueryProjectTimeseriesParamsGroupBy) Valid() bool { + switch e { + case RoomName: + return true + case SessionId: + return true + default: + return false + } +} + +// ConnectionCounts Per-session connection counters. +type ConnectionCounts struct { + Attempts *int64 `json:"attempts,omitempty"` + Success *int64 `json:"success,omitempty"` +} + +// DailyUsage defines model for DailyUsage. +type DailyUsage struct { + ConnectionSeconds *string `json:"connectionSeconds,omitempty"` + Date *openapi_types.Date `json:"date,omitempty"` + DownstreamBytes *string `json:"downstreamBytes,omitempty"` + EgressAudioSeconds *string `json:"egressAudioSeconds,omitempty"` + EgressVideoSeconds *string `json:"egressVideoSeconds,omitempty"` + IngressAudioSeconds *string `json:"ingressAudioSeconds,omitempty"` + IngressVideoSeconds *string `json:"ingressVideoSeconds,omitempty"` + SipSeconds *string `json:"sipSeconds,omitempty"` +} + +// Egress defines model for Egress. +type Egress struct { + // Duration Duration in seconds. + Duration *string `json:"duration,omitempty"` + EgressId *string `json:"egressId,omitempty"` + EndedAt *time.Time `json:"endedAt,omitempty"` + StartedAt *time.Time `json:"startedAt,omitempty"` + + // Status Egress lifecycle status (mirrors `livekit.EgressStatus`). + Status *EgressStatus `json:"status,omitempty"` + Tags *[]string `json:"tags,omitempty"` + + // Type Request type (`web`, `track`, `track_composite`, `room_composite`, `participant`). + Type *string `json:"type,omitempty"` +} + +// EgressDetail Exactly one of `web`, `track`, `trackComposite`, `roomComposite`, or `participant` is set, matching the egress request type. The nested request bodies are passed through verbatim from the original request. +type EgressDetail struct { + Duration *string `json:"duration,omitempty"` + EgressId *string `json:"egressId,omitempty"` + EndedAt *time.Time `json:"endedAt,omitempty"` + Error *string `json:"error,omitempty"` + FileResults *[]map[string]interface{} `json:"fileResults,omitempty"` + ImageResults *[]map[string]interface{} `json:"imageResults,omitempty"` + Participant *map[string]interface{} `json:"participant,omitempty"` + RoomComposite *map[string]interface{} `json:"roomComposite,omitempty"` + RoomId *string `json:"roomId,omitempty"` + SegmentResults *[]EgressSegmentResult `json:"segmentResults,omitempty"` + StartedAt *time.Time `json:"startedAt,omitempty"` + + // Status Egress lifecycle status (mirrors `livekit.EgressStatus`). + Status *EgressStatus `json:"status,omitempty"` + StreamResults *[]map[string]interface{} `json:"streamResults,omitempty"` + Track *map[string]interface{} `json:"track,omitempty"` + TrackComposite *map[string]interface{} `json:"trackComposite,omitempty"` + Type *string `json:"type,omitempty"` + Web *map[string]interface{} `json:"web,omitempty"` +} + +// EgressList defines model for EgressList. +type EgressList struct { + Items []Egress `json:"items"` + + // PageInfo Cursor pagination metadata. + PageInfo PageInfo `json:"pageInfo"` +} + +// EgressSegmentResult defines model for EgressSegmentResult. +type EgressSegmentResult struct { + Duration *string `json:"duration,omitempty"` + EndedAt *string `json:"endedAt,omitempty"` + LivePlaylistLocation *string `json:"livePlaylistLocation,omitempty"` + LivePlaylistName *string `json:"livePlaylistName,omitempty"` + PlaylistLocation *string `json:"playlistLocation,omitempty"` + PlaylistName *string `json:"playlistName,omitempty"` + SegmentCount *string `json:"segmentCount,omitempty"` + Size *string `json:"size,omitempty"` + StartedAt *string `json:"startedAt,omitempty"` +} + +// EgressState defines model for EgressState. +type EgressState string + +// EgressStatus Egress lifecycle status (mirrors `livekit.EgressStatus`). +type EgressStatus string + +// Error defines model for Error. +type Error struct { + Error struct { + Code string `json:"code"` + Message string `json:"message"` + } `json:"error"` +} + +// Export defines model for Export. +type Export struct { + CompletedAt *time.Time `json:"completedAt,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Datasets []ExportDataset `json:"datasets"` + + // DownloadUrl Signed URL to download the artifact. Present when `status` is `completed`. + DownloadUrl *string `json:"downloadUrl,omitempty"` + EndTime *time.Time `json:"endTime,omitempty"` + + // Error Failure detail. Present when `status` is `failed`. + Error *string `json:"error,omitempty"` + + // ExpiresAt When the artifact and its `downloadUrl` expire. + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + FileSizeBytes *string `json:"fileSizeBytes,omitempty"` + Format *ExportFormat `json:"format,omitempty"` + Id string `json:"id"` + ProjectId *string `json:"projectId,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` + RowCount *string `json:"rowCount,omitempty"` + StartTime *time.Time `json:"startTime,omitempty"` + Status ExportStatus `json:"status"` +} + +// ExportCreateRequest Describes an export. The project scope is taken from the request path. Optionally narrow to a single record with `resourceId` (with a single dataset). +type ExportCreateRequest struct { + // Datasets Datasets to include. A single dataset yields one file in the chosen `format`; multiple datasets yield a zip archive with one file each. + Datasets []ExportDataset `json:"datasets"` + + // EndTime Exclusive upper bound, RFC3339. + EndTime time.Time `json:"endTime"` + Format *ExportFormat `json:"format,omitempty"` + + // ResourceId Optional. Restrict the export to a single record (e.g. one session or egress id). Requires exactly one dataset. + ResourceId *string `json:"resourceId,omitempty"` + + // StartTime Inclusive lower bound, RFC3339. + StartTime time.Time `json:"startTime"` +} + +// ExportDataset An exportable analytics dataset (values match the URL path segments). +type ExportDataset string + +// ExportFormat defines model for ExportFormat. +type ExportFormat string + +// ExportList defines model for ExportList. +type ExportList struct { + Items []Export `json:"items"` + + // PageInfo Cursor pagination metadata. + PageInfo PageInfo `json:"pageInfo"` +} + +// ExportStatus defines model for ExportStatus. +type ExportStatus string + +// Feature A capability exercised within a session. +type Feature string + +// Ingress defines model for Ingress. +type Ingress struct { + // Duration Duration in seconds. + Duration *string `json:"duration,omitempty"` + EndedAt *time.Time `json:"endedAt,omitempty"` + IngressId *string `json:"ingressId,omitempty"` + StartedAt *time.Time `json:"startedAt,omitempty"` + + // Status Ingress endpoint status (mirrors `livekit.IngressState.Status`). + Status *IngressStatus `json:"status,omitempty"` + Tags *[]string `json:"tags,omitempty"` +} + +// IngressDetail defines model for IngressDetail. +type IngressDetail struct { + IngressId *string `json:"ingressId,omitempty"` + Sessions *[]IngressSession `json:"sessions,omitempty"` +} + +// IngressList defines model for IngressList. +type IngressList struct { + Items []Ingress `json:"items"` + + // PageInfo Cursor pagination metadata. + PageInfo PageInfo `json:"pageInfo"` +} + +// IngressSession defines model for IngressSession. +type IngressSession struct { + // Duration Duration in seconds. + Duration *string `json:"duration,omitempty"` + EndedAt *time.Time `json:"endedAt,omitempty"` + Error *string `json:"error,omitempty"` + RoomId *string `json:"roomId,omitempty"` + RoomName *string `json:"roomName,omitempty"` + StartedAt *time.Time `json:"startedAt,omitempty"` + Type *string `json:"type,omitempty"` +} + +// IngressStatus Ingress endpoint status (mirrors `livekit.IngressState.Status`). +type IngressStatus string + +// PageInfo Cursor pagination metadata. +type PageInfo struct { + HasMore bool `json:"hasMore"` + + // NextCursor Pass as `cursor` to fetch the next page. Absent on the last page. + NextCursor *string `json:"nextCursor,omitempty"` +} + +// ParticipantInfo defines model for ParticipantInfo. +type ParticipantInfo struct { + Browser *string `json:"browser,omitempty"` + + // ConnectionTimeMs Client connect time in milliseconds. + ConnectionTimeMs *int `json:"connectionTimeMs,omitempty"` + + // ConnectionType Network connection type (e.g. `WIFI`). + ConnectionType *string `json:"connectionType,omitempty"` + DeviceModel *string `json:"deviceModel,omitempty"` + IsActive *bool `json:"isActive,omitempty"` + JoinedAt *time.Time `json:"joinedAt,omitempty"` + LeftAt *time.Time `json:"leftAt,omitempty"` + + // Location Country name. + Location *string `json:"location,omitempty"` + Os *string `json:"os,omitempty"` + ParticipantIdentity *string `json:"participantIdentity,omitempty"` + ParticipantName *string `json:"participantName,omitempty"` + PublishedSources *PublishedSources `json:"publishedSources,omitempty"` + Region *string `json:"region,omitempty"` + RoomId *string `json:"roomId,omitempty"` + SdkVersion *string `json:"sdkVersion,omitempty"` + Sessions *[]ParticipantSession `json:"sessions,omitempty"` +} + +// ParticipantSession defines model for ParticipantSession. +type ParticipantSession struct { + JoinedAt *time.Time `json:"joinedAt,omitempty"` + LeftAt *time.Time `json:"leftAt,omitempty"` + ParticipantId *string `json:"participantId,omitempty"` +} + +// PublishedSources defines model for PublishedSources. +type PublishedSources struct { + CameraTrack *bool `json:"cameraTrack,omitempty"` + MicrophoneTrack *bool `json:"microphoneTrack,omitempty"` + ScreenShareAudio *bool `json:"screenShareAudio,omitempty"` + ScreenShareTrack *bool `json:"screenShareTrack,omitempty"` +} + +// Session defines model for Session. +type Session struct { + // BandwidthIn Bytes received (downstream) over the session. + BandwidthIn *string `json:"bandwidthIn,omitempty"` + + // BandwidthOut Bytes sent (upstream) over the session. + BandwidthOut *string `json:"bandwidthOut,omitempty"` + + // ConnectionCounts Per-session connection counters. + ConnectionCounts *ConnectionCounts `json:"connectionCounts,omitempty"` + + // ConnectionMinutes Total participant connection minutes. + ConnectionMinutes *string `json:"connectionMinutes,omitempty"` + Egress *EgressState `json:"egress,omitempty"` + EndedAt *time.Time `json:"endedAt,omitempty"` + + // Features Capabilities exercised during the session (used by the `feature`/`excludeFeature` filters). + Features *[]Feature `json:"features,omitempty"` + LastActive *time.Time `json:"lastActive,omitempty"` + + // NumActiveParticipants Participants currently connected (0 once the session is closed). + NumActiveParticipants *int `json:"numActiveParticipants,omitempty"` + + // NumParticipants Total participants that joined the session. + NumParticipants *int `json:"numParticipants,omitempty"` + RoomName *string `json:"roomName,omitempty"` + SessionId *string `json:"sessionId,omitempty"` + StartedAt *time.Time `json:"startedAt,omitempty"` + Status *SessionStatus `json:"status,omitempty"` + + // Tags User-defined tags on the session (used by the `tag`/`excludeTag` filters). + Tags *[]string `json:"tags,omitempty"` +} + +// SessionDetail Detail for a single session. A superset of `Session`: same field names, plus `roomId` and the per-participant breakdown. +type SessionDetail struct { + // BandwidthIn Bytes received (downstream) over the session. + BandwidthIn *string `json:"bandwidthIn,omitempty"` + + // BandwidthOut Bytes sent (upstream) over the session. + BandwidthOut *string `json:"bandwidthOut,omitempty"` + ConnectionMinutes *string `json:"connectionMinutes,omitempty"` + EndedAt *time.Time `json:"endedAt,omitempty"` + Features *[]Feature `json:"features,omitempty"` + + // NumParticipants Total participants that joined the session. + NumParticipants *int `json:"numParticipants,omitempty"` + Participants *[]ParticipantInfo `json:"participants,omitempty"` + RoomId *string `json:"roomId,omitempty"` + RoomName *string `json:"roomName,omitempty"` + SessionId *string `json:"sessionId,omitempty"` + StartedAt *time.Time `json:"startedAt,omitempty"` + Status *SessionStatus `json:"status,omitempty"` + Tags *[]string `json:"tags,omitempty"` +} + +// SessionList defines model for SessionList. +type SessionList struct { + Items []Session `json:"items"` + + // PageInfo Cursor pagination metadata. + PageInfo PageInfo `json:"pageInfo"` +} + +// SessionStatus defines model for SessionStatus. +type SessionStatus string + +// SipAttributes defines model for SipAttributes. +type SipAttributes struct { + CallIdFull *string `json:"callIdFull,omitempty"` + Codec *string `json:"codec,omitempty"` +} + +// SipCall defines model for SipCall. +type SipCall struct { + CallId *string `json:"callId,omitempty"` + Direction *SipDirection `json:"direction,omitempty"` + + // Duration Duration in seconds. + Duration *string `json:"duration,omitempty"` + EndedAt *time.Time `json:"endedAt,omitempty"` + Error *string `json:"error,omitempty"` + RoomId *string `json:"roomId,omitempty"` + RoomName *string `json:"roomName,omitempty"` + StartedAt *time.Time `json:"startedAt,omitempty"` + + // Status SIP call status (mirrors `livekit.SIPCallStatus`). + Status *SipCallStatus `json:"status,omitempty"` + Tags *[]string `json:"tags,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// SipCallDetail defines model for SipCallDetail. +type SipCallDetail struct { + Attributes *SipAttributes `json:"attributes,omitempty"` + CallId *string `json:"callId,omitempty"` + Callee *string `json:"callee,omitempty"` + CalleeHost *string `json:"calleeHost,omitempty"` + Caller *string `json:"caller,omitempty"` + CallerHost *string `json:"callerHost,omitempty"` + Direction *SipDirection `json:"direction,omitempty"` + DispatchId *string `json:"dispatchId,omitempty"` + + // Duration Duration in seconds. + Duration *string `json:"duration,omitempty"` + EndedAt *time.Time `json:"endedAt,omitempty"` + Error *string `json:"error,omitempty"` + Provider *string `json:"provider,omitempty"` + Region *string `json:"region,omitempty"` + + // Response SIP response code. + Response *int `json:"response,omitempty"` + RoomId *string `json:"roomId,omitempty"` + RoomName *string `json:"roomName,omitempty"` + StartedAt *time.Time `json:"startedAt,omitempty"` + + // Status SIP call status (mirrors `livekit.SIPCallStatus`). + Status *SipCallStatus `json:"status,omitempty"` + Transport *string `json:"transport,omitempty"` + TrunkId *string `json:"trunkId,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// SipCallList defines model for SipCallList. +type SipCallList struct { + Items []SipCall `json:"items"` + + // PageInfo Cursor pagination metadata. + PageInfo PageInfo `json:"pageInfo"` +} + +// SipCallStatus SIP call status (mirrors `livekit.SIPCallStatus`). +type SipCallStatus string + +// SipDirection defines model for SipDirection. +type SipDirection string + +// SipEvent defines model for SipEvent. +type SipEvent struct { + // CallInfo Shape is `livekit.SIPCallInfo`. + CallInfo *map[string]interface{} `json:"callInfo,omitempty"` + EventType *SipEventEventType `json:"eventType,omitempty"` + Timestamp *time.Time `json:"timestamp,omitempty"` +} + +// SipEventEventType defines model for SipEvent.EventType. +type SipEventEventType string + +// SipEventList defines model for SipEventList. +type SipEventList struct { + CallId string `json:"callId"` + Items []SipEvent `json:"items"` + + // PageInfo Cursor pagination metadata. + PageInfo PageInfo `json:"pageInfo"` +} + +// TimeseriesPoint defines model for TimeseriesPoint. +type TimeseriesPoint struct { + Timestamp time.Time `json:"timestamp"` + Value float64 `json:"value"` +} + +// TimeseriesResponse defines model for TimeseriesResponse. +type TimeseriesResponse struct { + Interval TimeseriesResponseInterval `json:"interval"` + Series []TimeseriesSeries `json:"series"` +} + +// TimeseriesResponseInterval defines model for TimeseriesResponse.Interval. +type TimeseriesResponseInterval string + +// TimeseriesSeries defines model for TimeseriesSeries. +type TimeseriesSeries struct { + // Group Dimension values for this series. Present only when `groupBy` is set. + Group *map[string]string `json:"group,omitempty"` + Metric string `json:"metric"` + Points []TimeseriesPoint `json:"points"` +} + +// UsageResponse defines model for UsageResponse. +type UsageResponse struct { + Items []DailyUsage `json:"items"` +} + +// Cursor defines model for Cursor. +type Cursor = string + +// EndTime defines model for EndTime. +type EndTime = time.Time + +// ExcludeFeatures defines model for ExcludeFeatures. +type ExcludeFeatures = []Feature + +// ExcludeTags defines model for ExcludeTags. +type ExcludeTags = []string + +// ExportStatusFilter defines model for ExportStatusFilter. +type ExportStatusFilter = []ExportStatus + +// IncludeFeatures defines model for IncludeFeatures. +type IncludeFeatures = []Feature + +// IncludeTags defines model for IncludeTags. +type IncludeTags = []string + +// Interval defines model for Interval. +type Interval string + +// Limit defines model for Limit. +type Limit = int + +// Metric defines model for Metric. +type Metric = []string + +// Order defines model for Order. +type Order string + +// ProjectId defines model for ProjectId. +type ProjectId = string + +// StartTime defines model for StartTime. +type StartTime = time.Time + +// BadRequest defines model for BadRequest. +type BadRequest = Error + +// Forbidden defines model for Forbidden. +type Forbidden = Error + +// NotFound defines model for NotFound. +type NotFound = Error + +// NotImplemented defines model for NotImplemented. +type NotImplemented = Error + +// TooManyRequests defines model for TooManyRequests. +type TooManyRequests = Error + +// Unauthorized defines model for Unauthorized. +type Unauthorized = Error + +// bearerAuthContextKey is the context key for bearerAuth security scheme +type bearerAuthContextKey string + +// ListProjectEgressesParams defines parameters for ListProjectEgresses. +type ListProjectEgressesParams struct { + // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. + StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` + + // EndTime Exclusive upper bound, RFC3339. Defaults to now. + EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` + + // Limit Maximum number of items to return. + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. + Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` + + // Order Sort order. + Order *ListProjectEgressesParamsOrder `form:"order,omitempty" json:"order,omitempty"` + + // Tag Include only records carrying at least one of these tags (OR semantics). Repeat the parameter to pass multiple. + Tag *IncludeTags `form:"tag,omitempty" json:"tag,omitempty"` + + // ExcludeTag Exclude records carrying any of these tags (OR semantics). Repeat the parameter to pass multiple. Combine with `tag` to require some tags while excluding others. + ExcludeTag *ExcludeTags `form:"excludeTag,omitempty" json:"excludeTag,omitempty"` +} + +// ListProjectEgressesParamsOrder defines parameters for ListProjectEgresses. +type ListProjectEgressesParamsOrder string + +// ListProjectExportsParams defines parameters for ListProjectExports. +type ListProjectExportsParams struct { + // Limit Maximum number of items to return. + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. + Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` + + // Status Filter export jobs by status. Repeat the parameter to match multiple. + Status *ExportStatusFilter `form:"status,omitempty" json:"status,omitempty"` +} + +// ListProjectIngressesParams defines parameters for ListProjectIngresses. +type ListProjectIngressesParams struct { + // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. + StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` + + // EndTime Exclusive upper bound, RFC3339. Defaults to now. + EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` + + // Limit Maximum number of items to return. + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. + Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` + + // Order Sort order. + Order *ListProjectIngressesParamsOrder `form:"order,omitempty" json:"order,omitempty"` + + // Tag Include only records carrying at least one of these tags (OR semantics). Repeat the parameter to pass multiple. + Tag *IncludeTags `form:"tag,omitempty" json:"tag,omitempty"` + + // ExcludeTag Exclude records carrying any of these tags (OR semantics). Repeat the parameter to pass multiple. Combine with `tag` to require some tags while excluding others. + ExcludeTag *ExcludeTags `form:"excludeTag,omitempty" json:"excludeTag,omitempty"` +} + +// ListProjectIngressesParamsOrder defines parameters for ListProjectIngresses. +type ListProjectIngressesParamsOrder string + +// ListProjectSessionsParams defines parameters for ListProjectSessions. +type ListProjectSessionsParams struct { + // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. + StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` + + // EndTime Exclusive upper bound, RFC3339. Defaults to now. + EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` + + // Limit Maximum number of items to return. + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. + Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` + + // Order Sort order. + Order *ListProjectSessionsParamsOrder `form:"order,omitempty" json:"order,omitempty"` + + // Sort Field to sort by. + Sort *ListProjectSessionsParamsSort `form:"sort,omitempty" json:"sort,omitempty"` + + // Status Filter by session status. Repeat the parameter to match multiple. + Status *[]ListProjectSessionsParamsStatus `form:"status,omitempty" json:"status,omitempty"` + + // RoomName Exact room name match. + RoomName *string `form:"roomName,omitempty" json:"roomName,omitempty"` + + // RoomId Exact room (session) id match. + RoomId *string `form:"roomId,omitempty" json:"roomId,omitempty"` + + // Feature Include only records that exercised at least one of these features (OR semantics). Repeat the parameter to pass multiple. + Feature *IncludeFeatures `form:"feature,omitempty" json:"feature,omitempty"` + + // ExcludeFeature Exclude records that exercised any of these features (OR semantics). Repeat the parameter to pass multiple. Example: `excludeFeature=egress&excludeFeature=sip` lists every session that did not use egress or SIP. + ExcludeFeature *ExcludeFeatures `form:"excludeFeature,omitempty" json:"excludeFeature,omitempty"` + + // Tag Include only records carrying at least one of these tags (OR semantics). Repeat the parameter to pass multiple. + Tag *IncludeTags `form:"tag,omitempty" json:"tag,omitempty"` + + // ExcludeTag Exclude records carrying any of these tags (OR semantics). Repeat the parameter to pass multiple. Combine with `tag` to require some tags while excluding others. + ExcludeTag *ExcludeTags `form:"excludeTag,omitempty" json:"excludeTag,omitempty"` +} + +// ListProjectSessionsParamsOrder defines parameters for ListProjectSessions. +type ListProjectSessionsParamsOrder string + +// ListProjectSessionsParamsSort defines parameters for ListProjectSessions. +type ListProjectSessionsParamsSort string + +// ListProjectSessionsParamsStatus defines parameters for ListProjectSessions. +type ListProjectSessionsParamsStatus string + +// ListProjectSipCallsParams defines parameters for ListProjectSipCalls. +type ListProjectSipCallsParams struct { + // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. + StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` + + // EndTime Exclusive upper bound, RFC3339. Defaults to now. + EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` + + // Limit Maximum number of items to return. + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. + Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` + + // Order Sort order. + Order *ListProjectSipCallsParamsOrder `form:"order,omitempty" json:"order,omitempty"` + + // Direction Filter by call direction. Repeatable. + Direction *[]ListProjectSipCallsParamsDirection `form:"direction,omitempty" json:"direction,omitempty"` + RoomName *string `form:"roomName,omitempty" json:"roomName,omitempty"` + + // Tag Include only records carrying at least one of these tags (OR semantics). Repeat the parameter to pass multiple. + Tag *IncludeTags `form:"tag,omitempty" json:"tag,omitempty"` + + // ExcludeTag Exclude records carrying any of these tags (OR semantics). Repeat the parameter to pass multiple. Combine with `tag` to require some tags while excluding others. + ExcludeTag *ExcludeTags `form:"excludeTag,omitempty" json:"excludeTag,omitempty"` +} + +// ListProjectSipCallsParamsOrder defines parameters for ListProjectSipCalls. +type ListProjectSipCallsParamsOrder string + +// ListProjectSipCallsParamsDirection defines parameters for ListProjectSipCalls. +type ListProjectSipCallsParamsDirection string + +// ListSipCallEventsParams defines parameters for ListSipCallEvents. +type ListSipCallEventsParams struct { + // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. + StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` + + // EndTime Exclusive upper bound, RFC3339. Defaults to now. + EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` + + // Limit Maximum number of items to return. + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. + Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` + + // Order Sort order. + Order *ListSipCallEventsParamsOrder `form:"order,omitempty" json:"order,omitempty"` + + // EventType Filter by event type. Repeat the parameter to match multiple. + EventType *[]ListSipCallEventsParamsEventType `form:"eventType,omitempty" json:"eventType,omitempty"` +} + +// ListSipCallEventsParamsOrder defines parameters for ListSipCallEvents. +type ListSipCallEventsParamsOrder string + +// ListSipCallEventsParamsEventType defines parameters for ListSipCallEvents. +type ListSipCallEventsParamsEventType string + +// QueryProjectTimeseriesParams defines parameters for QueryProjectTimeseries. +type QueryProjectTimeseriesParams struct { + // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. + StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` + + // EndTime Exclusive upper bound, RFC3339. Defaults to now. + EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` + + // Metric One or more metrics to return. Repeat the parameter for multiple. + Metric Metric `form:"metric" json:"metric"` + + // Interval Bucket granularity. + Interval *QueryProjectTimeseriesParamsInterval `form:"interval,omitempty" json:"interval,omitempty"` + + // GroupBy Optional dimension to split each metric by. + GroupBy *QueryProjectTimeseriesParamsGroupBy `form:"groupBy,omitempty" json:"groupBy,omitempty"` + + // SessionId Restrict the series to a single room session. + SessionId *string `form:"sessionId,omitempty" json:"sessionId,omitempty"` +} + +// QueryProjectTimeseriesParamsMetric defines parameters for QueryProjectTimeseries. +type QueryProjectTimeseriesParamsMetric string + +// QueryProjectTimeseriesParamsInterval defines parameters for QueryProjectTimeseries. +type QueryProjectTimeseriesParamsInterval string + +// QueryProjectTimeseriesParamsGroupBy defines parameters for QueryProjectTimeseries. +type QueryProjectTimeseriesParamsGroupBy string + +// GetProjectUsageParams defines parameters for GetProjectUsage. +type GetProjectUsageParams struct { + // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. + StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` + + // EndTime Exclusive upper bound, RFC3339. Defaults to now. + EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` +} + +// CreateProjectExportJSONRequestBody defines body for CreateProjectExport for application/json ContentType. +type CreateProjectExportJSONRequestBody = ExportCreateRequest + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // DeleteExport request + DeleteExport(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetExport request + GetExport(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListProjectEgresses request + ListProjectEgresses(ctx context.Context, projectId ProjectId, params *ListProjectEgressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEgress request + GetEgress(ctx context.Context, projectId ProjectId, egressId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListProjectExports request + ListProjectExports(ctx context.Context, projectId ProjectId, params *ListProjectExportsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateProjectExportWithBody request with any body + CreateProjectExportWithBody(ctx context.Context, projectId ProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateProjectExport(ctx context.Context, projectId ProjectId, body CreateProjectExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListProjectIngresses request + ListProjectIngresses(ctx context.Context, projectId ProjectId, params *ListProjectIngressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetIngress request + GetIngress(ctx context.Context, projectId ProjectId, ingressId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListProjectSessions request + ListProjectSessions(ctx context.Context, projectId ProjectId, params *ListProjectSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSession request + GetSession(ctx context.Context, projectId ProjectId, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListProjectSipCalls request + ListProjectSipCalls(ctx context.Context, projectId ProjectId, params *ListProjectSipCallsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSipCall request + GetSipCall(ctx context.Context, projectId ProjectId, callId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListSipCallEvents request + ListSipCallEvents(ctx context.Context, projectId ProjectId, callId string, params *ListSipCallEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // QueryProjectTimeseries request + QueryProjectTimeseries(ctx context.Context, projectId ProjectId, params *QueryProjectTimeseriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetProjectUsage request + GetProjectUsage(ctx context.Context, projectId ProjectId, params *GetProjectUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListProjects request + ListProjects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateProject request + CreateProject(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteProject request + DeleteProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetProject request + GetProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateProject request + UpdateProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListUsers request + ListUsers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCurrentUser request + GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetUser request + GetUser(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListWorkspaces request + ListWorkspaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetWorkspace request + GetWorkspace(ctx context.Context, workspaceId string, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) DeleteExport(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteExportRequest(c.Server, exportId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetExport(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetExportRequest(c.Server, exportId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListProjectEgresses(ctx context.Context, projectId ProjectId, params *ListProjectEgressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListProjectEgressesRequest(c.Server, projectId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEgress(ctx context.Context, projectId ProjectId, egressId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEgressRequest(c.Server, projectId, egressId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListProjectExports(ctx context.Context, projectId ProjectId, params *ListProjectExportsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListProjectExportsRequest(c.Server, projectId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateProjectExportWithBody(ctx context.Context, projectId ProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateProjectExportRequestWithBody(c.Server, projectId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateProjectExport(ctx context.Context, projectId ProjectId, body CreateProjectExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateProjectExportRequest(c.Server, projectId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListProjectIngresses(ctx context.Context, projectId ProjectId, params *ListProjectIngressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListProjectIngressesRequest(c.Server, projectId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetIngress(ctx context.Context, projectId ProjectId, ingressId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetIngressRequest(c.Server, projectId, ingressId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListProjectSessions(ctx context.Context, projectId ProjectId, params *ListProjectSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListProjectSessionsRequest(c.Server, projectId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSession(ctx context.Context, projectId ProjectId, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSessionRequest(c.Server, projectId, sessionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListProjectSipCalls(ctx context.Context, projectId ProjectId, params *ListProjectSipCallsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListProjectSipCallsRequest(c.Server, projectId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSipCall(ctx context.Context, projectId ProjectId, callId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSipCallRequest(c.Server, projectId, callId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListSipCallEvents(ctx context.Context, projectId ProjectId, callId string, params *ListSipCallEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSipCallEventsRequest(c.Server, projectId, callId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) QueryProjectTimeseries(ctx context.Context, projectId ProjectId, params *QueryProjectTimeseriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewQueryProjectTimeseriesRequest(c.Server, projectId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetProjectUsage(ctx context.Context, projectId ProjectId, params *GetProjectUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetProjectUsageRequest(c.Server, projectId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListProjects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListProjectsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateProject(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateProjectRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteProjectRequest(c.Server, projectId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetProjectRequest(c.Server, projectId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateProjectRequest(c.Server, projectId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListUsers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListUsersRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrentUserRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetUser(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetUserRequest(c.Server, userId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListWorkspaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListWorkspacesRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetWorkspace(ctx context.Context, workspaceId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetWorkspaceRequest(c.Server, workspaceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewDeleteExportRequest generates requests for DeleteExport +func NewDeleteExportRequest(server string, exportId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "exportId", exportId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/exports/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetExportRequest generates requests for GetExport +func NewGetExportRequest(server string, exportId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "exportId", exportId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/exports/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListProjectEgressesRequest generates requests for ListProjectEgresses +func NewListProjectEgressesRequest(server string, projectId ProjectId, params *ListProjectEgressesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/egresses", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Tag != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tag", *params.Tag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.ExcludeTag != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeTag", *params.ExcludeTag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEgressRequest generates requests for GetEgress +func NewGetEgressRequest(server string, projectId ProjectId, egressId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "egressId", egressId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/egresses/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListProjectExportsRequest generates requests for ListProjectExports +func NewListProjectExportsRequest(server string, projectId ProjectId, params *ListProjectExportsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/exports", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateProjectExportRequest calls the generic CreateProjectExport builder with application/json body +func NewCreateProjectExportRequest(server string, projectId ProjectId, body CreateProjectExportJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateProjectExportRequestWithBody(server, projectId, "application/json", bodyReader) +} + +// NewCreateProjectExportRequestWithBody generates requests for CreateProjectExport with any type of body +func NewCreateProjectExportRequestWithBody(server string, projectId ProjectId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/exports", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListProjectIngressesRequest generates requests for ListProjectIngresses +func NewListProjectIngressesRequest(server string, projectId ProjectId, params *ListProjectIngressesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/ingresses", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Tag != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tag", *params.Tag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.ExcludeTag != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeTag", *params.ExcludeTag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetIngressRequest generates requests for GetIngress +func NewGetIngressRequest(server string, projectId ProjectId, ingressId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "ingressId", ingressId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/ingresses/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListProjectSessionsRequest generates requests for ListProjectSessions +func NewListProjectSessionsRequest(server string, projectId ProjectId, params *ListProjectSessionsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/sessions", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sort", *params.Sort, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.RoomName != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "roomName", *params.RoomName, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.RoomId != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "roomId", *params.RoomId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Feature != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "feature", *params.Feature, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.ExcludeFeature != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeFeature", *params.ExcludeFeature, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Tag != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tag", *params.Tag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.ExcludeTag != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeTag", *params.ExcludeTag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetSessionRequest generates requests for GetSession +func NewGetSessionRequest(server string, projectId ProjectId, sessionId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "sessionId", sessionId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/sessions/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListProjectSipCallsRequest generates requests for ListProjectSipCalls +func NewListProjectSipCallsRequest(server string, projectId ProjectId, params *ListProjectSipCallsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/sip-calls", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Direction != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "direction", *params.Direction, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.RoomName != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "roomName", *params.RoomName, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Tag != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tag", *params.Tag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.ExcludeTag != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeTag", *params.ExcludeTag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetSipCallRequest generates requests for GetSipCall +func NewGetSipCallRequest(server string, projectId ProjectId, callId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "callId", callId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/sip-calls/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListSipCallEventsRequest generates requests for ListSipCallEvents +func NewListSipCallEventsRequest(server string, projectId ProjectId, callId string, params *ListSipCallEventsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "callId", callId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/sip-calls/%s/events", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EventType != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "eventType", *params.EventType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewQueryProjectTimeseriesRequest generates requests for QueryProjectTimeseries +func NewQueryProjectTimeseriesRequest(server string, projectId ProjectId, params *QueryProjectTimeseriesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/timeseries", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Metric != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "metric", params.Metric, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Interval != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "interval", *params.Interval, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.GroupBy != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "groupBy", *params.GroupBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.SessionId != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sessionId", *params.SessionId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetProjectUsageRequest generates requests for GetProjectUsage +func NewGetProjectUsageRequest(server string, projectId ProjectId, params *GetProjectUsageParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/analytics/projects/%s/usage", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListProjectsRequest generates requests for ListProjects +func NewListProjectsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/projects") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateProjectRequest generates requests for CreateProject +func NewCreateProjectRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/projects") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteProjectRequest generates requests for DeleteProject +func NewDeleteProjectRequest(server string, projectId ProjectId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/projects/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetProjectRequest generates requests for GetProject +func NewGetProjectRequest(server string, projectId ProjectId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/projects/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateProjectRequest generates requests for UpdateProject +func NewUpdateProjectRequest(server string, projectId ProjectId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/projects/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListUsersRequest generates requests for ListUsers +func NewListUsersRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/users") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCurrentUserRequest generates requests for GetCurrentUser +func NewGetCurrentUserRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/users/me") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetUserRequest generates requests for GetUser +func NewGetUserRequest(server string, userId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListWorkspacesRequest generates requests for ListWorkspaces +func NewListWorkspacesRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/workspaces") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetWorkspaceRequest generates requests for GetWorkspace +func NewGetWorkspaceRequest(server string, workspaceId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "workspaceId", workspaceId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/workspaces/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // DeleteExportWithResponse request + DeleteExportWithResponse(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*DeleteExportResponse, error) + + // GetExportWithResponse request + GetExportWithResponse(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*GetExportResponse, error) + + // ListProjectEgressesWithResponse request + ListProjectEgressesWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectEgressesParams, reqEditors ...RequestEditorFn) (*ListProjectEgressesResponse, error) + + // GetEgressWithResponse request + GetEgressWithResponse(ctx context.Context, projectId ProjectId, egressId string, reqEditors ...RequestEditorFn) (*GetEgressResponse, error) + + // ListProjectExportsWithResponse request + ListProjectExportsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectExportsParams, reqEditors ...RequestEditorFn) (*ListProjectExportsResponse, error) + + // CreateProjectExportWithBodyWithResponse request with any body + CreateProjectExportWithBodyWithResponse(ctx context.Context, projectId ProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectExportResponse, error) + + CreateProjectExportWithResponse(ctx context.Context, projectId ProjectId, body CreateProjectExportJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectExportResponse, error) + + // ListProjectIngressesWithResponse request + ListProjectIngressesWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectIngressesParams, reqEditors ...RequestEditorFn) (*ListProjectIngressesResponse, error) + + // GetIngressWithResponse request + GetIngressWithResponse(ctx context.Context, projectId ProjectId, ingressId string, reqEditors ...RequestEditorFn) (*GetIngressResponse, error) + + // ListProjectSessionsWithResponse request + ListProjectSessionsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectSessionsParams, reqEditors ...RequestEditorFn) (*ListProjectSessionsResponse, error) + + // GetSessionWithResponse request + GetSessionWithResponse(ctx context.Context, projectId ProjectId, sessionId string, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) + + // ListProjectSipCallsWithResponse request + ListProjectSipCallsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectSipCallsParams, reqEditors ...RequestEditorFn) (*ListProjectSipCallsResponse, error) + + // GetSipCallWithResponse request + GetSipCallWithResponse(ctx context.Context, projectId ProjectId, callId string, reqEditors ...RequestEditorFn) (*GetSipCallResponse, error) + + // ListSipCallEventsWithResponse request + ListSipCallEventsWithResponse(ctx context.Context, projectId ProjectId, callId string, params *ListSipCallEventsParams, reqEditors ...RequestEditorFn) (*ListSipCallEventsResponse, error) + + // QueryProjectTimeseriesWithResponse request + QueryProjectTimeseriesWithResponse(ctx context.Context, projectId ProjectId, params *QueryProjectTimeseriesParams, reqEditors ...RequestEditorFn) (*QueryProjectTimeseriesResponse, error) + + // GetProjectUsageWithResponse request + GetProjectUsageWithResponse(ctx context.Context, projectId ProjectId, params *GetProjectUsageParams, reqEditors ...RequestEditorFn) (*GetProjectUsageResponse, error) + + // ListProjectsWithResponse request + ListProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListProjectsResponse, error) + + // CreateProjectWithResponse request + CreateProjectWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) + + // DeleteProjectWithResponse request + DeleteProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*DeleteProjectResponse, error) + + // GetProjectWithResponse request + GetProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*GetProjectResponse, error) + + // UpdateProjectWithResponse request + UpdateProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*UpdateProjectResponse, error) + + // ListUsersWithResponse request + ListUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) + + // GetCurrentUserWithResponse request + GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) + + // GetUserWithResponse request + GetUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserResponse, error) + + // ListWorkspacesWithResponse request + ListWorkspacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListWorkspacesResponse, error) + + // GetWorkspaceWithResponse request + GetWorkspaceWithResponse(ctx context.Context, workspaceId string, reqEditors ...RequestEditorFn) (*GetWorkspaceResponse, error) +} + +type DeleteExportResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *Unauthorized + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r DeleteExportResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteExportResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteExportResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetExportResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Export + JSON401 *Unauthorized + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r GetExportResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetExportResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetExportResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type ListProjectEgressesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EgressList + JSON400 *BadRequest + JSON401 *Unauthorized + JSON403 *Forbidden + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r ListProjectEgressesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListProjectEgressesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProjectEgressesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetEgressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EgressDetail + JSON401 *Unauthorized + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r GetEgressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEgressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetEgressResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type ListProjectExportsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ExportList + JSON400 *BadRequest + JSON401 *Unauthorized + JSON403 *Forbidden + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r ListProjectExportsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListProjectExportsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProjectExportsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type CreateProjectExportResponse struct { + Body []byte + HTTPResponse *http.Response + JSON202 *Export + JSON400 *BadRequest + JSON401 *Unauthorized + JSON403 *Forbidden + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r CreateProjectExportResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateProjectExportResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateProjectExportResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type ListProjectIngressesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IngressList + JSON400 *BadRequest + JSON401 *Unauthorized + JSON403 *Forbidden + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r ListProjectIngressesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListProjectIngressesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProjectIngressesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetIngressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IngressDetail + JSON401 *Unauthorized + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r GetIngressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetIngressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetIngressResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type ListProjectSessionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SessionList + JSON400 *BadRequest + JSON401 *Unauthorized + JSON403 *Forbidden + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r ListProjectSessionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListProjectSessionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProjectSessionsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetSessionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SessionDetail + JSON401 *Unauthorized + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r GetSessionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSessionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetSessionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type ListProjectSipCallsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SipCallList + JSON400 *BadRequest + JSON401 *Unauthorized + JSON403 *Forbidden + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r ListProjectSipCallsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListProjectSipCallsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProjectSipCallsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetSipCallResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SipCallDetail + JSON401 *Unauthorized + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r GetSipCallResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSipCallResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetSipCallResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type ListSipCallEventsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SipEventList + JSON400 *BadRequest + JSON401 *Unauthorized + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r ListSipCallEventsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSipCallEventsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListSipCallEventsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type QueryProjectTimeseriesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TimeseriesResponse + JSON400 *BadRequest + JSON401 *Unauthorized + JSON403 *Forbidden + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r QueryProjectTimeseriesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r QueryProjectTimeseriesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r QueryProjectTimeseriesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetProjectUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageResponse + JSON400 *BadRequest + JSON401 *Unauthorized + JSON403 *Forbidden + JSON429 *TooManyRequests +} + +// Status returns HTTPResponse.Status +func (r GetProjectUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetProjectUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetProjectUsageResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type ListProjectsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r ListProjectsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListProjectsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProjectsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type CreateProjectResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r CreateProjectResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateProjectResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateProjectResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type DeleteProjectResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r DeleteProjectResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteProjectResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteProjectResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetProjectResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r GetProjectResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetProjectResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetProjectResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type UpdateProjectResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r UpdateProjectResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateProjectResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateProjectResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type ListUsersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r ListUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListUsersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetCurrentUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r GetCurrentUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCurrentUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetCurrentUserResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r GetUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetUserResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type ListWorkspacesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r ListWorkspacesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListWorkspacesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListWorkspacesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetWorkspaceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON501 *NotImplemented +} + +// Status returns HTTPResponse.Status +func (r GetWorkspaceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetWorkspaceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetWorkspaceResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +// DeleteExportWithResponse request returning *DeleteExportResponse +func (c *ClientWithResponses) DeleteExportWithResponse(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*DeleteExportResponse, error) { + rsp, err := c.DeleteExport(ctx, exportId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteExportResponse(rsp) +} + +// GetExportWithResponse request returning *GetExportResponse +func (c *ClientWithResponses) GetExportWithResponse(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*GetExportResponse, error) { + rsp, err := c.GetExport(ctx, exportId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetExportResponse(rsp) +} + +// ListProjectEgressesWithResponse request returning *ListProjectEgressesResponse +func (c *ClientWithResponses) ListProjectEgressesWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectEgressesParams, reqEditors ...RequestEditorFn) (*ListProjectEgressesResponse, error) { + rsp, err := c.ListProjectEgresses(ctx, projectId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListProjectEgressesResponse(rsp) +} + +// GetEgressWithResponse request returning *GetEgressResponse +func (c *ClientWithResponses) GetEgressWithResponse(ctx context.Context, projectId ProjectId, egressId string, reqEditors ...RequestEditorFn) (*GetEgressResponse, error) { + rsp, err := c.GetEgress(ctx, projectId, egressId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEgressResponse(rsp) +} + +// ListProjectExportsWithResponse request returning *ListProjectExportsResponse +func (c *ClientWithResponses) ListProjectExportsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectExportsParams, reqEditors ...RequestEditorFn) (*ListProjectExportsResponse, error) { + rsp, err := c.ListProjectExports(ctx, projectId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListProjectExportsResponse(rsp) +} + +// CreateProjectExportWithBodyWithResponse request with arbitrary body returning *CreateProjectExportResponse +func (c *ClientWithResponses) CreateProjectExportWithBodyWithResponse(ctx context.Context, projectId ProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectExportResponse, error) { + rsp, err := c.CreateProjectExportWithBody(ctx, projectId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateProjectExportResponse(rsp) +} + +func (c *ClientWithResponses) CreateProjectExportWithResponse(ctx context.Context, projectId ProjectId, body CreateProjectExportJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectExportResponse, error) { + rsp, err := c.CreateProjectExport(ctx, projectId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateProjectExportResponse(rsp) +} + +// ListProjectIngressesWithResponse request returning *ListProjectIngressesResponse +func (c *ClientWithResponses) ListProjectIngressesWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectIngressesParams, reqEditors ...RequestEditorFn) (*ListProjectIngressesResponse, error) { + rsp, err := c.ListProjectIngresses(ctx, projectId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListProjectIngressesResponse(rsp) +} + +// GetIngressWithResponse request returning *GetIngressResponse +func (c *ClientWithResponses) GetIngressWithResponse(ctx context.Context, projectId ProjectId, ingressId string, reqEditors ...RequestEditorFn) (*GetIngressResponse, error) { + rsp, err := c.GetIngress(ctx, projectId, ingressId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetIngressResponse(rsp) +} + +// ListProjectSessionsWithResponse request returning *ListProjectSessionsResponse +func (c *ClientWithResponses) ListProjectSessionsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectSessionsParams, reqEditors ...RequestEditorFn) (*ListProjectSessionsResponse, error) { + rsp, err := c.ListProjectSessions(ctx, projectId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListProjectSessionsResponse(rsp) +} + +// GetSessionWithResponse request returning *GetSessionResponse +func (c *ClientWithResponses) GetSessionWithResponse(ctx context.Context, projectId ProjectId, sessionId string, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) { + rsp, err := c.GetSession(ctx, projectId, sessionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSessionResponse(rsp) +} + +// ListProjectSipCallsWithResponse request returning *ListProjectSipCallsResponse +func (c *ClientWithResponses) ListProjectSipCallsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectSipCallsParams, reqEditors ...RequestEditorFn) (*ListProjectSipCallsResponse, error) { + rsp, err := c.ListProjectSipCalls(ctx, projectId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListProjectSipCallsResponse(rsp) +} + +// GetSipCallWithResponse request returning *GetSipCallResponse +func (c *ClientWithResponses) GetSipCallWithResponse(ctx context.Context, projectId ProjectId, callId string, reqEditors ...RequestEditorFn) (*GetSipCallResponse, error) { + rsp, err := c.GetSipCall(ctx, projectId, callId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSipCallResponse(rsp) +} + +// ListSipCallEventsWithResponse request returning *ListSipCallEventsResponse +func (c *ClientWithResponses) ListSipCallEventsWithResponse(ctx context.Context, projectId ProjectId, callId string, params *ListSipCallEventsParams, reqEditors ...RequestEditorFn) (*ListSipCallEventsResponse, error) { + rsp, err := c.ListSipCallEvents(ctx, projectId, callId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListSipCallEventsResponse(rsp) +} + +// QueryProjectTimeseriesWithResponse request returning *QueryProjectTimeseriesResponse +func (c *ClientWithResponses) QueryProjectTimeseriesWithResponse(ctx context.Context, projectId ProjectId, params *QueryProjectTimeseriesParams, reqEditors ...RequestEditorFn) (*QueryProjectTimeseriesResponse, error) { + rsp, err := c.QueryProjectTimeseries(ctx, projectId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseQueryProjectTimeseriesResponse(rsp) +} + +// GetProjectUsageWithResponse request returning *GetProjectUsageResponse +func (c *ClientWithResponses) GetProjectUsageWithResponse(ctx context.Context, projectId ProjectId, params *GetProjectUsageParams, reqEditors ...RequestEditorFn) (*GetProjectUsageResponse, error) { + rsp, err := c.GetProjectUsage(ctx, projectId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetProjectUsageResponse(rsp) +} + +// ListProjectsWithResponse request returning *ListProjectsResponse +func (c *ClientWithResponses) ListProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListProjectsResponse, error) { + rsp, err := c.ListProjects(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseListProjectsResponse(rsp) +} + +// CreateProjectWithResponse request returning *CreateProjectResponse +func (c *ClientWithResponses) CreateProjectWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { + rsp, err := c.CreateProject(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateProjectResponse(rsp) +} + +// DeleteProjectWithResponse request returning *DeleteProjectResponse +func (c *ClientWithResponses) DeleteProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*DeleteProjectResponse, error) { + rsp, err := c.DeleteProject(ctx, projectId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteProjectResponse(rsp) +} + +// GetProjectWithResponse request returning *GetProjectResponse +func (c *ClientWithResponses) GetProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*GetProjectResponse, error) { + rsp, err := c.GetProject(ctx, projectId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetProjectResponse(rsp) +} + +// UpdateProjectWithResponse request returning *UpdateProjectResponse +func (c *ClientWithResponses) UpdateProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*UpdateProjectResponse, error) { + rsp, err := c.UpdateProject(ctx, projectId, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateProjectResponse(rsp) +} + +// ListUsersWithResponse request returning *ListUsersResponse +func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) { + rsp, err := c.ListUsers(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseListUsersResponse(rsp) +} + +// GetCurrentUserWithResponse request returning *GetCurrentUserResponse +func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { + rsp, err := c.GetCurrentUser(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrentUserResponse(rsp) +} + +// GetUserWithResponse request returning *GetUserResponse +func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserResponse, error) { + rsp, err := c.GetUser(ctx, userId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetUserResponse(rsp) +} + +// ListWorkspacesWithResponse request returning *ListWorkspacesResponse +func (c *ClientWithResponses) ListWorkspacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListWorkspacesResponse, error) { + rsp, err := c.ListWorkspaces(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseListWorkspacesResponse(rsp) +} + +// GetWorkspaceWithResponse request returning *GetWorkspaceResponse +func (c *ClientWithResponses) GetWorkspaceWithResponse(ctx context.Context, workspaceId string, reqEditors ...RequestEditorFn) (*GetWorkspaceResponse, error) { + rsp, err := c.GetWorkspace(ctx, workspaceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetWorkspaceResponse(rsp) +} + +// ParseDeleteExportResponse parses an HTTP response from a DeleteExportWithResponse call +func ParseDeleteExportResponse(rsp *http.Response) (*DeleteExportResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteExportResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetExportResponse parses an HTTP response from a GetExportWithResponse call +func ParseGetExportResponse(rsp *http.Response) (*GetExportResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetExportResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Export + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseListProjectEgressesResponse parses an HTTP response from a ListProjectEgressesWithResponse call +func ParseListProjectEgressesResponse(rsp *http.Response) (*ListProjectEgressesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListProjectEgressesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EgressList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetEgressResponse parses an HTTP response from a GetEgressWithResponse call +func ParseGetEgressResponse(rsp *http.Response) (*GetEgressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEgressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EgressDetail + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseListProjectExportsResponse parses an HTTP response from a ListProjectExportsWithResponse call +func ParseListProjectExportsResponse(rsp *http.Response) (*ListProjectExportsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListProjectExportsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ExportList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseCreateProjectExportResponse parses an HTTP response from a CreateProjectExportWithResponse call +func ParseCreateProjectExportResponse(rsp *http.Response) (*CreateProjectExportResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateProjectExportResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest Export + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON202 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseListProjectIngressesResponse parses an HTTP response from a ListProjectIngressesWithResponse call +func ParseListProjectIngressesResponse(rsp *http.Response) (*ListProjectIngressesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListProjectIngressesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest IngressList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetIngressResponse parses an HTTP response from a GetIngressWithResponse call +func ParseGetIngressResponse(rsp *http.Response) (*GetIngressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetIngressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest IngressDetail + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseListProjectSessionsResponse parses an HTTP response from a ListProjectSessionsWithResponse call +func ParseListProjectSessionsResponse(rsp *http.Response) (*ListProjectSessionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListProjectSessionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SessionList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetSessionResponse parses an HTTP response from a GetSessionWithResponse call +func ParseGetSessionResponse(rsp *http.Response) (*GetSessionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSessionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SessionDetail + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseListProjectSipCallsResponse parses an HTTP response from a ListProjectSipCallsWithResponse call +func ParseListProjectSipCallsResponse(rsp *http.Response) (*ListProjectSipCallsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListProjectSipCallsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SipCallList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetSipCallResponse parses an HTTP response from a GetSipCallWithResponse call +func ParseGetSipCallResponse(rsp *http.Response) (*GetSipCallResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSipCallResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SipCallDetail + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseListSipCallEventsResponse parses an HTTP response from a ListSipCallEventsWithResponse call +func ParseListSipCallEventsResponse(rsp *http.Response) (*ListSipCallEventsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListSipCallEventsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SipEventList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseQueryProjectTimeseriesResponse parses an HTTP response from a QueryProjectTimeseriesWithResponse call +func ParseQueryProjectTimeseriesResponse(rsp *http.Response) (*QueryProjectTimeseriesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &QueryProjectTimeseriesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TimeseriesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetProjectUsageResponse parses an HTTP response from a GetProjectUsageWithResponse call +func ParseGetProjectUsageResponse(rsp *http.Response) (*GetProjectUsageResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetProjectUsageResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UsageResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseListProjectsResponse parses an HTTP response from a ListProjectsWithResponse call +func ParseListProjectsResponse(rsp *http.Response) (*ListProjectsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListProjectsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} + +// ParseCreateProjectResponse parses an HTTP response from a CreateProjectWithResponse call +func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateProjectResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} + +// ParseDeleteProjectResponse parses an HTTP response from a DeleteProjectWithResponse call +func ParseDeleteProjectResponse(rsp *http.Response) (*DeleteProjectResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteProjectResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} + +// ParseGetProjectResponse parses an HTTP response from a GetProjectWithResponse call +func ParseGetProjectResponse(rsp *http.Response) (*GetProjectResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetProjectResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} + +// ParseUpdateProjectResponse parses an HTTP response from a UpdateProjectWithResponse call +func ParseUpdateProjectResponse(rsp *http.Response) (*UpdateProjectResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateProjectResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} + +// ParseListUsersResponse parses an HTTP response from a ListUsersWithResponse call +func ParseListUsersResponse(rsp *http.Response) (*ListUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} + +// ParseGetCurrentUserResponse parses an HTTP response from a GetCurrentUserWithResponse call +func ParseGetCurrentUserResponse(rsp *http.Response) (*GetCurrentUserResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCurrentUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} + +// ParseGetUserResponse parses an HTTP response from a GetUserWithResponse call +func ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} + +// ParseListWorkspacesResponse parses an HTTP response from a ListWorkspacesWithResponse call +func ParseListWorkspacesResponse(rsp *http.Response) (*ListWorkspacesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListWorkspacesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} + +// ParseGetWorkspaceResponse parses an HTTP response from a GetWorkspaceWithResponse call +func ParseGetWorkspaceResponse(rsp *http.Response) (*GetWorkspaceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetWorkspaceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: + var dest NotImplemented + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON501 = &dest + + } + + return response, nil +} From 7269c3f66ae8b593048e03ed3225d65b32e4439a Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Wed, 29 Jul 2026 15:20:30 -0600 Subject: [PATCH 2/4] feat(auth): implement session-based auth flow --- cmd/lk/cloud.go | 224 ++++++++++++++++++++++++++++++++++++-- pkg/config/config.go | 25 +++++ pkg/config/config_test.go | 30 +++++ 3 files changed, 272 insertions(+), 7 deletions(-) diff --git a/cmd/lk/cloud.go b/cmd/lk/cloud.go index afd42adc7..d42bdcaf4 100644 --- a/cmd/lk/cloud.go +++ b/cmd/lk/cloud.go @@ -43,11 +43,30 @@ type ClaimAccessKeyResponse struct { URL string } +type ClaimCliSessionResponse struct { + Session struct { + Id string `json:"id"` + SessionToken string `json:"session_token"` + UserId string `json:"user_id"` + Expires int64 `json:"expires"` + DeviceName string `json:"device_name"` + IsRestricted bool `json:"is_restricted"` + } + User struct { + Id string `json:"id"` + Email string `json:"email"` + Name string `json:"name"` + CreatedAt int64 `json:"created_at"` + } +} + const ( - createTokenEndpoint = "/cli/auth" - claimKeyEndpoint = "/cli/claim" - confirmAuthEndpoint = "/cli/confirm-auth" - revokeKeyEndpoint = "/cli/revoke" + createTokenEndpoint = "/cli/auth" + claimKeyEndpoint = "/cli/claim" + claimSessionEndpoint = "/cli/claim-session" + confirmUserAuthEndpoint = "/cli/claim" + confirmAuthEndpoint = "/cli/confirm-auth" + revokeKeyEndpoint = "/cli/revoke" ) var ( @@ -173,6 +192,50 @@ func (a *AuthClient) ClaimCliKey(ctx context.Context) (*ClaimAccessKeyResponse, return ak, nil } +// ClaimCliSession polls the session claim endpoint for the experimental +// user-based auth flow. It mirrors ClaimCliKey: 401 means "not yet approved" +// (returns nil, nil so the caller keeps polling), 404 means access was denied, +// and 200 returns the claimed session. +func (a *AuthClient) ClaimCliSession(ctx context.Context) (*ClaimCliSessionResponse, error) { + if a.verificationToken.Token == "" || time.Now().Unix() > a.verificationToken.Expires { + return nil, errors.New("session expired") + } + + reqURL, err := url.Parse(a.baseURL + claimSessionEndpoint) + if err != nil { + return nil, err + } + + params := url.Values{} + params.Add("t", a.verificationToken.Token) + reqURL.RawQuery = params.Encode() + + req, err := http.NewRequestWithContext(ctx, "POST", reqURL.String(), nil) + if err != nil { + return nil, err + } + resp, err := a.client.Do(req) + if resp != nil && resp.StatusCode == http.StatusNotFound { + return nil, errors.New("access denied") + } + if err != nil { + return nil, err + } + defer resp.Body.Close() + + if resp.StatusCode == http.StatusUnauthorized { + // Not yet approved + return nil, nil + } + + session := &ClaimCliSessionResponse{} + if err := json.NewDecoder(resp.Body).Decode(session); err != nil { + return nil, err + } + + return session, nil +} + func (a *AuthClient) Deauthenticate(ctx context.Context, projectName, token string) error { reqURL, err := url.Parse(a.baseURL + revokeKeyEndpoint) if err != nil { @@ -210,6 +273,9 @@ func initAuth(ctx context.Context, cmd *cli.Command) (context.Context, error) { func handleAuth(ctx context.Context, cmd *cli.Command) error { if revoke { + if experimentalAuthEnabled(cmd) { + return errors.New("revoking a user session is not yet supported under --experimental-auth") + } if _, err := loadProjectConfig(ctx, cmd); err != nil { return err } @@ -219,6 +285,9 @@ func handleAuth(ctx context.Context, cmd *cli.Command) error { } return authClient.Deauthenticate(ctx, project.Name, token) } + if experimentalAuthEnabled(cmd) { + return tryUserAuthIfNeeded(ctx, cmd) + } return tryAuthIfNeeded(ctx, cmd) } @@ -279,7 +348,7 @@ func tryAuthIfNeeded(ctx context.Context, cmd *cli.Command) error { return err } - authURL, err := generateConfirmURL(token.Token) + authURL, err := generateConfirmURL(confirmAuthEndpoint, token.Token) if err != nil { return err } @@ -362,8 +431,8 @@ func tryAuthIfNeeded(ctx context.Context, cmd *cli.Command) error { return err } -func generateConfirmURL(token string) (*url.URL, error) { - base, err := url.Parse(dashboardURL + confirmAuthEndpoint) +func generateConfirmURL(endpoint, token string) (*url.URL, error) { + base, err := url.Parse(dashboardURL + endpoint) if err != nil { return nil, err } @@ -402,3 +471,144 @@ func pollClaim(ctx context.Context, _ *cli.Command) (*ClaimAccessKeyResponse, er return accessKey, nil } } + +// tryUserAuthIfNeeded runs the experimental user-based auth flow: it requests a +// verification token (shared with the API-key flow), opens the browser to the +// user-auth confirm page, polls the session claim endpoint, and persists the +// resulting session as a config.UserConfig. It mirrors tryAuthIfNeeded. +func tryUserAuthIfNeeded(ctx context.Context, cmd *cli.Command) error { + if _, err := loadProjectConfig(ctx, cmd); err != nil { + return err + } + + if SkipPrompts(cmd) { + return errors.New("run `lk cloud auth --experimental-auth` in an interactive terminal to sign in") + } + + // get device name + if err := huh.NewForm(huh.NewGroup(huh.NewInput(). + Title("What is the name of this device?"). + Prompt(""). + Value(&cliConfig.DeviceName). + WithTheme(util.Theme))). + Run(); err != nil { + return err + } + + // remember device name for next time + if err := cliConfig.PersistIfNeeded(); err != nil { + return err + } + out.Statusf("Device [%s]", util.Accented(cliConfig.DeviceName)) + + // request token (shared with the API-key flow) + out.Status("Requesting verification token...") + token, err := authClient.GetVerificationToken(cliConfig.DeviceName) + if err != nil { + return err + } + + authURL, err := generateConfirmURL(confirmUserAuthEndpoint, token.Token) + if err != nil { + return err + } + + // poll for the session + out.Statusf("Please confirm access by visiting:\n\n %s\n", authURL.String()) + _ = browser.OpenURL(authURL.String()) // discard result; this will fail in headless environments + + var session *ClaimCliSessionResponse + err = out.Await( + "Awaiting confirmation...", + ctx, + func(ctx context.Context) error { + var pollErr error + session, pollErr = pollSessionClaim(ctx) + return pollErr + }, + ) + if err != nil { + return err + } + + if session == nil { + return errors.New("operation cancelled") + } + + user := config.UserConfig{ + Id: session.User.Id, + Name: session.User.Name, + Email: session.User.Email, + SessionToken: session.Session.SessionToken, + SessionExpiry: session.Session.Expires, + } + + label := user.Email + if label == "" { + label = user.Id + } + out.Statusf("Authenticated as %s", util.Accented(label)) + + // key used to reference this user as the default (id preferred, email fallback) + userKey := user.Id + if userKey == "" { + userKey = user.Email + } + + // Store the session. Re-authenticating as the same person (matched by id or + // email) replaces the existing entry wholesale rather than adding a duplicate. + wasFirstUser := len(cliConfig.Users) == 0 + if _, replaced := cliConfig.UpsertUser(user); !replaced { + // New user: the first one becomes the default automatically; otherwise + // ask whether to make it the default. + isDefault := wasFirstUser + if !isDefault { + if err := huh.NewForm(huh.NewGroup(util.Confirm(). + Title("Make this the default user?"). + Value(&isDefault). + WithTheme(util.Theme))). + Run(); err != nil { + return err + } + } + if isDefault { + cliConfig.DefaultUser = userKey + } + } + + // ensure a default is always set + if cliConfig.DefaultUser == "" { + cliConfig.DefaultUser = userKey + } + + return cliConfig.PersistIfNeeded() +} + +func pollSessionClaim(ctx context.Context) (*ClaimCliSessionResponse, error) { + claim := make(chan *ClaimCliSessionResponse) + cancel := make(chan error) + + // every seconds, poll + go func() { + for { + time.Sleep(time.Duration(interval) * time.Second) + session, err := authClient.ClaimCliSession(ctx) + if err != nil { + cancel <- err + return + } + if session != nil { + claim <- session + } + } + }() + + select { + case <-time.After(time.Duration(timeout) * time.Second): + return nil, errors.New("session claim timed out") + case err := <-cancel: + return nil, err + case session := <-claim: + return session, nil + } +} diff --git a/pkg/config/config.go b/pkg/config/config.go index 2182e3b73..254759359 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -93,6 +93,31 @@ func (c *CLIConfig) GetUser(idOrEmail string) *UserConfig { return nil } +// UpsertUser stores u in the config. If a user matching the same person — by +// non-empty Id or (case-insensitively) email — already exists, that entry is +// replaced outright rather than a duplicate being inserted; otherwise u is +// appended. It returns the stored user and whether an existing entry was +// replaced. +func (c *CLIConfig) UpsertUser(u UserConfig) (stored *UserConfig, replaced bool) { + for i := range c.Users { + if sameUser(c.Users[i], u) { + c.Users[i] = u + return &c.Users[i], true + } + } + c.Users = append(c.Users, u) + return &c.Users[len(c.Users)-1], false +} + +// sameUser reports whether two entries refer to the same person, matching by +// non-empty Id or case-insensitive email. +func sameUser(a, b UserConfig) bool { + if a.Id != "" && a.Id == b.Id { + return true + } + return a.Email != "" && strings.EqualFold(a.Email, b.Email) +} + // LoadDefaultUser returns the configured default user. It mirrors // LoadDefaultProject and is used by user-based (experimental) auth. func LoadDefaultUser() (*UserConfig, error) { diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 45e4ef4c4..4b035d319 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -61,3 +61,33 @@ func TestCLIConfigGetUser(t *testing.T) { assert.Len(t, c.Users[0].Projects, 1) assert.Equal(t, "p_abc", c.Users[0].Projects[0].ProjectId) } + +func TestCLIConfigUpsertUser(t *testing.T) { + c := &CLIConfig{ + Users: []UserConfig{ + {Id: "usr_1", Email: "alice@livekit.io", Name: "Alice", SessionToken: "old"}, + }, + } + + // Re-auth as the same person by Id replaces wholesale (new token, and stale + // fields like a cached project list are dropped, not merged). + c.Users[0].Projects = []UserProjectConfig{{ProjectId: "p_stale"}} + stored, replaced := c.UpsertUser(UserConfig{Id: "usr_1", Email: "alice@livekit.io", Name: "Alice A.", SessionToken: "new"}) + assert.True(t, replaced) + assert.Len(t, c.Users, 1, "must not duplicate") + assert.Equal(t, "new", stored.SessionToken) + assert.Equal(t, "Alice A.", c.Users[0].Name) + assert.Empty(t, c.Users[0].Projects, "replace is wholesale, not a merge") + + // Match by email (case-insensitive) even when the Id differs. + _, replaced = c.UpsertUser(UserConfig{Id: "usr_1_new", Email: "ALICE@livekit.io", SessionToken: "newer"}) + assert.True(t, replaced) + assert.Len(t, c.Users, 1) + assert.Equal(t, "usr_1_new", c.Users[0].Id) + assert.Equal(t, "newer", c.Users[0].SessionToken) + + // A genuinely new user is appended. + _, replaced = c.UpsertUser(UserConfig{Id: "usr_2", Email: "bob@livekit.io"}) + assert.False(t, replaced) + assert.Len(t, c.Users, 2) +} From eec80895c96d92a3ad4f595ab87fbe0a37518a9a Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Tue, 11 Aug 2026 10:52:40 -0600 Subject: [PATCH 3/4] POPME --- go.mod | 26 +++++++++++--------------- go.sum | 57 +++++++++++++++++++++++---------------------------------- 2 files changed, 34 insertions(+), 49 deletions(-) diff --git a/go.mod b/go.mod index ca7cba8a6..291becec3 100644 --- a/go.mod +++ b/go.mod @@ -16,12 +16,12 @@ require ( github.com/fsnotify/fsnotify v1.10.1 github.com/go-logr/logr v1.4.3 github.com/go-task/task/v3 v3.51.1 - github.com/google/go-containerregistry v0.20.7 + github.com/google/go-containerregistry v0.21.7 github.com/google/go-querystring v1.2.0 github.com/joho/godotenv v1.5.1 github.com/klauspost/compress v1.18.6 - github.com/livekit/protocol v1.49.0 - github.com/livekit/server-sdk-go/v2 v2.16.8-0.20260702164219-6126610d4e22 + github.com/livekit/protocol v1.49.1-0.20260712215709-8847d7456816 + github.com/livekit/server-sdk-go/v2 v2.18.1 github.com/mattn/go-isatty v0.0.22 github.com/moby/moby/client v0.4.1 github.com/moby/patternmatcher v0.6.1 @@ -30,7 +30,7 @@ require ( github.com/pelletier/go-toml v1.9.5 github.com/pion/rtcp v1.2.16 github.com/pion/rtp v1.10.2 - github.com/pion/webrtc/v4 v4.2.14 + github.com/pion/webrtc/v4 v4.2.15 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c github.com/stretchr/testify v1.11.1 github.com/twitchtv/twirp v8.1.3+incompatible @@ -104,22 +104,19 @@ require ( github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect github.com/containerd/console v1.0.5 // indirect github.com/containerd/containerd/api v1.10.0 // indirect - github.com/containerd/containerd/v2 v2.2.4 // indirect + github.com/containerd/containerd/v2 v2.2.5 // indirect github.com/containerd/continuity v0.4.5 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v1.0.0-rc.2 // indirect - github.com/containerd/stargz-snapshotter/estargz v0.18.2 // indirect github.com/containerd/ttrpc v1.2.8 // indirect github.com/containerd/typeurl/v2 v2.2.3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/iters v1.2.2 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/dlclark/regexp2 v1.12.0 // indirect - github.com/docker/cli v29.4.3+incompatible // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v28.5.2+incompatible // indirect + github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/docker/cli v29.5.3+incompatible // indirect github.com/docker/docker-credential-helpers v0.9.5 // indirect github.com/docker/go-connections v0.7.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -207,11 +204,11 @@ require ( github.com/pion/mdns/v2 v2.1.0 // indirect github.com/pion/randutil v0.1.0 // indirect github.com/pion/sctp v1.10.0 // indirect - github.com/pion/sdp/v3 v3.0.18 // indirect + github.com/pion/sdp/v3 v3.0.19 // indirect github.com/pion/srtp/v3 v3.0.11 // indirect - github.com/pion/stun/v3 v3.1.4 // indirect + github.com/pion/stun/v3 v3.1.5 // indirect github.com/pion/transport/v4 v4.0.2 // indirect - github.com/pion/turn/v5 v5.0.8 // indirect + github.com/pion/turn/v5 v5.0.9 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -224,7 +221,7 @@ require ( github.com/rivo/uniseg v0.4.7 // indirect github.com/sajari/fuzzy v1.0.0 // indirect github.com/secure-systems-lab/go-securesystemslib v0.10.0 // indirect - github.com/segmentio/asm v1.2.1 // indirect + github.com/segmentio/asm v1.1.3 // indirect github.com/segmentio/encoding v0.5.4 // indirect github.com/sergi/go-diff v1.4.0 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect @@ -240,7 +237,6 @@ require ( github.com/u-root/u-root v0.16.0 // indirect github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 // indirect github.com/ulikunitz/xz v0.5.15 // indirect - github.com/vbatts/tar-split v0.12.2 // indirect github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect github.com/wlynxg/anet v0.0.5 // indirect github.com/woodsbury/decimal128 v1.4.0 // indirect diff --git a/go.sum b/go.sum index 66a22d9b1..fe709b1f2 100644 --- a/go.sum +++ b/go.sum @@ -36,8 +36,6 @@ cyphar.com/go-pathrs v0.2.1 h1:9nx1vOgwVvX1mNBWDu93+vaceedpbsDqo+XuBGL40b8= cyphar.com/go-pathrs v0.2.1/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= -github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= -github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 h1:rIkQfkCOVKc1OiRCNcSDD8ml5RJlZbH/Xsq7lbpynwc= @@ -191,8 +189,8 @@ github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/q github.com/containerd/console v1.0.5/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/containerd/api v1.10.0 h1:5n0oHYVBwN4VhoX9fFykCV9dF1/BvAXeg2F8W6UYq1o= github.com/containerd/containerd/api v1.10.0/go.mod h1:NBm1OAk8ZL+LG8R0ceObGxT5hbUYj7CzTmR3xh0DlMM= -github.com/containerd/containerd/v2 v2.2.4 h1:8x2UdXqww7NYqGNabQ7i1nAgB5LegzjC9KQzO/900iA= -github.com/containerd/containerd/v2 v2.2.4/go.mod h1:YBcTO8D9149QY9zNmUjy04Mhuc4DlrZQ8FIOwKZEM7o= +github.com/containerd/containerd/v2 v2.2.5 h1:KTFzB02LviYmmfRmz8r9UFd+n6YlddVFK+5lbgQXUTU= +github.com/containerd/containerd/v2 v2.2.5/go.mod h1:5t2+xFv2dGd/iDYp9Z8DXB4cmWrWQi1XqxGJPS2gBzU= github.com/containerd/continuity v0.4.5 h1:ZRoN1sXq9u7V6QoHMcVWGhOwDFqZ4B9i5H6un1Wh0x4= github.com/containerd/continuity v0.4.5/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= @@ -209,6 +207,7 @@ github.com/containerd/platforms v1.0.0-rc.2 h1:0SPgaNZPVWGEi4grZdV8VRYQn78y+nm6a github.com/containerd/platforms v1.0.0-rc.2/go.mod h1:J71L7B+aiM5SdIEqmd9wp6THLVRzJGXfNuWCZCllLA4= github.com/containerd/plugin v1.0.0 h1:c8Kf1TNl6+e2TtMHZt+39yAPDbouRH9WAToRjex483Y= github.com/containerd/plugin v1.0.0/go.mod h1:hQfJe5nmWfImiqT1q8Si3jLv3ynMUIBB47bQ+KexvO8= +github.com/containerd/stargz-snapshotter v0.18.2 h1:Ev/sxfQUjwzJQ9eqy3XzttcQ3osMIqkQgMYlcET+10M= github.com/containerd/stargz-snapshotter/estargz v0.18.2 h1:yXkZFYIzz3eoLwlTUZKz2iQ4MrckBxJjkmD16ynUTrw= github.com/containerd/stargz-snapshotter/estargz v0.18.2/go.mod h1:XyVU5tcJ3PRpkA9XS2T5us6Eg35yM0214Y+wvrZTBrY= github.com/containerd/ttrpc v1.2.8 h1:xbVu6D4qF2jihdh9rDVOKqUMiFBQk6YctTdo1zk087Y= @@ -227,14 +226,10 @@ github.com/dennwc/iters v1.2.2 h1:XH2/Etihiy9ZvPOVCR+icQXeYlhbvS7k0qro4x/2qQo= github.com/dennwc/iters v1.2.2/go.mod h1:M9KuuMBeyEXYTmB7EnI9SCyALFCmPWOIxn5W1L0CjGg= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8= -github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/docker/cli v29.4.3+incompatible h1:u+UliYm2J/rYrIh2FqHQg32neRG8GjbvNuwQRTzGspU= -github.com/docker/cli v29.4.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= -github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM= -github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/docker/cli v29.5.3+incompatible h1:nbEFfz774vBwQ5KRYv7c/AghjReqnGISvrRhzjV0evs= +github.com/docker/cli v29.5.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker-credential-helpers v0.9.5 h1:EFNN8DHvaiK8zVqFA2DT6BjXE0GzfLOZ38ggPTKePkY= github.com/docker/docker-credential-helpers v0.9.5/go.mod h1:v1S+hepowrQXITkEfw6o4+BMbGot02wiKpzWhGUZK6c= github.com/docker/go-connections v0.7.0 h1:6SsRfJddP22WMrCkj19x9WKjEDTB+ahsdiGYf0mN39c= @@ -328,8 +323,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-containerregistry v0.20.7 h1:24VGNpS0IwrOZ2ms2P1QE3Xa5X9p4phx0aUgzYzHW6I= -github.com/google/go-containerregistry v0.20.7/go.mod h1:Lx5LCZQjLH1QBaMPeGwsME9biPeo1lPx6lbGj/UmzgM= +github.com/google/go-containerregistry v0.21.7 h1:/vPFuVXDjtFREsVArW+0h1CIl5urnOhzei4X2DMW9IU= +github.com/google/go-containerregistry v0.21.7/go.mod h1:kjSbt7/zMsKLWfnHrIvKvhXHUw91jbe9DNjPPJ32gXE= github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0= @@ -399,12 +394,12 @@ github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731 h1:9x+U2HGLrSw5AT github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ= github.com/livekit/mediatransportutil v0.0.0-20260605212259-862d4a7bcb1e h1:SkgQRcG2VYEhh80Qb/zYZo8rWKJzNfJcfUQnXe6su2M= github.com/livekit/mediatransportutil v0.0.0-20260605212259-862d4a7bcb1e/go.mod h1:o8CFmAdrVwzJNOCsQCLUzXRjokkufNshnQHOe4fRaqU= -github.com/livekit/protocol v1.49.0 h1:Q5nthDO1v7c0JHiWjMhgUQTlsKmCsBL/KCKxdHVaz00= -github.com/livekit/protocol v1.49.0/go.mod h1:jO+y05AU9Ec4JswDyuzKCZ4bhziOS0CzMqgnbj60Dzs= +github.com/livekit/protocol v1.49.1-0.20260712215709-8847d7456816 h1:MDWDlH5dmcZY4OSljwE4e6B39libPQJIEmBRYaeGAn0= +github.com/livekit/protocol v1.49.1-0.20260712215709-8847d7456816/go.mod h1:jO+y05AU9Ec4JswDyuzKCZ4bhziOS0CzMqgnbj60Dzs= github.com/livekit/psrpc v0.7.2 h1:6oZ+NODJ2pLyaT6VqDq1F4Qc/3TpDUSpyphj/P9MhQc= github.com/livekit/psrpc v0.7.2/go.mod h1:rAI+m2+/cb4x9RXhLRtUx5ZwdfjjXOl4zi46IjEetaw= -github.com/livekit/server-sdk-go/v2 v2.16.8-0.20260702164219-6126610d4e22 h1:xPko28MMS2QCbx9mWAUS5MKgO07AyouADfKCLU+Be5E= -github.com/livekit/server-sdk-go/v2 v2.16.8-0.20260702164219-6126610d4e22/go.mod h1:5nzTfVBH2Jz+TW1SrfpqC7wrbcD1lT94KZCJ9hOMyvk= +github.com/livekit/server-sdk-go/v2 v2.18.1 h1:/u0JVII+ErGCivHnAGr6di0wl0NYsfcRvDzEtTAFovo= +github.com/livekit/server-sdk-go/v2 v2.18.1/go.mod h1:su0IvJNWTFCHVwmqpsFvxHfXWs9pn26ms+cKBR1jILU= github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magefile/mage v1.17.2 h1:fyXVu1eadI8Ap1HCCNgEhJ5McIWiYhLR8uol64ZZc40= @@ -437,8 +432,6 @@ github.com/moby/patternmatcher v0.6.1 h1:qlhtafmr6kgMIJjKJMDmMWq7WLkKIo23hsrpR3x github.com/moby/patternmatcher v0.6.1/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/policy-helpers v0.0.0-20260507153417-a39d60132186 h1:AA3y9usJgmJyrOX16s8HsgHA3QP0CSvI9EJ9vVmpgGo= github.com/moby/policy-helpers v0.0.0-20260507153417-a39d60132186/go.mod h1:AbesLhDyQnWkhYOeG5BjDpfUWuyFlSpwv17zBGc03ag= -github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= -github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg= github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4= github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= @@ -449,8 +442,6 @@ github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= -github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= -github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/modelcontextprotocol/go-sdk v1.6.1 h1:0zOSupjKUxPKSocPT1Wtago+mUHU2/uZ4xSOY0FGReU= github.com/modelcontextprotocol/go-sdk v1.6.1/go.mod h1:kzm3kzFL1/+AziGOE0nUs3gvPoNxMCvkxokMkuFapXQ= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= @@ -537,20 +528,20 @@ github.com/pion/rtp v1.10.2 h1:l+f6tTDcAH6xwepaAoW791ddhuYsJlqRATOzirO04Mo= github.com/pion/rtp v1.10.2/go.mod h1:Au8fc6cEByy8RLTwKTQTEeQqDB/SJDxwL4mZuxYA5Pk= github.com/pion/sctp v1.10.0 h1:qeoD6swF/2M5bYRcAGayqSbTKX3m4AW29CiQxG1+Pfg= github.com/pion/sctp v1.10.0/go.mod h1:N20Dq6LY+JvJDAh9VVh1JELngb2rQ8dPgds5yBWiPgw= -github.com/pion/sdp/v3 v3.0.18 h1:l0bAXazKHpepazVdp+tPYnrsy9dfh7ZbT8DxesH5ZnI= -github.com/pion/sdp/v3 v3.0.18/go.mod h1:ZREGo6A9ZygQ9XkqAj5xYCQtQpif0i6Pa81HOiAdqQ8= +github.com/pion/sdp/v3 v3.0.19 h1:1VMKs3gIkTQV5M3hNKfTAPrDXSNrYtOlmOD8+mSZUGQ= +github.com/pion/sdp/v3 v3.0.19/go.mod h1:dE5WOSlzXrtiE/iuZqe9n+AcEbOjtAd3k5m5NtlV/qU= github.com/pion/srtp/v3 v3.0.11 h1:GiESUr54/K4UuPigfq/CvWUed80JenQAHXn0C2MQQIQ= github.com/pion/srtp/v3 v3.0.11/go.mod h1:EeZOi/sd6glM1EXapg051gdNWO9yWT1YSsgQ4SlJkns= -github.com/pion/stun/v3 v3.1.4 h1:/7ZL0j0dmLroKOq4GfkyKQ6asByYqntwyHSp5sYLcGY= -github.com/pion/stun/v3 v3.1.4/go.mod h1:ET7PFiXo1nrD2ZNVpbEHDuT0kCPVXhKmyWdiePNMw/U= +github.com/pion/stun/v3 v3.1.5 h1:Y1FHlhaI6+4UoC5i/zQf4F7JvdZtB24/05oyy/GF1x8= +github.com/pion/stun/v3 v3.1.5/go.mod h1:zRUghXSQU32Lx5orJsz3uYMkIihweXb3mu5gIns02fs= github.com/pion/transport/v3 v3.1.1 h1:Tr684+fnnKlhPceU+ICdrw6KKkTms+5qHMgw6bIkYOM= github.com/pion/transport/v3 v3.1.1/go.mod h1:+c2eewC5WJQHiAA46fkMMzoYZSuGzA/7E2FPrOYHctQ= github.com/pion/transport/v4 v4.0.2 h1:ifYlPqNwsy6aKQ9y8yzxXlHae5431ZrH2avkD/Rn6Tk= github.com/pion/transport/v4 v4.0.2/go.mod h1:06hFI+jCFcok2X2MekVufNZ/uzNZXivGBPfviSVcjgM= -github.com/pion/turn/v5 v5.0.8 h1:pZUCtmwWCMkrRKqh/8pL3WoGADXBe0/lOPkN7oqFjK8= -github.com/pion/turn/v5 v5.0.8/go.mod h1:1VwvxElZaOdJU0liJ/WUSm/Tsh+n2OxS5ISSDxgOWxU= -github.com/pion/webrtc/v4 v4.2.14 h1:Q6zMs+fSDsYuhZcNlvFGBxCOMHVV9oYcDa6O9/HIGTc= -github.com/pion/webrtc/v4 v4.2.14/go.mod h1:87NVKP86+g4OMrRxWhjWfUjeXP4JrV6RTlUrIW+/Jak= +github.com/pion/turn/v5 v5.0.9 h1:zNeBfRyzGn7MPyUTvmvxeltLEjlFdSLPT1tlakoaOXM= +github.com/pion/turn/v5 v5.0.9/go.mod h1:u3XjBqy2Z4+NhCUpDoOSsNuQDrPLvKStlCGWk6sTQ1E= +github.com/pion/webrtc/v4 v4.2.15 h1:Ir/MauNFCfg+kgyBYPQLiGdVWFlzEcLxqtuzAkYkky0= +github.com/pion/webrtc/v4 v4.2.15/go.mod h1:CPTcyLfIzC4scOkQ4UY4pj6WvbUGhcNLIpK28cP5h6M= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -584,8 +575,8 @@ github.com/sebdah/goldie/v2 v2.8.0 h1:dZb9wR8q5++oplmEiJT+U/5KyotVD+HNGCAc5gNr8r github.com/sebdah/goldie/v2 v2.8.0/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14= github.com/secure-systems-lab/go-securesystemslib v0.10.0/go.mod h1:MRKONWmRoFzPNQ9USRF9i1mc7MvAVvF1LlW8X5VWDvk= -github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= -github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= +github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= github.com/segmentio/encoding v0.5.4 h1:OW1VRern8Nw6ITAtwSZ7Idrl3MXCFwXHPgqESYfvNt0= github.com/segmentio/encoding v0.5.4/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -676,8 +667,6 @@ go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 h1:4YsVu3B8+3qtWYYrsUYgn0OG78pN0rnNPRGX4SbokQI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0/go.mod h1:+wnlSn0mD1ADVMe3v9Z/WIaiz6q6gL2J/ejaAmdmv80= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0 h1:lgh3PiVrRUWMLOVSkQicxzZll5NjF1r+AtsX1XRIHw0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0/go.mod h1:5Cnhth3m/AgOeTgE3ex12pPmiu/gGtZit03kSzx9X7s= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.42.0 h1:lSZHgNHfbmQTPfuTmWVkEu8J8qXaQwuV30pjCcAUvP8= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.42.0/go.mod h1:so9ounLcuoRDu033MW/E0AD4hhUjVqswrMF5FoZlBcw= go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= From b5c94d0767d4830ddcc4f45c762b9999947f0411 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Tue, 18 Aug 2026 17:56:08 -0600 Subject: [PATCH 4/4] feat(*): migrate public service to gRPC and implement pcache --- Makefile | 57 +- autocomplete/fish_autocomplete | 28 +- cmd/lk/cloud.go | 14 +- cmd/lk/experimental_auth.go | 131 +- cmd/lk/main.go | 20 +- cmd/lk/project.go | 216 +- cmd/lk/session.go | 8 +- cmd/lk/simulate_tui.go | 4 +- cmd/lk/utils.go | 25 +- go.mod | 113 +- go.sum | 321 +- magefile.go | 211 + pkg/agentfs/docker.go | 2 +- pkg/bootstrap/bootstrap.go | 5 +- pkg/config/config.go | 50 +- pkg/config/config_test.go | 19 + pkg/config/livekit.go | 2 +- .../publicapi/analytics/v1/analytics.pb.go | 493 ++ .../analyticsv1connect/analytics.connect.go | 141 + .../livekit/publicapi/common/v1/common.pb.go | 304 + .../publicapi/projects/v1/projects.pb.go | 2903 +++++++++ .../v1/projectsv1connect/projects.connect.go | 548 ++ .../simulations/v1/simulations.pb.go | 82 + .../simulations.connect.go | 200 + .../livekit/publicapi/users/v1/users.pb.go | 467 ++ .../users/v1/usersv1connect/users.connect.go | 165 + .../publicapi/workspaces/v1/workspaces.pb.go | 2082 ++++++ .../workspacesv1connect/workspaces.connect.go | 612 ++ pkg/loadtester/agentloadtester.go | 4 +- pkg/loadtester/loadtest.go | 20 +- pkg/loadtester/loadtester.go | 13 +- pkg/public/client.go | 180 +- pkg/public/gen.go | 45 - pkg/public/oapi/cfg.yaml | 15 - pkg/public/oapi/generate.go | 26 - pkg/public/oapi/generate.sh | 18 - pkg/public/oapi/oapi.gen.go | 5639 ----------------- pkg/util/printer.go | 27 + pkg/util/strings.go | 23 +- .../publicapi/analytics/v1/analytics.proto | 54 + .../livekit/publicapi/common/v1/common.proto | 33 + .../publicapi/projects/v1/projects.proto | 306 + .../simulations/v1/simulations.proto | 19 + .../livekit/publicapi/users/v1/users.proto | 49 + .../publicapi/workspaces/v1/workspaces.proto | 229 + 45 files changed, 9711 insertions(+), 6212 deletions(-) create mode 100644 magefile.go create mode 100644 pkg/gen/livekit/publicapi/analytics/v1/analytics.pb.go create mode 100644 pkg/gen/livekit/publicapi/analytics/v1/analyticsv1connect/analytics.connect.go create mode 100644 pkg/gen/livekit/publicapi/common/v1/common.pb.go create mode 100644 pkg/gen/livekit/publicapi/projects/v1/projects.pb.go create mode 100644 pkg/gen/livekit/publicapi/projects/v1/projectsv1connect/projects.connect.go create mode 100644 pkg/gen/livekit/publicapi/simulations/v1/simulations.pb.go create mode 100644 pkg/gen/livekit/publicapi/simulations/v1/simulationsv1connect/simulations.connect.go create mode 100644 pkg/gen/livekit/publicapi/users/v1/users.pb.go create mode 100644 pkg/gen/livekit/publicapi/users/v1/usersv1connect/users.connect.go create mode 100644 pkg/gen/livekit/publicapi/workspaces/v1/workspaces.pb.go create mode 100644 pkg/gen/livekit/publicapi/workspaces/v1/workspacesv1connect/workspaces.connect.go delete mode 100644 pkg/public/gen.go delete mode 100644 pkg/public/oapi/cfg.yaml delete mode 100644 pkg/public/oapi/generate.go delete mode 100644 pkg/public/oapi/generate.sh delete mode 100644 pkg/public/oapi/oapi.gen.go create mode 100644 protobufs/livekit/publicapi/analytics/v1/analytics.proto create mode 100644 protobufs/livekit/publicapi/common/v1/common.proto create mode 100644 protobufs/livekit/publicapi/projects/v1/projects.proto create mode 100644 protobufs/livekit/publicapi/simulations/v1/simulations.proto create mode 100644 protobufs/livekit/publicapi/users/v1/users.proto create mode 100644 protobufs/livekit/publicapi/workspaces/v1/workspaces.proto diff --git a/Makefile b/Makefile index 651af7355..8ecdc724d 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,31 @@ -# `make` builds the lk binary — the same cgo artifact as `go build ./cmd/lk` -# (see the README), with a submodule init so it also works from a fresh clone. -# It doubles as the build system CodeQL's C/C++ autobuild detects and traces to -# extract the vendored C/C++ (PortAudio + WebRTC APM). +# Build system shim. # -# `make install` puts it on $GOBIN with a `livekit-cli` alias for the legacy -# binary name. Releases use .goreleaser.yaml, not this file. - -ifeq (,$(shell go env GOBIN)) -GOBIN := $(shell go env GOPATH)/bin -else -GOBIN := $(shell go env GOBIN) -endif - -ifeq ($(OS),Windows_NT) -EXE := .exe -endif - -# pa_src holds the PortAudio C source the cgo build links against; the submodule -# init makes this work from a fresh clone (and under CodeQL, whose checkout may -# skip submodules). ALSA headers (libasound2-dev) come from CodeQL's automatic -# dependency installation on Linux. -./bin/lk$(EXE): - git submodule update --init --recursive - CGO_ENABLED=1 go build -o ./bin/lk$(EXE) ./cmd/lk - -install: ./bin/lk$(EXE) - cp ./bin/lk$(EXE) "$(GOBIN)/lk$(EXE)" - ln -sf "$(GOBIN)/lk$(EXE)" "$(GOBIN)/livekit-cli$(EXE)" +# The build system is Mage (see ./magefile.go); run targets directly with +# `go tool mage ` (mage is pinned as a go.mod tool dependency). +# +# This Makefile is retained ONLY so GitHub's default CodeQL setup keeps working: +# its C/C++ autobuild detects a Makefile and runs `make`, which is what traces +# the cgo compilation of the vendored PortAudio + WebRTC APM for extraction. +# Each target delegates to the corresponding Mage target so there is a single +# source of truth. `mage build` runs the same CGO_ENABLED=1 `go build`. + +MAGE := go tool mage + +.PHONY: all build install clean generate test + +all: build + +build: + $(MAGE) build + +install: + $(MAGE) install clean: - rm -rf ./bin + $(MAGE) clean + +generate: + $(MAGE) generate + +test: + $(MAGE) test diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete index 95cf02ec8..8cfadcb16 100644 --- a/autocomplete/fish_autocomplete +++ b/autocomplete/fish_autocomplete @@ -20,7 +20,6 @@ complete -c lk -n '__fish_lk_no_subcommand' -f -l curl -d 'Print curl commands f complete -c lk -n '__fish_lk_no_subcommand' -f -l verbose complete -c lk -n '__fish_lk_no_subcommand' -f -l yes -s y -d 'Assume yes for confirmations; fail or use default for other prompts (use in CI/non-interactive)' complete -c lk -n '__fish_lk_no_subcommand' -f -l quiet -s q -s silent -d 'Suppress informational output to stderr (warnings and errors still print)' -complete -c lk -n '__fish_lk_no_subcommand' -f -l experimental-auth -d 'EXPERIMENTAL: use user-based (session) auth against the LiveKit Public API instead of API-key auth. Most commands are not yet supported under this mode.' complete -c lk -n '__fish_lk_no_subcommand' -f -l help -s h -d 'show help' complete -c lk -n '__fish_lk_no_subcommand' -f -l version -s v -d 'print the version' complete -c lk -n '__fish_lk_no_subcommand' -xa '(lk --generate-shell-completion 2>/dev/null)' @@ -303,24 +302,41 @@ complete -x -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcomma complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'project' -d 'Add or remove projects and view existing project properties' complete -c lk -n '__fish_seen_subcommand_from project' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'add' -d 'Add a new project (for LiveKit Cloud projects, also see `lk cloud auth`)' +complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list get create update delete remove set-default help h' -a 'add' -d 'Add a new project (for LiveKit Cloud projects, also see `lk cloud auth`)' complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l url -r -d '`URL` of the LiveKit server' complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l api-key -r -d 'Project `KEY`' complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l api-secret -r -d 'Project `SECRET`' complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l default -d 'Set this project as the default' complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'list' -d 'List all configured projects' +complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list get create update delete remove set-default help h' -a 'list' -d 'List all configured projects' complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'remove' -d 'Remove an existing project from config' +complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list get create update delete remove set-default help h' -a 'get' -d 'Get a LiveKit Cloud project by ID (requires --experimental-auth)' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from get' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from get' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from get; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list get create update delete remove set-default help h' -a 'create' -d 'Create a new LiveKit Cloud project (requires --experimental-auth)' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from create' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list get create update delete remove set-default help h' -a 'update' -d 'Rename a LiveKit Cloud project (requires --experimental-auth)' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from update' -f -l name -r -d 'New project `NAME`' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from update' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list get create update delete remove set-default help h' -a 'delete' -d 'Delete a LiveKit Cloud project (requires --experimental-auth)' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from delete' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list get create update delete remove set-default help h' -a 'remove' -d 'Remove an existing project from config' complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from remove' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from remove; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'set-default' -d 'Set a project as default to use with other commands' +complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list get create update delete remove set-default help h' -a 'set-default' -d 'Set a project as default to use with other commands' complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from set-default' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from set-default; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list get create update delete remove set-default help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from set-theme' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from set-theme; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'room' -d 'Create or delete rooms and manage existing room properties' diff --git a/cmd/lk/cloud.go b/cmd/lk/cloud.go index d42bdcaf4..714ba8f67 100644 --- a/cmd/lk/cloud.go +++ b/cmd/lk/cloud.go @@ -558,7 +558,8 @@ func tryUserAuthIfNeeded(ctx context.Context, cmd *cli.Command) error { // Store the session. Re-authenticating as the same person (matched by id or // email) replaces the existing entry wholesale rather than adding a duplicate. wasFirstUser := len(cliConfig.Users) == 0 - if _, replaced := cliConfig.UpsertUser(user); !replaced { + stored, replaced := cliConfig.UpsertUser(user) + if !replaced { // New user: the first one becomes the default automatically; otherwise // ask whether to make it the default. isDefault := wasFirstUser @@ -581,6 +582,17 @@ func tryUserAuthIfNeeded(ctx context.Context, cmd *cli.Command) error { cliConfig.DefaultUser = userKey } + // Populate the per-user project cache immediately from the Public API so that + // `--project` can resolve project names/ids offline. Best-effort: a failure + // here does not fail sign-in (the cache can be refreshed later). + if projects, ferr := fetchUserProjects(ctx, stored.SessionToken); ferr != nil { + out.Warnf("Signed in, but couldn't fetch your projects (%v); run `lk project list --experimental-auth` to retry", ferr) + } else { + stored.Projects = projects + stored.ProjectsFetchedAt = time.Now().Unix() + out.Statusf("Cached %d project(s)", len(projects)) + } + return cliConfig.PersistIfNeeded() } diff --git a/cmd/lk/experimental_auth.go b/cmd/lk/experimental_auth.go index 9f15d66c6..22e4cee15 100644 --- a/cmd/lk/experimental_auth.go +++ b/cmd/lk/experimental_auth.go @@ -15,19 +15,50 @@ package main import ( + "context" "errors" "fmt" + "time" + "connectrpc.com/connect" "github.com/urfave/cli/v3" "github.com/livekit/livekit-cli/v2/pkg/config" "github.com/livekit/livekit-cli/v2/pkg/public" + "github.com/livekit/livekit-cli/v2/pkg/util" ) -// experimentalAuthEnabled reports whether the user opted into user-based -// (session) auth via the global --experimental-auth flag. +// experimentalAuthEnabled reports whether the command should run in user-based +// (session) auth mode: the global --experimental-auth flag is set AND legacy +// auth wasn't explicitly requested. Explicit API-key credentials or --legacy-auth +// always win — passing them is an unambiguous signal to use the SDK/key path. func experimentalAuthEnabled(cmd *cli.Command) bool { - return cmd.Bool("experimental-auth") + return cmd.Bool("experimental-auth") && !legacyAuthForced(cmd) +} + +// legacyAuthForced reports whether the user explicitly opted into legacy +// (API-key) auth: via --legacy-auth, or by supplying --api-key/--api-secret +// (or their LIVEKIT_API_KEY/SECRET env equivalents). This takes precedence over +// --experimental-auth, and — once user-auth becomes the default — will be the +// way to opt back into the key-based flow. +func legacyAuthForced(cmd *cli.Command) bool { + return cmd.Bool("legacy-auth") || (cmd.String("api-key") != "" && cmd.String("api-secret") != "" && cmd.String("url") != "") +} + +// maybeShowUpgradeNotice nudges users who haven't adopted user-based auth to run +// `lk cloud auth`. It prints once per invocation to stderr (never stdout, so it +// can't corrupt piped data), is suppressed by --quiet, and is skipped for `cloud` +// commands (where it would be redundant), when a session already exists, and +// when the user explicitly opted into legacy auth (--legacy-auth or explicit +// API-key credentials) — they've made their choice, so don't nag them. +func maybeShowUpgradeNotice(cmd *cli.Command, conf *config.CLIConfig) { + if conf == nil || len(conf.Users) > 0 { + return + } + if cmd.Args().First() == "cloud" || legacyAuthForced(cmd) { + return + } + out.Statusf("Tip: run %s to upgrade to LiveKit's account-based API — richer access control and audit logging.", util.Accented("lk cloud auth")) } // experimentalAuthGate refuses a command that only supports API-key auth when @@ -43,6 +74,34 @@ func experimentalAuthGate(cmd *cli.Command) error { return nil } +// requireExperimentalAuth is the inverse gate: it refuses commands that only +// exist in user-based auth mode when --experimental-auth is not set. The +// Public API operations (e.g. ProjectService create/update/delete) have no +// API-key/SDK equivalent, so they are available only in that mode. +func requireExperimentalAuth(cmd *cli.Command) error { + if !experimentalAuthEnabled(cmd) { + return errors.New("this command is only available under --experimental-auth (user-based auth)") + } + return nil +} + +// cloudAPIError annotates Public API failures with actionable hints. An expired +// or missing session suggests re-auth; a permission denial explains that the +// signed-in account/session lacks access and points at the API-key escape hatch +// (rather than silently falling back to API-key "admin" access). Other errors +// pass through unchanged. +func cloudAPIError(err error) error { + switch { + case public.IsUnauthenticated(err): + return fmt.Errorf("%w (run `lk cloud auth` to sign in again)", err) + case public.IsPermissionDenied(err): + return fmt.Errorf("%w — your account doesn't have access to this project or action. "+ + "To act with API-key credentials instead, pass `--legacy-auth` (or `--api-key`/`--api-secret`)", err) + default: + return err + } +} + // requireUserSession loads the CLI config and resolves the default user with a // valid (unexpired) session, for commands running under --experimental-auth. // The returned *CLIConfig is the same instance the user was read from, so @@ -65,6 +124,12 @@ func requireUserSession(cmd *cli.Command) (*config.CLIConfig, *config.UserConfig return conf, user, nil } +// publicClientForToken builds a Public API client authenticated with the given +// session token, honoring --experimental-api-url. +func publicClientForToken(token string) (*public.Client, error) { + return public.New(experimentalAPIURL, token, connect.WithGRPC()) +} + // newCloudAPIClient builds a Public API client authenticated as the default // user, honoring --experimental-api-url. func newCloudAPIClient(cmd *cli.Command) (*public.Client, *config.CLIConfig, *config.UserConfig, error) { @@ -72,13 +137,71 @@ func newCloudAPIClient(cmd *cli.Command) (*public.Client, *config.CLIConfig, *co if err != nil { return nil, nil, nil, err } - client, err := public.New(experimentalAPIURL, user.SessionToken) + client, err := publicClientForToken(user.SessionToken) if err != nil { return nil, nil, nil, err } return client, conf, user, nil } +// fetchUserProjects lists the projects the given session can access, shaped for +// the per-user config cache (config.UserConfig.Projects). +func fetchUserProjects(ctx context.Context, sessionToken string) ([]config.UserProjectConfig, error) { + client, err := publicClientForToken(sessionToken) + if err != nil { + return nil, err + } + projects, err := client.ListProjects(ctx) + if err != nil { + return nil, err + } + return projectCacheEntries(projects), nil +} + +// refreshUserProjects re-fetches the signed-in user's projects from the Public +// API and updates the per-user cache in place, persisting quietly. Returns the +// fresh entries. +func refreshUserProjects(ctx context.Context, conf *config.CLIConfig, user *config.UserConfig) ([]config.UserProjectConfig, error) { + entries, err := fetchUserProjects(ctx, user.SessionToken) + if err != nil { + return nil, err + } + user.Projects = entries + user.ProjectsFetchedAt = time.Now().Unix() + if err := conf.PersistQuietly(); err != nil { + return nil, err + } + return entries, nil +} + +// resolveProjectRef resolves a project reference — an explicit positional value, +// or the global --project flag — to a project id using the signed-in user's +// cached projects (matched by id or by name/alias). On a cache miss it refreshes +// the cache from the API and retries once; a ref that's still unknown is returned +// as-is (assumed to be a literal project id). Only meaningful in experimental +// (user-auth) mode. +func resolveProjectRef(ctx context.Context, cmd *cli.Command, conf *config.CLIConfig, user *config.UserConfig, positional string) (string, error) { + ref := positional + if ref == "" { + ref = cmd.String("project") + } + if ref == "" { + return "", errors.New("a project id or name is required (pass it as an argument or via --project)") + } + if p := user.FindProject(ref); p != nil { + return p.ProjectId, nil + } + // Cache miss — it may be stale (e.g. a project created elsewhere). Refresh + // and retry once; on refresh failure, fall back to treating ref as an id. + if _, err := refreshUserProjects(ctx, conf, user); err != nil { + return ref, nil + } + if p := user.FindProject(ref); p != nil { + return p.ProjectId, nil + } + return ref, nil +} + // userLabel is a human-friendly identifier for a user, preferring email. func userLabel(u *config.UserConfig) string { switch { diff --git a/cmd/lk/main.go b/cmd/lk/main.go index 99c68f668..6c219a049 100644 --- a/cmd/lk/main.go +++ b/cmd/lk/main.go @@ -44,6 +44,17 @@ func main() { HideHelpCommand: true, UseShortOptionHandling: true, Flags: globalFlags, + // --experimental-auth and --legacy-auth pick opposite auth modes; you may + // pass at most one. (These flags are registered via this group, not + // globalFlags.) + MutuallyExclusiveFlags: []cli.MutuallyExclusiveFlags{ + { + Flags: [][]cli.Flag{ + {experimentalAuthFlag}, + {legacyAuthFlag}, + }, + }, + }, Commands: []*cli.Command{ { Name: "generate-fish-completion", @@ -138,15 +149,22 @@ func initLogger(ctx context.Context, cmd *cli.Command) (context.Context, error) // Bind the human-facing output sink to the root command's writers (cli/v3 // defaults them to os.Stdout / os.Stderr, but they're overridable in tests). out = util.NewPrinter(cmd.Root().Writer, cmd.Root().ErrWriter, cmd.Bool("quiet")) + // Register the same Printer as the process-wide default so lower-level + // packages (config, agentfs, …) route through the same streams/gating. + util.SetDefault(out) // Apply the persisted color theme before any output/forms render. An empty value // resolves to the default; an invalid stored value is reported and falls back. - if conf, err := config.LoadOrCreate(); err == nil { + conf, _ := config.LoadOrCreate() + if conf != nil { if err := util.SetTheme(conf.Theme); err != nil { out.Warnf("%v; using default theme", err) } } + // Nudge users still on API-key auth toward the new account-based flow. + maybeShowUpgradeNotice(cmd, conf) + return nil, nil } diff --git a/cmd/lk/project.go b/cmd/lk/project.go index ec08d29cf..0c3aadd89 100644 --- a/cmd/lk/project.go +++ b/cmd/lk/project.go @@ -20,6 +20,7 @@ import ( "fmt" "net/url" "regexp" + "strings" "github.com/charmbracelet/huh" "github.com/charmbracelet/lipgloss" @@ -70,6 +71,45 @@ var ( Action: listProjects, Flags: []cli.Flag{jsonFlag}, }, + { + Name: "get", + Usage: "Get a LiveKit Cloud project by ID (requires --experimental-auth)", + UsageText: "lk project get PROJECT_ID --experimental-auth", + ArgsUsage: "PROJECT_ID", + Action: getUserProject, + Flags: []cli.Flag{jsonFlag}, + }, + { + Name: "create", + Usage: "Create a new LiveKit Cloud project (requires --experimental-auth)", + UsageText: "lk project create PROJECT_NAME --experimental-auth", + ArgsUsage: "PROJECT_NAME", + Action: createUserProject, + Flags: []cli.Flag{jsonFlag}, + }, + { + Name: "update", + Usage: "Rename a LiveKit Cloud project (requires --experimental-auth)", + UsageText: "lk project update PROJECT_ID --name NEW_NAME --experimental-auth", + ArgsUsage: "PROJECT_ID", + Action: updateUserProject, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "name", + Usage: "New project `NAME`", + Required: true, + }, + jsonFlag, + }, + }, + { + Name: "delete", + Usage: "Delete a LiveKit Cloud project (requires --experimental-auth)", + UsageText: "lk project delete PROJECT_ID --experimental-auth", + ArgsUsage: "PROJECT_ID", + Action: deleteUserProject, + Flags: []cli.Flag{jsonFlag}, + }, { Name: "remove", Usage: "Remove an existing project from config", @@ -322,34 +362,188 @@ func listProjects(ctx context.Context, cmd *cli.Command) error { // commands and is populated there; a read-only list stays quiet and does not // persist config. func listUserProjects(ctx context.Context, cmd *cli.Command) error { + conf, user, err := requireUserSession(cmd) + if err != nil { + return err + } + + // Listing refreshes the per-user cache from the API. + entries, err := refreshUserProjects(ctx, conf, user) + if err != nil { + return cloudAPIError(err) + } + + if cmd.Bool("json") { + util.PrintJSON(entries) + return nil + } + if len(entries) == 0 { + out.Status("No projects found for this account.") + return nil + } + out.Result(projectTable(entries)) + return nil +} + +// getUserProject implements `lk project get PROJECT_ID` (user auth only). +func getUserProject(ctx context.Context, cmd *cli.Command) error { + if err := requireExperimentalAuth(cmd); err != nil { + return err + } + client, conf, user, err := newCloudAPIClient(cmd) + if err != nil { + return err + } + id, err := resolveProjectRef(ctx, cmd, conf, user, cmd.Args().First()) + if err != nil { + return err + } + project, err := client.GetProject(ctx, id) + if err != nil { + return cloudAPIError(err) + } + return renderProject(cmd, *project) +} + +// createUserProject implements `lk project create PROJECT_NAME` (user auth only). +func createUserProject(ctx context.Context, cmd *cli.Command) error { + if err := requireExperimentalAuth(cmd); err != nil { + return err + } + name := cmd.Args().First() + if name == "" { + return errors.New("project name is required") + } client, _, _, err := newCloudAPIClient(cmd) if err != nil { return err } + project, err := client.CreateProject(ctx, name) + if err != nil { + return cloudAPIError(err) + } + out.Statusf("Created project %s", util.Accented(project.Name)) + return renderProject(cmd, *project) +} - projects, err := client.ListProjects(ctx) +// updateUserProject implements `lk project update PROJECT_ID --name NAME` (user auth only). +func updateUserProject(ctx context.Context, cmd *cli.Command) error { + if err := requireExperimentalAuth(cmd); err != nil { + return err + } + client, conf, user, err := newCloudAPIClient(cmd) + if err != nil { + return err + } + id, err := resolveProjectRef(ctx, cmd, conf, user, cmd.Args().First()) + if err != nil { + return err + } + project, err := client.UpdateProject(ctx, id, cmd.String("name")) + if err != nil { + return cloudAPIError(err) + } + out.Statusf("Updated project %s", util.Accented(project.ID)) + return renderProject(cmd, *project) +} + +// deleteUserProject implements `lk project delete PROJECT_ID` (user auth only). +func deleteUserProject(ctx context.Context, cmd *cli.Command) error { + if err := requireExperimentalAuth(cmd); err != nil { + return err + } + client, conf, user, err := newCloudAPIClient(cmd) + if err != nil { + return err + } + id, err := resolveProjectRef(ctx, cmd, conf, user, cmd.Args().First()) if err != nil { - if public.IsUnauthenticated(err) { - return fmt.Errorf("%w (run `lk cloud auth` to sign in again)", err) - } return err } + if !SkipPrompts(cmd) { + confirm := false + if err := huh.NewForm(huh.NewGroup(util.Confirm(). + Title(fmt.Sprintf("Delete project %s? This cannot be undone.", id)). + Value(&confirm). + WithTheme(util.Theme))). + Run(); err != nil { + return err + } + if !confirm { + return errors.New("aborted") + } + } + + if err := client.DeleteProject(ctx, id); err != nil { + return cloudAPIError(err) + } + if cmd.Bool("json") { - util.PrintJSON(projects) + util.PrintJSON(map[string]any{"id": id, "deleted": true}) return nil } + out.Statusf("Deleted project %s", util.Accented(id)) + return nil +} - if len(projects) == 0 { - out.Status("No projects found for this account.") - return nil +// projectCacheEntries builds per-user cache entries for the given projects, +// assigning each a unique URL-safe alias derived from its name (deduplicated +// with a numeric suffix, in list order). Used both to populate the config cache +// and to render project listings, so the displayed alias matches the one stored +// for --project lookup. +func projectCacheEntries(projects []public.Project) []config.UserProjectConfig { + used := make(map[string]bool, len(projects)) + entries := make([]config.UserProjectConfig, len(projects)) + for i, p := range projects { + base := projectAliasBase(p) + alias := base + for k := 2; alias != "" && used[alias]; k++ { + alias = fmt.Sprintf("%s-%d", base, k) + } + if alias != "" { + used[alias] = true + } + entries[i] = config.UserProjectConfig{ + ProjectId: p.ID, + Name: p.Name, + Subdomain: p.Subdomain, + Alias: alias, + } + } + return entries +} + +// projectAliasBase derives a project's base alias: the subdomain with its +// generated suffix stripped (as the old API-key flow did via util.URLSafeName), +// falling back to a slug of the display name when no subdomain is present. +func projectAliasBase(p public.Project) string { + if p.Subdomain != "" { + if i := strings.LastIndex(p.Subdomain, "-"); i > 0 { + return p.Subdomain[:i] + } + return p.Subdomain } + return util.Slugify(p.Name) +} - table := util.CreateTable().Headers("Project ID") +// projectTable renders cached projects (alias, name, id) as a table. +func projectTable(projects []config.UserProjectConfig) *table.Table { + t := util.CreateTable().Headers("Alias", "Name", "Project ID") for _, p := range projects { - table.Row(p.ID) + t.Row(p.Alias, p.Name, p.ProjectId) + } + return t +} + +// renderProject outputs a single Public API project as JSON (--json) or a table. +func renderProject(cmd *cli.Command, project public.Project) error { + entries := projectCacheEntries([]public.Project{project}) + if cmd.Bool("json") { + util.PrintJSON(entries[0]) + return nil } - out.Result(table) + out.Result(projectTable(entries)) return nil } diff --git a/cmd/lk/session.go b/cmd/lk/session.go index 672db227a..eae89f423 100644 --- a/cmd/lk/session.go +++ b/cmd/lk/session.go @@ -156,8 +156,8 @@ func runSessionStart(ctx context.Context, cmd *cli.Command) error { status := awaitDaemonReady(daemon, readyPath) switch { case status == "ready": - fmt.Fprintf(os.Stderr, "Detected %s agent (%s in %s)\n", projectType.Lang(), entrypoint, projectDir) - fmt.Printf("Session started. Use `lk agent daemon say \"...\"` to talk, `lk agent daemon stop` to stop.\n") + out.Statusf("Detected %s agent (%s in %s)", projectType.Lang(), entrypoint, projectDir) + out.Status("Session started. Use `lk agent daemon say \"...\"` to talk, `lk agent daemon stop` to stop.") return nil case strings.HasPrefix(status, "error:"): return fmt.Errorf("%s", strings.TrimSpace(strings.TrimPrefix(status, "error:"))) @@ -233,7 +233,7 @@ func runSessionStop(ctx context.Context, cmd *cli.Command) error { if err := streamControlReplies(conn); err != nil { return err } - fmt.Println("Session ended.") + out.Status("Session ended.") return nil } @@ -260,7 +260,7 @@ func streamControlReplies(conn net.Conn) error { return err } if reply.Line != "" { - fmt.Println(reply.Line) + out.Result(reply.Line) } if reply.Done { if reply.Error != "" { diff --git a/cmd/lk/simulate_tui.go b/cmd/lk/simulate_tui.go index 33800b37e..a9d42c800 100644 --- a/cmd/lk/simulate_tui.go +++ b/cmd/lk/simulate_tui.go @@ -84,11 +84,11 @@ func runSimulateTUI(config *simulateConfig) error { } if m.config.mode == modeView { - writeSimulationRunHints(os.Stderr, m.config.viewModeRunID, true) + writeSimulationRunHints(out.StatusWriter(), m.config.viewModeRunID, true) } else if m.runID != "" && !m.runFinished { cancelSimulationRun(config.client, m.runID) } else if m.runID != "" { - writeSimulationRunHints(os.Stderr, m.runID, false) + writeSimulationRunHints(out.StatusWriter(), m.runID, false) } if runErr != nil { diff --git a/cmd/lk/utils.go b/cmd/lk/utils.go index a9d0e2ca3..b453880a9 100644 --- a/cmd/lk/utils.go +++ b/cmd/lk/utils.go @@ -40,10 +40,10 @@ const ( cloudAPIServerURL = "https://cloud-api.livekit.io" cloudDashboardURL = "https://cloud.livekit.io" // publicAPIBaseURL is the production base URL of the user-authenticated - // LiveKit Public API (the OpenAPI REST service). Used only under - // --experimental-auth; override with --experimental-api-url for dev - // (e.g. http://localhost:8000/v1). - publicAPIBaseURL = "https://api.livekit.cloud/v1" + // LiveKit Public API (Connect/gRPC). Used only under --experimental-auth; + // override with --experimental-api-url for dev (e.g. http://localhost:8000). + // Connect appends the RPC path, so this is the host root — not a REST prefix. + publicAPIBaseURL = "https://api.livekit.cloud" ) var ( @@ -79,6 +79,19 @@ var ( Aliases: []string{"q", "silent"}, Usage: "Suppress informational output to stderr (warnings and errors still print)", } + // experimentalAuthFlag and legacyAuthFlag select the auth mode and are + // mutually exclusive (enforced via the root command's MutuallyExclusiveFlags, + // see main.go), so they aren't listed in globalFlags directly. + experimentalAuthFlag = &cli.BoolFlag{ + Name: "experimental-auth", + Usage: "EXPERIMENTAL: use user-based (session) auth against the LiveKit Public API instead of API-key auth. Most commands are not yet supported under this mode.", + Hidden: true, + } + legacyAuthFlag = &cli.BoolFlag{ + Name: "legacy-auth", + Usage: "Force API-key (SDK) authentication, ignoring any signed-in user session. Explicit --api-key/--api-secret imply this.", + Hidden: true, + } templateFlag = &cli.StringFlag{ Name: "template", Usage: "`TEMPLATE` to instantiate, see " + bootstrap.TemplateBaseURL, @@ -172,10 +185,6 @@ var ( Usage: "Assume yes for confirmations; fail or use default for other prompts (use in CI/non-interactive)", }, quietFlag, - &cli.BoolFlag{ - Name: "experimental-auth", - Usage: "EXPERIMENTAL: use user-based (session) auth against the LiveKit Public API instead of API-key auth. Most commands are not yet supported under this mode.", - }, &cli.StringFlag{ Name: "experimental-api-url", Usage: "Base `URL` of the LiveKit Public API used with --experimental-auth", diff --git a/go.mod b/go.mod index 291becec3..505adf35a 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/livekit/livekit-cli/v2 go 1.26.0 require ( + connectrpc.com/connect v1.20.0 github.com/BurntSushi/toml v1.6.0 github.com/Masterminds/semver/v3 v3.5.0 github.com/atotto/clipboard v0.1.4 @@ -20,13 +21,13 @@ require ( github.com/google/go-querystring v1.2.0 github.com/joho/godotenv v1.5.1 github.com/klauspost/compress v1.18.6 - github.com/livekit/protocol v1.49.1-0.20260712215709-8847d7456816 + github.com/livekit/cloud-protocol v0.0.2-0.20260721210808-2227d3909b2d + github.com/livekit/protocol v1.50.4 github.com/livekit/server-sdk-go/v2 v2.18.1 github.com/mattn/go-isatty v0.0.22 github.com/moby/moby/client v0.4.1 github.com/moby/patternmatcher v0.6.1 github.com/modelcontextprotocol/go-sdk v1.6.1 - github.com/oapi-codegen/runtime v1.4.2 github.com/pelletier/go-toml v1.9.5 github.com/pion/rtcp v1.2.16 github.com/pion/rtp v1.10.2 @@ -38,7 +39,7 @@ require ( go.uber.org/atomic v1.11.0 golang.org/x/sync v0.21.0 golang.org/x/time v0.15.0 - google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af + google.golang.org/protobuf v1.36.12 gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.36.1 ) @@ -55,35 +56,34 @@ require ( cloud.google.com/go/auth v0.20.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect cloud.google.com/go/compute/metadata v0.9.0 // indirect - cloud.google.com/go/iam v1.8.0 // indirect - cloud.google.com/go/monitoring v1.26.0 // indirect - cloud.google.com/go/storage v1.62.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.56.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.56.0 // indirect + cloud.google.com/go/iam v1.11.0 // indirect + cloud.google.com/go/monitoring v1.29.0 // indirect + cloud.google.com/go/storage v1.62.3 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.33.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.57.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.57.0 // indirect github.com/Ladicle/tabwriter v1.0.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/alecthomas/chroma/v2 v2.23.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect - github.com/aws/aws-sdk-go-v2 v1.41.7 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect - github.com/aws/aws-sdk-go-v2/config v1.32.17 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.19.16 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.23 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.23 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.23 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.24 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.23 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.99.0 // indirect - github.com/aws/aws-sdk-go-v2/service/signin v1.0.11 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.30.17 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.21 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.42.1 // indirect - github.com/aws/smithy-go v1.25.1 // indirect + github.com/aws/aws-sdk-go-v2 v1.41.12 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 // indirect + github.com/aws/aws-sdk-go-v2/config v1.32.23 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.19.22 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.28 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.28 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.28 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.29 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.21 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.28 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.28 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.103.2 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.1.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.31.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.43.2 // indirect + github.com/aws/smithy-go v1.27.1 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -121,7 +121,6 @@ require ( github.com/docker/go-connections v0.7.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dominikbraun/graph v0.23.0 // indirect - github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect @@ -131,11 +130,8 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/gammazero/deque v1.2.1 // indirect - github.com/getkin/kin-openapi v0.135.0 // indirect github.com/go-jose/go-jose/v4 v4.1.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/jsonpointer v0.22.5 // indirect - github.com/go-openapi/swag/jsonname v0.25.5 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/go-task/template v0.2.0 // indirect github.com/gofrs/flock v0.13.0 // indirect @@ -148,8 +144,8 @@ require ( github.com/google/s2a-go v0.1.9 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect - github.com/googleapis/gax-go/v2 v2.21.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.16 // indirect + github.com/googleapis/gax-go/v2 v2.22.0 // indirect github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.72 // indirect @@ -159,7 +155,6 @@ require ( github.com/hashicorp/go-version v1.9.0 // indirect github.com/in-toto/attestation v1.1.2 // indirect github.com/in-toto/in-toto-golang v0.11.0 // indirect - github.com/josharian/intern v1.0.0 // indirect github.com/jxskiss/base62 v1.1.0 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/klauspost/pgzip v1.2.6 // indirect @@ -169,7 +164,6 @@ require ( github.com/livekit/psrpc v0.7.2 // indirect github.com/lucasb-eyer/go-colorful v1.4.0 // indirect github.com/magefile/mage v1.17.2 // indirect - github.com/mailru/easyjson v0.9.1 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.23 // indirect @@ -180,7 +174,6 @@ require ( github.com/moby/locker v1.0.1 // indirect github.com/moby/moby/api v1.54.2 // indirect github.com/moby/sys/signal v0.7.1 // indirect - github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/morikuni/aec v1.1.0 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect @@ -189,13 +182,9 @@ require ( github.com/nats-io/nats.go v1.52.0 // indirect github.com/nats-io/nkeys v0.4.16 // indirect github.com/nats-io/nuid v1.0.1 // indirect - github.com/oapi-codegen/oapi-codegen/v2 v2.7.1 // indirect - github.com/oasdiff/yaml v0.0.9 // indirect - github.com/oasdiff/yaml3 v0.0.9 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/perimeterx/marshmallow v1.1.5 // indirect - github.com/pierrec/lz4/v4 v4.1.26 // indirect + github.com/pierrec/lz4/v4 v4.1.27 // indirect github.com/pion/datachannel v1.6.0 // indirect github.com/pion/dtls/v3 v3.1.4 // indirect github.com/pion/ice/v4 v4.2.7 // indirect @@ -205,30 +194,28 @@ require ( github.com/pion/randutil v0.1.0 // indirect github.com/pion/sctp v1.10.0 // indirect github.com/pion/sdp/v3 v3.0.19 // indirect - github.com/pion/srtp/v3 v3.0.11 // indirect + github.com/pion/srtp/v3 v3.0.12 // indirect github.com/pion/stun/v3 v3.1.5 // indirect github.com/pion/transport/v4 v4.0.2 // indirect - github.com/pion/turn/v5 v5.0.9 // indirect + github.com/pion/turn/v5 v5.0.10 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect + github.com/planetscale/vtprotobuf v0.6.1-0.20250313105119-ba97887b0a25 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.68.1 // indirect + github.com/prometheus/common v0.69.0 // indirect github.com/prometheus/procfs v0.20.1 // indirect github.com/puzpuzpuz/xsync/v4 v4.5.0 // indirect - github.com/redis/go-redis/v9 v9.20.0 // indirect + github.com/redis/go-redis/v9 v9.21.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/sajari/fuzzy v1.0.0 // indirect github.com/secure-systems-lab/go-securesystemslib v0.10.0 // indirect - github.com/segmentio/asm v1.1.3 // indirect + github.com/segmentio/asm v1.2.1 // indirect github.com/segmentio/encoding v0.5.4 // indirect github.com/sergi/go-diff v1.4.0 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect github.com/sirupsen/logrus v1.9.4 // indirect - github.com/speakeasy-api/jsonpath v0.6.3 // indirect - github.com/speakeasy-api/openapi v1.19.2 // indirect - github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect + github.com/spiffe/go-spiffe/v2 v2.7.0 // indirect github.com/stretchr/objx v0.5.3 // indirect github.com/tonistiigi/fsutil v0.0.0-20251211185533-a2aa163d723f // indirect github.com/tonistiigi/go-csvvalue v0.0.0-20240814133006-030d3b2625d0 // indirect @@ -237,16 +224,14 @@ require ( github.com/u-root/u-root v0.16.0 // indirect github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 // indirect github.com/ulikunitz/xz v0.5.15 // indirect - github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect github.com/wlynxg/anet v0.0.5 // indirect - github.com/woodsbury/decimal128 v1.4.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/yosida95/uritemplate/v3 v3.0.2 // indirect github.com/zeebo/xxh3 v1.1.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/contrib/detectors/gcp v1.43.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.44.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 // indirect go.opentelemetry.io/otel v1.44.0 // indirect @@ -261,18 +246,16 @@ require ( go.uber.org/zap/exp v0.3.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.53.0 // indirect - golang.org/x/exp v0.0.0-20260603202125-055de637280b // indirect - golang.org/x/mod v0.37.0 // indirect + golang.org/x/exp v0.0.0-20260611194520-c48552f49976 // indirect golang.org/x/net v0.56.0 // indirect golang.org/x/oauth2 v0.36.0 // indirect golang.org/x/sys v0.46.0 // indirect golang.org/x/term v0.44.0 // indirect golang.org/x/text v0.38.0 // indirect - golang.org/x/tools v0.46.0 // indirect - google.golang.org/api v0.275.0 // indirect - google.golang.org/genproto v0.0.0-20260406210006-6f92a3bedf2d // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect + google.golang.org/api v0.283.0 // indirect + google.golang.org/genproto v0.0.0-20260526163538-3dc84a4a5aaa // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260622175928-b703f567277d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260622175928-b703f567277d // indirect google.golang.org/grpc v1.81.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect mvdan.cc/sh/moreinterp v0.0.0-20260120230322-19def062a997 // indirect @@ -284,4 +267,8 @@ require ( // Drop once github.com/livekit/protocol publishes it. // replace github.com/livekit/protocol => ../protocol -tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen +tool ( + connectrpc.com/connect/cmd/protoc-gen-connect-go + github.com/magefile/mage + google.golang.org/protobuf/cmd/protoc-gen-go +) diff --git a/go.sum b/go.sum index fe709b1f2..4a1279bf8 100644 --- a/go.sum +++ b/go.sum @@ -20,32 +20,34 @@ cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIi cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= -cloud.google.com/go/iam v1.8.0 h1:e5QOdN1zQ3MTWYtXIf2buX+jxqvo2sKqBCOLrteLd1M= -cloud.google.com/go/iam v1.8.0/go.mod h1:IkWUaEeLK91WQqTKa/fi5xdHJbL49kv2j/vlAZQSJ+k= -cloud.google.com/go/logging v1.14.0 h1:xpPpY8cVT6n9DgIRgrWyE+YEsGlO/994pWnbc7o5Eh4= -cloud.google.com/go/logging v1.14.0/go.mod h1:jmI+Try/fZeOTOAer3wVYOuPf9WX9PyzhlSDoBAi4HM= -cloud.google.com/go/longrunning v0.9.0 h1:0EzbDEGsAvOZNbqXopgniY0w0a1phvu5IdUFq8grmqY= -cloud.google.com/go/longrunning v0.9.0/go.mod h1:pkTz846W7bF4o2SzdWJ40Hu0Re+UoNT6Q5t+igIcb8E= -cloud.google.com/go/monitoring v1.26.0 h1:858kWP5akszJFeiWBSmQJIfS8vsCqkX9hjc7HPsv/tk= -cloud.google.com/go/monitoring v1.26.0/go.mod h1:72NOVjJXHY/HBfoLT0+qlCZBT059+9VXLeAnL2PeeVM= -cloud.google.com/go/storage v1.62.0 h1:w2pQJhpUqVerMON45vatE2FpCYsNTf7OHjkn6ux5mMU= -cloud.google.com/go/storage v1.62.0/go.mod h1:T5hz3qzcpnxZ5LdKc7y8Tw7lh4v9zeeVyrD/cLJAzZU= -cloud.google.com/go/trace v1.12.0 h1:XvWHYfr9q88cX4pZyou6qCcSagnuASyUq2ej1dB6NzQ= -cloud.google.com/go/trace v1.12.0/go.mod h1:TOYfyeoyCGsSH0ifXD6Aius24uQI9xV3RyvOdljFIyg= +cloud.google.com/go/iam v1.11.0 h1:KieQ9Pb+LLPak1O3Rv3GgCxhnmkYf7Xyh0P5HfF1jFM= +cloud.google.com/go/iam v1.11.0/go.mod h1:KP+nKGugNJW4LcLx1uEZcq1ok5sQHFaQehQNl4QDgV4= +cloud.google.com/go/logging v1.18.0 h1:KhzZq+1cSkPH9YUaKLLhLtQxIHitVayBmk0sGfoM9+k= +cloud.google.com/go/logging v1.18.0/go.mod h1:ZGKnpBaURITh+g/uom2VhbiFoFWvejcrHPDhxFtU/gI= +cloud.google.com/go/longrunning v1.0.0 h1:lwzWEYD8+NkYV7dhexOz6kmlvajZA70+bW/xMhRVVdY= +cloud.google.com/go/longrunning v1.0.0/go.mod h1:8nqFBPOO1U/XkhWl0I19AMZEphrHi73VNABIpKYaTwM= +cloud.google.com/go/monitoring v1.29.0 h1:AHhDsFaSax1/4k+qlIDX/SDGe6hggnfXJ9dkgD9qBPY= +cloud.google.com/go/monitoring v1.29.0/go.mod h1:72NOVjJXHY/HBfoLT0+qlCZBT059+9VXLeAnL2PeeVM= +cloud.google.com/go/storage v1.62.3 h1:SZq1t23NCI+e96dH77Dg3PEfsNNEjqO8zE5AnD8gVD0= +cloud.google.com/go/storage v1.62.3/go.mod h1:cpYz/kRVZ+UQAF1uHeea10/9ewcRbxGoGNKsS9daSXA= +cloud.google.com/go/trace v1.16.0 h1:GmQovzFc5F0CNfl0VLgL64aoTtu7xsM0YajW2GlG9+E= +cloud.google.com/go/trace v1.16.0/go.mod h1:r+bdAn16dKLSV1G2D5v3e58IlQlizfxWrUfjx7kM7X0= +connectrpc.com/connect v1.20.0 h1:6TNDAB+WeNd2uolWNlYczB5E0KNNaVMNUEx8JEUsPmQ= +connectrpc.com/connect v1.20.0/go.mod h1:A2ygJrukXwWy32vkCAAHNVguZrqZ+jeZ9rGRnGR4dN4= cyphar.com/go-pathrs v0.2.1 h1:9nx1vOgwVvX1mNBWDu93+vaceedpbsDqo+XuBGL40b8= cyphar.com/go-pathrs v0.2.1/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 h1:rIkQfkCOVKc1OiRCNcSDD8ml5RJlZbH/Xsq7lbpynwc= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0/go.mod h1:RD2SsorTmYhF6HkTmDw7KmPYQk8OBYwTkuasChwv7R4= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.56.0 h1:O2sXMyJh8b7devAGdE+163xtRurt0RVpB6DIzX5vGfg= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.56.0/go.mod h1:hEpiGU18xf70qb3jbTcIggWAiEfX/cOIVc2OTe4OegA= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.56.0 h1:ZIT85vKP7LBS84XJ0WdJ3dPOX3iz4j3c0+lpajGQMyo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.56.0/go.mod h1:rqP9UEhOXv9WhQ7Gjz+G5y/pf8+BJZW5/Ts0AhE0PwE= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.56.0 h1:0YP0+/ixwu+Uqeu/FGiBZNQ19huiUxxiPXIc9WsLKuQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.56.0/go.mod h1:6ZZMQhZKDvUvkJw2rc+oDP90tMMzuU/J+5HG1ZmPOmE= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.33.0 h1:l7+6kwRMJNwdCvYdDl7Eax+wzEYHSnNY7zrrfbhDdTA= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.33.0/go.mod h1:pJTkW8hEUIIi3Pf65lPZOnn4Y81yCllX6IWk2jNXdkM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.57.0 h1:jLdiS1vO+XJFyDSWRHBx56r4s/NNtcl5J6KyCcWUX/w= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.57.0/go.mod h1:8lmpHY+1VRoteiOwyrQMDt1YGXOrFKCz+1wJW7n3ODY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.57.0 h1:cSjUzZ7KU8hicTgzaSv9NmSyM9fTVK3y5lsBUl3wOis= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.57.0/go.mod h1:dzcEjy1WJ0Q4u9twNR3LcLhNoYMRCrMCMafpxa0TjPQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.57.0 h1:RoO5+d7uCmDqovLrHCr2/BuViUXvdcrNxyNM1pN9dDQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.57.0/go.mod h1:YqwkQPrWSC7+byyc1VlKbWLBF5JsW5IoL6xUkemYSXk= github.com/Ladicle/tabwriter v1.0.0 h1:DZQqPvMumBDwVNElso13afjYLNp0Z7pHqHnu0r4t9Dg= github.com/Ladicle/tabwriter v1.0.0/go.mod h1:c4MdCjxQyTbGuQO/gvqJ+IA/89UEwrsD6hUCW98dyp4= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= @@ -58,7 +60,6 @@ github.com/Microsoft/hcsshim v0.14.1 h1:CMuB3fqQVfPdhyXhUqYdUmPUIOhJkmghCx3dJet8 github.com/Microsoft/hcsshim v0.14.1/go.mod h1:VnzvPLyWUhxiPVsJ31P6XadxCcTogTguBFDy/1GR/OM= github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw= github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= -github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= @@ -69,46 +70,44 @@ github.com/anchore/go-struct-converter v0.1.0 h1:2rDRssAl6mgKBSLNiVCMADgZRhoqtw9 github.com/anchore/go-struct-converter v0.1.0/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= -github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/aws/aws-sdk-go-v2 v1.41.7 h1:DWpAJt66FmnnaRIOT/8ASTucrvuDPZASqhhLey6tLY8= -github.com/aws/aws-sdk-go-v2 v1.41.7/go.mod h1:4LAfZOPHNVNQEckOACQx60Y8pSRjIkNZQz1w92xpMJc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 h1:eBMB84YGghSocM7PsjmmPffTa+1FBUeNvGvFou6V/4o= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8/go.mod h1:lyw7GFp3qENLh7kwzf7iMzAxDn+NzjXEAGjKS2UOKqI= -github.com/aws/aws-sdk-go-v2/config v1.32.17 h1:FpL4/758/diKwqbytU0prpuiu60fgXKUWCpDJtApclU= -github.com/aws/aws-sdk-go-v2/config v1.32.17/go.mod h1:OXqUMzgXytfoF9JaKkhrOYsyh72t9G+MJH8mMRaexOE= -github.com/aws/aws-sdk-go-v2/credentials v1.19.16 h1:r3RJBuU7X9ibt8RHbMjWE6y60QbKBiII6wSrXnapxSU= -github.com/aws/aws-sdk-go-v2/credentials v1.19.16/go.mod h1:6cx7zqDENJDbBIIWX6P8s0h6hqHC8Avbjh9Dseo27ug= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.23 h1:UuSfcORqNSz/ey3VPRS8TcVH2Ikf0/sC+Hdj400QI6U= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.23/go.mod h1:+G/OSGiOFnSOkYloKj/9M35s74LgVAdJBSD5lsFfqKg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.23 h1:GpT/TrnBYuE5gan2cZbTtvP+JlHsutdmlV2YfEyNde0= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.23/go.mod h1:xYWD6BS9ywC5bS3sz9Xh04whO/hzK2plt2Zkyrp4JuA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.23 h1:bpd8vxhlQi2r1hiueOw02f/duEPTMK59Q4QMAoTTtTo= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.23/go.mod h1:15DfR2nw+CRHIk0tqNyifu3G1YdAOy68RftkhMDDwYk= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.24 h1:OQqn11BtaYv1WLUowvcA30MpzIu8Ti4pcLPIIyoKZrA= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.24/go.mod h1:X5ZJyfwVrWA96GzPmUCWFQaEARPR7gCrpq2E92PJwAE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9 h1:FLudkZLt5ci0ozzgkVo8BJGwvqNaZbTWb3UcucAateA= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9/go.mod h1:w7wZ/s9qK7c8g4al+UyoF1Sp/Z45UwMGcqIzLWVQHWk= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 h1:JRaIgADQS/U6uXDqlPiefP32yXTda7Kqfx+LgspooZM= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13/go.mod h1:CEuVn5WqOMilYl+tbccq8+N2ieCy0gVn3OtRb0vBNNM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.23 h1:pbrxO/kuIwgEsOPLkaHu0O+m4fNgLU8B3vxQ+72jTPw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.23/go.mod h1:/CMNUqoj46HpS3MNRDEDIwcgEnrtZlKRaHNaHxIFpNA= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 h1:ZlvrNcHSFFWURB8avufQq9gFsheUgjVD9536obIknfM= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21/go.mod h1:cv3TNhVrssKR0O/xxLJVRfd2oazSnZnkUeTf6ctUwfQ= -github.com/aws/aws-sdk-go-v2/service/s3 v1.99.0 h1:hlSuz394kV0vhv9drL5lhuEFbEOEP1VyQpy15qWh1Pk= -github.com/aws/aws-sdk-go-v2/service/s3 v1.99.0/go.mod h1:uoA43SdFwacedBfSgfFSjjCvYe8aYBS7EnU5GZ/YKMM= -github.com/aws/aws-sdk-go-v2/service/signin v1.0.11 h1:TdJ+HdzOBhU8+iVAOGUTU63VXopcumCOF1paFulHWZc= -github.com/aws/aws-sdk-go-v2/service/signin v1.0.11/go.mod h1:R82ZRExE/nheo0N+T8zHPcLRTcH8MGsnR3BiVGX0TwI= -github.com/aws/aws-sdk-go-v2/service/sso v1.30.17 h1:7byT8HUWrgoRp6sXjxtZwgOKfhss5fW6SkLBtqzgRoE= -github.com/aws/aws-sdk-go-v2/service/sso v1.30.17/go.mod h1:xNWknVi4Ezm1vg1QsB/5EWpAJURq22uqd38U8qKvOJc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.21 h1:+1Kl1zx6bWi4X7cKi3VYh29h8BvsCoHQEQ6ST9X8w7w= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.21/go.mod h1:4vIRDq+CJB2xFAXZ+YgGUTiEft7oAQlhIs71xcSeuVg= -github.com/aws/aws-sdk-go-v2/service/sts v1.42.1 h1:F/M5Y9I3nwr2IEpshZgh1GeHpOItExNM9L1euNuh/fk= -github.com/aws/aws-sdk-go-v2/service/sts v1.42.1/go.mod h1:mTNxImtovCOEEuD65mKW7DCsL+2gjEH+RPEAexAzAio= -github.com/aws/smithy-go v1.25.1 h1:J8ERsGSU7d+aCmdQur5Txg6bVoYelvQJgtZehD12GkI= -github.com/aws/smithy-go v1.25.1/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/aws/aws-sdk-go-v2 v1.41.12 h1:DIKX2c31ekm9RA2D9FBj1EWXx++9AdAqRw+e78Tq2Ck= +github.com/aws/aws-sdk-go-v2 v1.41.12/go.mod h1:27+ACypSLljLAEKsCYOmrjKh83vuTRkuAe9Uv/3A4bg= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 h1:p1BBrg/Hhp6uK7zpejeI8QFXHJeC/mynzi04Sl03k9g= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13/go.mod h1:8cIfkE9MDhkRZGpQ22aV6/lkYeYSozpz16Smrs5x4Ls= +github.com/aws/aws-sdk-go-v2/config v1.32.23 h1:PYDobtcsJXK6bQe9I8RQk6s19Bz3xa3xRU08Hy1Em3Y= +github.com/aws/aws-sdk-go-v2/config v1.32.23/go.mod h1:QID4dqUQVgEOYPKsPWd1sNWCCR2c5g7o3jeEtIXPOZU= +github.com/aws/aws-sdk-go-v2/credentials v1.19.22 h1:SHfH6wyPsEgG7fVsi5rQxWEt7tuIcN2PGhb1mTFv6tE= +github.com/aws/aws-sdk-go-v2/credentials v1.19.22/go.mod h1:54nO8lKD4aQPOntM/VTWjnR+DYzTwx0YkSMZMhAgewQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.28 h1:b+kcDejJrXc30zU/w8Tc9klISwaO5wh+6T0sMBdDoHM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.28/go.mod h1:LnI62O9GnSv6GcuLXxOYqlq0C8EmxMcgnF6m7LdYuOY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.28 h1:Xf2j7NdVcUKomlZ4iihOP4AZ3Fzlr8h4yKpXeP+OFPg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.28/go.mod h1:O8cDo1dW63jU7ki//kRe1z+tLGcpnD1jrouitsQddDw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.28 h1:KqIfN9kpkKkcBqBbNpNGTIrXO6ExTUvFKvXkC+YAzVo= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.28/go.mod h1:uxtQiKvLtNS4iXVsH2McVD/ls8FKN/uUhe1hGxPjrw0= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.29 h1:VkE9FuzTQVjBBrnj4+oCdxCLFIz7aqLYKUCjtvxVcOs= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.29/go.mod h1:H32Z2Qth9b+9LqjyBsCnozMQ8H2N7YBUDVXwbs0iggg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 h1:ZD2+BSw9vFsNlKYIasSNt3uDbjqqXIBcM13UJv/Lx2k= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12/go.mod h1:Ms4zlcVBbXbiP7EVLhl+lgjvA/a7YphqQ3Ih3174EmI= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.21 h1:FsZxbPiVgEHYofziwfylouMki8b1Z7mI4CMU/7bhwBA= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.21/go.mod h1:Mmm30OV+JLXYQUcbSd84THnv3P5JtjhVDujLwMqRG0U= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.28 h1:axj4mEDletwKmTm/9jR+DkIMmCfcn5vE4jBMAAN+3Vg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.28/go.mod h1:3Aaz69M0jqfSHLKqxgolgUBFT4hpwSNc7DzC95orEi8= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.28 h1:li8rTZAAb22g4UsxbjwMdaNVWbgVcDzPqI7nDTI+mF4= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.28/go.mod h1:/brXioSGIMEdcBFoubpSdmighSVp6poP+mma/wB7iHA= +github.com/aws/aws-sdk-go-v2/service/s3 v1.103.2 h1:b4ikkRk22T4xYkEgaWc3Voe+3xbt5YbbFhNehOWyUiY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.103.2/go.mod h1:Gp7eHZ0NZ8ZK5RXpoIUp/C8OeAmJqpCgdwEK1D/QOek= +github.com/aws/aws-sdk-go-v2/service/signin v1.1.4 h1:YcpVyIPLCbiypN6KSphijN5fC7DDjX114SqA7prnnxg= +github.com/aws/aws-sdk-go-v2/service/signin v1.1.4/go.mod h1:5ZICS++oFTRPfa1GsBqFDWX/8WamZ/QQOcCzIuU/zLw= +github.com/aws/aws-sdk-go-v2/service/sso v1.31.2 h1:ySNWu7TPmj5fKFIa1GYvX+Ddxd5ccruqC20aMNuyWDM= +github.com/aws/aws-sdk-go-v2/service/sso v1.31.2/go.mod h1:A+U9luAOwFeB1kseyWCITVg7/NntoPebCFR9pQ4ch9A= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.5 h1:KSzGGqfk39O+WU3OEyYbx6F7sLDQCqxlOJ+2IksfK6U= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.5/go.mod h1:ATs88lXDeQB6CZOgQ5BIl9JbYS+EsCWUSDyff6L/oVo= +github.com/aws/aws-sdk-go-v2/service/sts v1.43.2 h1:RTO7mmGyedgnNmcPh3yQizNfc6GKoV5iqfdJavuf9vw= +github.com/aws/aws-sdk-go-v2/service/sts v1.43.2/go.mod h1:fBhUZXDin9YYqhcpOMjIcpdik25rVwWyxLdPH1RZd9s= +github.com/aws/smithy-go v1.27.1 h1:4T340VFndXtADGF52gYa1POyL7s9E4Z1OeZ1hCscIw8= +github.com/aws/smithy-go v1.27.1/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o= @@ -121,7 +120,6 @@ github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= -github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/brianvoe/gofakeit/v6 v6.28.0 h1:Xib46XXuQfmlLS2EXRuJpqcw8St6qSZz75OUo0tgAW4= github.com/brianvoe/gofakeit/v6 v6.28.0/go.mod h1:Xj58BMSnFqcn/fAQeSK+/PLtC5kSb7FJIq4JyGa8vEs= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= @@ -170,9 +168,6 @@ github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2 github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k= github.com/charmbracelet/x/xpty v0.1.2 h1:Pqmu4TEJ8KeA9uSkISKMU3f+C1F6OGBn8ABuGlqCbtI= github.com/charmbracelet/x/xpty v0.1.2/go.mod h1:XK2Z0id5rtLWcpeNiMYBccNNBrP2IJnzHI0Lq13Xzq4= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8= github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0= github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk= @@ -238,9 +233,6 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo= github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C6POAuiViluc= -github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58= -github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 h1:PRxIJD8XjimM5aTknUK9w6DHLDox2r2M3DI4i2pnd3w= -github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936/go.mod h1:ttYvX5qlB+mlV1okblJqcSMtR4c52UKxDiX9GRBS8+Q= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elliotchance/orderedmap/v3 v3.1.0 h1:j4DJ5ObEmMBt/lcwIecKcoRxIQUEnw0L804lXYDt/pg= @@ -261,16 +253,12 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frostbyte73/core v0.1.1 h1:ChhJOR7bAKOCPbA+lqDLE2cGKlCG5JXsDvvQr4YaJIA= github.com/frostbyte73/core v0.1.1/go.mod h1:mhfOtR+xWAvwXiwor7jnqPMnu4fxbv1F2MwZ0BEpzZo= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho= github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/gammazero/deque v1.2.1 h1:9fnQVFCCZ9/NOc7ccTNqzoKd1tCWOqeI05/lPqFPMGQ= github.com/gammazero/deque v1.2.1/go.mod h1:5nSFkzVm+afG9+gy0VIowlqVAW4N8zNcMne+CMQVD2g= -github.com/getkin/kin-openapi v0.135.0 h1:751SjYfbiwqukYuVjwYEIKNfrSwS5YpA7DZnKSwQgtg= -github.com/getkin/kin-openapi v0.135.0/go.mod h1:6dd5FJl6RdX4usBtFBaQhk9q62Yb2J0Mk5IhUO/QqFI= github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -278,23 +266,14 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= -github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= -github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= -github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= -github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvAu+voFM= -github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-task/task/v3 v3.51.1 h1:vu73GWym90MT9tDdUZthkEF5XHQKOfvrxTT5uH1E2t8= github.com/go-task/task/v3 v3.51.1/go.mod h1:qiC1MCFPfGkRunIKqFbl6ybbns1OR34EkJ3Mb6+Jm7U= github.com/go-task/template v0.2.0 h1:xW7ek0o65FUSTbKcSNeg2Vyf/I7wYXFgLUznptvviBE= github.com/go-task/template v0.2.0/go.mod h1:dbdoUb6qKnHQi1y6o+IdIrs0J4o/SEhSTA6bbzZmdtc= -github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -303,23 +282,10 @@ github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63Y github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/cel-go v0.28.1 h1:YWIwi77J4xIsYUwAF/iIuS6haffzIHS8yWI8glSbLWM= github.com/google/cel-go v0.28.1/go.mod h1:X0bD6iVNR8pkROSOoHVdgTkzmRcosof7WQqCD6wcMc8= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= @@ -331,17 +297,16 @@ github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+ github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE= github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.14 h1:yh8ncqsbUY4shRD5dA6RlzjJaT4hi3kII+zYw8wmLb8= -github.com/googleapis/enterprise-certificate-proxy v0.3.14/go.mod h1:vqVt9yG9480NtzREnTlmGSBmFrA+bzb0yl0TxoBQXOg= -github.com/googleapis/gax-go/v2 v2.21.0 h1:h45NjjzEO3faG9Lg/cFrBh2PgegVVgzqKzuZl/wMbiI= -github.com/googleapis/gax-go/v2 v2.21.0/go.mod h1:But/NJU6TnZsrLai/xBAQLLz+Hc7fHZJt/hsCz3Fih4= +github.com/googleapis/enterprise-certificate-proxy v0.3.16 h1:F/VPrx0YPBdksZJQdCAp0WUsqnNmZpUZszzfYt0M5Dw= +github.com/googleapis/enterprise-certificate-proxy v0.3.16/go.mod h1:9Yb0eAkH/Xqhvv3zbeKf/+wMJqCeocWc6KIhDvEAuYE= +github.com/googleapis/gax-go/v2 v2.22.0 h1:PjIWBpgGIVKGoCXuiCoP64altEJCj3/Ei+kSU5vlZD4= +github.com/googleapis/gax-go/v2 v2.22.0/go.mod h1:irWBbALSr0Sk3qlqb9SyJ1h68WjgeFuiOzI4Rqw5+aY= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk= @@ -360,17 +325,12 @@ github.com/hashicorp/go-version v1.9.0 h1:CeOIz6k+LoN3qX9Z0tyQrPtiB1DFYRPfCIBtaX github.com/hashicorp/go-version v1.9.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/in-toto/attestation v1.1.2 h1:MBFn6lsMq6dptQZJBhalXTcWMb/aJy3V+GX3VYj/V1E= github.com/in-toto/attestation v1.1.2/go.mod h1:gYFddHMZj3DiQ0b62ltNi1Vj5rC879bTmBbrv9CRHpM= github.com/in-toto/in-toto-golang v0.11.0 h1:nfidMYBFx+E0lnmX5KUnN2Pdm8zdNKal1ayjJuzzRoA= github.com/in-toto/in-toto-golang v0.11.0/go.mod h1:u3PjTnwFKjp5a1YCcw8SJg0G+tMeKfVoWsWeFMDCMtw= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/jxskiss/base62 v1.1.0 h1:A5zbF8v8WXx2xixnAKD2w+abC+sIzYJX+nxmhA6HWFw= github.com/jxskiss/base62 v1.1.0/go.mod h1:HhWAlUXvxKThfOlZbcuFzsqwtF5TcqS9ru3y5GfjWAc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -390,12 +350,14 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lithammer/shortuuid/v4 v4.2.0 h1:LMFOzVB3996a7b8aBuEXxqOBflbfPQAiVzkIcHO0h8c= github.com/lithammer/shortuuid/v4 v4.2.0/go.mod h1:D5noHZ2oFw/YaKCfGy0YxyE7M0wMbezmMjPdhyEFe6Y= +github.com/livekit/cloud-protocol v0.0.2-0.20260721210808-2227d3909b2d h1:OsB9z5JjnvPAzqZY7rXuieikCVSNWcWk8UgBiEcp9rE= +github.com/livekit/cloud-protocol v0.0.2-0.20260721210808-2227d3909b2d/go.mod h1:UAys4R7kd5NHSJvhHIKMmg63sN1ShKA4hxS6lPSQUyQ= github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731 h1:9x+U2HGLrSw5ATTo469PQPkqzdoU7be46ryiCDO3boc= github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ= github.com/livekit/mediatransportutil v0.0.0-20260605212259-862d4a7bcb1e h1:SkgQRcG2VYEhh80Qb/zYZo8rWKJzNfJcfUQnXe6su2M= github.com/livekit/mediatransportutil v0.0.0-20260605212259-862d4a7bcb1e/go.mod h1:o8CFmAdrVwzJNOCsQCLUzXRjokkufNshnQHOe4fRaqU= -github.com/livekit/protocol v1.49.1-0.20260712215709-8847d7456816 h1:MDWDlH5dmcZY4OSljwE4e6B39libPQJIEmBRYaeGAn0= -github.com/livekit/protocol v1.49.1-0.20260712215709-8847d7456816/go.mod h1:jO+y05AU9Ec4JswDyuzKCZ4bhziOS0CzMqgnbj60Dzs= +github.com/livekit/protocol v1.50.4 h1:Pzg9p1lpu9TcxUFJqIlUGNP6m7mX8PBT+ETxXRpnmZ8= +github.com/livekit/protocol v1.50.4/go.mod h1:jO+y05AU9Ec4JswDyuzKCZ4bhziOS0CzMqgnbj60Dzs= github.com/livekit/psrpc v0.7.2 h1:6oZ+NODJ2pLyaT6VqDq1F4Qc/3TpDUSpyphj/P9MhQc= github.com/livekit/psrpc v0.7.2/go.mod h1:rAI+m2+/cb4x9RXhLRtUx5ZwdfjjXOl4zi46IjEetaw= github.com/livekit/server-sdk-go/v2 v2.18.1 h1:/u0JVII+ErGCivHnAGr6di0wl0NYsfcRvDzEtTAFovo= @@ -404,8 +366,6 @@ github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magefile/mage v1.17.2 h1:fyXVu1eadI8Ap1HCCNgEhJ5McIWiYhLR8uol64ZZc40= github.com/magefile/mage v1.17.2/go.mod h1:Yj51kqllmsgFpvvSzgrZPK9WtluG3kUhFaBUVLo4feA= -github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8= -github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4= @@ -444,8 +404,6 @@ github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/modelcontextprotocol/go-sdk v1.6.1 h1:0zOSupjKUxPKSocPT1Wtago+mUHU2/uZ4xSOY0FGReU= github.com/modelcontextprotocol/go-sdk v1.6.1/go.mod h1:kzm3kzFL1/+AziGOE0nUs3gvPoNxMCvkxokMkuFapXQ= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/morikuni/aec v1.1.0 h1:vBBl0pUnvi/Je71dsRrhMBtreIqNMYErSAbEeb8jrXQ= github.com/morikuni/aec v1.1.0/go.mod h1:xDRgiq/iw5l+zkao76YTKzKttOp2cwPEne25HDkJnBw= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= @@ -462,32 +420,6 @@ github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg= github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oapi-codegen/nullable v1.1.0 h1:eAh8JVc5430VtYVnq00Hrbpag9PFRGWLjxR1/3KntMs= -github.com/oapi-codegen/nullable v1.1.0/go.mod h1:KUZ3vUzkmEKY90ksAmit2+5juDIhIZhfDl+0PwOQlFY= -github.com/oapi-codegen/oapi-codegen/v2 v2.7.1 h1:a7Ab7YlpqkVG5HKrTaeFstm32Z5QOnyjnbsCO0jiMYM= -github.com/oapi-codegen/oapi-codegen/v2 v2.7.1/go.mod h1:qzFy6iuobJw/hD1aRILee4G87/ShmhR0xYCwcUtZMCw= -github.com/oapi-codegen/runtime v1.4.2 h1:GMxFVYLzoYLua+/KvzgSphkyK1lLTReQI9Vf4hvATKE= -github.com/oapi-codegen/runtime v1.4.2/go.mod h1:GwV7hC2hviaMzj+ITfHVRESK5J2W/GefVwIND/bMGvU= -github.com/oasdiff/yaml v0.0.9 h1:zQOvd2UKoozsSsAknnWoDJlSK4lC0mpmjfDsfqNwX48= -github.com/oasdiff/yaml v0.0.9/go.mod h1:8lvhgJG4xiKPj3HN5lDow4jZHPlx1i7dIwzkdAo6oAM= -github.com/oasdiff/yaml3 v0.0.9 h1:rWPrKccrdUm8J0F3sGuU+fuh9+1K/RdJlWF7O/9yw2g= -github.com/oasdiff/yaml3 v0.0.9/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= @@ -504,10 +436,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= -github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= -github.com/pierrec/lz4/v4 v4.1.26 h1:GrpZw1gZttORinvzBdXPUXATeqlJjqUG/D87TKMnhjY= -github.com/pierrec/lz4/v4 v4.1.26/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= +github.com/pierrec/lz4/v4 v4.1.27 h1:+PhzhWDrjRj89TH2sw43nE3+4+W8lSxIuQadEHZyjUk= +github.com/pierrec/lz4/v4 v4.1.27/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= github.com/pion/datachannel v1.6.0 h1:XecBlj+cvsxhAMZWFfFcPyUaDZtd7IJvrXqlXD/53i0= github.com/pion/datachannel v1.6.0/go.mod h1:ur+wzYF8mWdC+Mkis5Thosk+u/VOL287apDNEbFpsIk= github.com/pion/dtls/v3 v3.1.4 h1:QhvtMflMfu9Kf0RcDC5BJBle4caPskByrKQR6uuYqpY= @@ -530,24 +460,24 @@ github.com/pion/sctp v1.10.0 h1:qeoD6swF/2M5bYRcAGayqSbTKX3m4AW29CiQxG1+Pfg= github.com/pion/sctp v1.10.0/go.mod h1:N20Dq6LY+JvJDAh9VVh1JELngb2rQ8dPgds5yBWiPgw= github.com/pion/sdp/v3 v3.0.19 h1:1VMKs3gIkTQV5M3hNKfTAPrDXSNrYtOlmOD8+mSZUGQ= github.com/pion/sdp/v3 v3.0.19/go.mod h1:dE5WOSlzXrtiE/iuZqe9n+AcEbOjtAd3k5m5NtlV/qU= -github.com/pion/srtp/v3 v3.0.11 h1:GiESUr54/K4UuPigfq/CvWUed80JenQAHXn0C2MQQIQ= -github.com/pion/srtp/v3 v3.0.11/go.mod h1:EeZOi/sd6glM1EXapg051gdNWO9yWT1YSsgQ4SlJkns= +github.com/pion/srtp/v3 v3.0.12 h1:U7V17bckl7sI4mb3sepiojByDuBY0wNCqQE+6IlQBbc= +github.com/pion/srtp/v3 v3.0.12/go.mod h1:EeZOi/sd6glM1EXapg051gdNWO9yWT1YSsgQ4SlJkns= github.com/pion/stun/v3 v3.1.5 h1:Y1FHlhaI6+4UoC5i/zQf4F7JvdZtB24/05oyy/GF1x8= github.com/pion/stun/v3 v3.1.5/go.mod h1:zRUghXSQU32Lx5orJsz3uYMkIihweXb3mu5gIns02fs= github.com/pion/transport/v3 v3.1.1 h1:Tr684+fnnKlhPceU+ICdrw6KKkTms+5qHMgw6bIkYOM= github.com/pion/transport/v3 v3.1.1/go.mod h1:+c2eewC5WJQHiAA46fkMMzoYZSuGzA/7E2FPrOYHctQ= github.com/pion/transport/v4 v4.0.2 h1:ifYlPqNwsy6aKQ9y8yzxXlHae5431ZrH2avkD/Rn6Tk= github.com/pion/transport/v4 v4.0.2/go.mod h1:06hFI+jCFcok2X2MekVufNZ/uzNZXivGBPfviSVcjgM= -github.com/pion/turn/v5 v5.0.9 h1:zNeBfRyzGn7MPyUTvmvxeltLEjlFdSLPT1tlakoaOXM= -github.com/pion/turn/v5 v5.0.9/go.mod h1:u3XjBqy2Z4+NhCUpDoOSsNuQDrPLvKStlCGWk6sTQ1E= +github.com/pion/turn/v5 v5.0.10 h1:mOMZjudflXpte5OsCnXztpUKwNXcpXIAzMBnq9TXOSQ= +github.com/pion/turn/v5 v5.0.10/go.mod h1:u3XjBqy2Z4+NhCUpDoOSsNuQDrPLvKStlCGWk6sTQ1E= github.com/pion/webrtc/v4 v4.2.15 h1:Ir/MauNFCfg+kgyBYPQLiGdVWFlzEcLxqtuzAkYkky0= github.com/pion/webrtc/v4 v4.2.15/go.mod h1:CPTcyLfIzC4scOkQ4UY4pj6WvbUGhcNLIpK28cP5h6M= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= -github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/planetscale/vtprotobuf v0.6.1-0.20250313105119-ba97887b0a25 h1:S1hI5JiKP7883xBzZAr1ydcxrKNSVNm7+3+JwjxZEsg= +github.com/planetscale/vtprotobuf v0.6.1-0.20250313105119-ba97887b0a25/go.mod h1:ZQntvDG8TkPgljxtA0R9frDoND4QORU1VXz015N5Ks4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -555,14 +485,14 @@ github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.68.1 h1:omjRRl4QP4komogpXuhfeOiisQg7xdy8VM1UY+pStaY= -github.com/prometheus/common v0.68.1/go.mod h1:ZzL3f6u94qUxh9p+tJTrF+FvBS1XXbbRAZCQkytAL0Y= +github.com/prometheus/common v0.69.0 h1:OA85nJQS/T/MaYh/Q2CcgDKSGWqNIgrBDvDH85CuiNk= +github.com/prometheus/common v0.69.0/go.mod h1:ZzL3f6u94qUxh9p+tJTrF+FvBS1XXbbRAZCQkytAL0Y= github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc= github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo= github.com/puzpuzpuz/xsync/v4 v4.5.0 h1:vOSWu6b57/emh+L/Cw0BeQfvxa/cogFywXHeGUxQxAg= github.com/puzpuzpuz/xsync/v4 v4.5.0/go.mod h1:VJDmTCJMBt8igNxnkQd86r+8KUeN1quSfNKu5bLYFQo= -github.com/redis/go-redis/v9 v9.20.0 h1:WnQYxLkgO2xiXTCJY0ldIiI8dNqCDlQAG+AtaH7a2a0= -github.com/redis/go-redis/v9 v9.20.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA= +github.com/redis/go-redis/v9 v9.21.0 h1:FPBE4hhbAke+TLmcY3WkpbDffJEomdqPn3HYiqAtL9E= +github.com/redis/go-redis/v9 v9.21.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rodaine/protogofakeit v0.1.1 h1:ZKouljuRM3A+TArppfBqnH8tGZHOwM/pjvtXe9DaXH8= @@ -575,11 +505,10 @@ github.com/sebdah/goldie/v2 v2.8.0 h1:dZb9wR8q5++oplmEiJT+U/5KyotVD+HNGCAc5gNr8r github.com/sebdah/goldie/v2 v2.8.0/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14= github.com/secure-systems-lab/go-securesystemslib v0.10.0/go.mod h1:MRKONWmRoFzPNQ9USRF9i1mc7MvAVvF1LlW8X5VWDvk= -github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= -github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= +github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= +github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/segmentio/encoding v0.5.4 h1:OW1VRern8Nw6ITAtwSZ7Idrl3MXCFwXHPgqESYfvNt0= github.com/segmentio/encoding v0.5.4/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= @@ -594,21 +523,15 @@ github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/spdx/tools-golang v0.5.7 h1:+sWcKGnhwp3vLdMqPcLdA6QK679vd86cK9hQWH3AwCg= github.com/spdx/tools-golang v0.5.7/go.mod h1:jg7w0LOpoNAw6OxKEzCoqPC2GCTj45LyTlVmXubDsYw= -github.com/speakeasy-api/jsonpath v0.6.3 h1:c+QPwzAOdrWvzycuc9HFsIZcxKIaWcNpC+xhOW9rJxU= -github.com/speakeasy-api/jsonpath v0.6.3/go.mod h1:2cXloNuQ+RSXi5HTRaeBh7JEmjRXTiaKpFTdZiL7URI= -github.com/speakeasy-api/openapi v1.19.2 h1:md90tE71/M8jS3cuRlsuWP5Aed4xoG5PSRvXeZgCv/M= -github.com/speakeasy-api/openapi v1.19.2/go.mod h1:UfKa7FqE4jgexJZuj51MmdHAFGmDv0Zaw3+yOd81YKU= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= -github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= -github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= +github.com/spiffe/go-spiffe/v2 v2.7.0 h1:uXe1MflJoHw58wAUvxVlcM7WpKtijWG7I1UidcGh6g4= +github.com/spiffe/go-spiffe/v2 v2.7.0/go.mod h1:47Q0Q9/AqGha8QLHp+kxpH4Wca7X7EnOtlIJy3mxZ3U= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tonistiigi/fsutil v0.0.0-20251211185533-a2aa163d723f h1:Z4NEQ86qFl1mHuCu9gwcE+EYCwDKfXAYXZbdIXyxmEA= @@ -625,20 +548,14 @@ github.com/u-root/u-root v0.16.0 h1:wY40O83MBVks97+Is0WlFlOPSwKQMIrWP9R1IsrExg8= github.com/u-root/u-root v0.16.0/go.mod h1:yL/XdSSW27PdGLgUh4MNRBy54mKM+TBLzpwiB4nwj90= github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 h1:pyC9PaHYZFgEKFdlp3G8RaCKgVpHZnecvArXvPXcFkM= github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701/go.mod h1:P3a5rG4X7tI17Nn3aOIAYr5HbIMukwXG0urG0WuL8OA= -github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= -github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY= github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli/v3 v3.9.0 h1:AV9lIiPv3ukYnxunaCUsHnEozptYmDN2F0+yWqLMn/c= github.com/urfave/cli/v3 v3.9.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/vbatts/tar-split v0.12.2 h1:w/Y6tjxpeiFMR47yzZPlPj/FcPLpXbTUi/9H7d3CPa4= github.com/vbatts/tar-split v0.12.2/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA= -github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= -github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU= github.com/wlynxg/anet v0.0.5/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= -github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQsBgUlc= -github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= @@ -655,10 +572,10 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/detectors/gcp v1.43.0 h1:62yY3dT7/ShwOxzA0RsKRgshBmfElKI4d/Myu2OxDFU= -go.opentelemetry.io/contrib/detectors/gcp v1.43.0/go.mod h1:RyaZMFY7yi1kAs45S6mbFGz8O8rqB0dTY14uzvG4LCs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 h1:0Qx7VGBacMm9ZENQ7TnNObTYI4ShC+lHI16seduaxZo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0/go.mod h1:Sje3i3MjSPKTSPvVWCaL8ugBzJwik3u4smCjUeuupqg= +go.opentelemetry.io/contrib/detectors/gcp v1.44.0 h1:NmLfL734pJhM0JKaYd2Y28+nY9dPRWYAAbxhRCrKXPw= +go.opentelemetry.io/contrib/detectors/gcp v1.44.0/go.mod h1:tNAsgd8avTGke1+MndXlU5Cru4PQ9Ai/cCNWQv/ZJ/s= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0 h1:2yEATaop1/a1I4psnSLgWVPLWwCzkqWakgJy7xTDVy0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0/go.mod h1:D7J12YRapIekYyPWgGPlA/23pRmpSEZC5xJC/TTLI9U= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 h1:cuXaPAfIoJKsYjBjPSb2nKZEmgM43zVr25l37IxhKME= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0/go.mod h1:BuzhPofpCzlDi/Q/Xjg54M4/3oWqqyDe2Zeq7A2I0QE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 h1:8tvICD4vSTOOsNrsI4Ljf6C+6UKvpTEH5XY3JMoyPoo= @@ -667,8 +584,8 @@ go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 h1:4YsVu3B8+3qtWYYrsUYgn0OG78pN0rnNPRGX4SbokQI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0/go.mod h1:+wnlSn0mD1ADVMe3v9Z/WIaiz6q6gL2J/ejaAmdmv80= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.42.0 h1:lSZHgNHfbmQTPfuTmWVkEu8J8qXaQwuV30pjCcAUvP8= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.42.0/go.mod h1:so9ounLcuoRDu033MW/E0AD4hhUjVqswrMF5FoZlBcw= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0 h1:TC+BewnDpeiAmcscXbGMfxkO+mwYUwE/VySwvw88PfA= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0/go.mod h1:J/ZyF4vfPwsSr9xJSPyQ4LqtcTPULFR64KwTikGLe+A= go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= go.opentelemetry.io/otel/metric/x v0.66.0 h1:YkCrx1zLOChi9ZcZ6euupOcsgzbVlec7D/xoEU1+cTA= @@ -700,56 +617,36 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= -golang.org/x/exp v0.0.0-20260603202125-055de637280b h1:v1uXiEBHo8QA0LiGCo7UgHMzHT4Kdfpl2zmtH5vaP1Q= -golang.org/x/exp v0.0.0-20260603202125-055de637280b/go.mod h1:d2fgXJLVs4dYDHUk5lwMIfzRzSrWCfGZb0ZqeLa/Vcw= +golang.org/x/exp v0.0.0-20260611194520-c48552f49976 h1:X8Hz2ImujgbmetVuW+w2YkyZChE3cBpZi2P158rTG9M= +golang.org/x/exp v0.0.0-20260611194520-c48552f49976/go.mod h1:vnf4pv9iKZXY58sQE1L86zmNWJ4159e1RkcWiLCkeEY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ= golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o= golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc= golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= @@ -757,7 +654,6 @@ golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.46.0 h1:7jTurBkPZu4moS/Uy4OQT1M+QBlsj3wejyZwsT8Z7rk= golang.org/x/tools v0.46.0/go.mod h1:FrD85F8l+NWL+9XWBSyVSHO6Ne4jutsfIFba7AWQ5Ys= @@ -767,43 +663,26 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/api v0.275.0 h1:vfY5d9vFVJeWEZT65QDd9hbndr7FyZ2+6mIzGAh71NI= -google.golang.org/api v0.275.0/go.mod h1:Fnag/EWUPIcJXuIkP1pjoTgS5vdxlk3eeemL7Do6bvw= -google.golang.org/genproto v0.0.0-20260406210006-6f92a3bedf2d h1:N1Ec54vZnIPd7MnxRiYLW+oY4fDR4BOS/LrssdD9+ek= -google.golang.org/genproto v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:c2hJ1grtnH0xUiEKGDGkjGNTJ1Hy2LrblyKOHF0sqRM= -google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8= -google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/api v0.283.0 h1:0lkp8u0MPwJVHqRL+nJlMAoZVVzbmiXmFHXMOTmSPik= +google.golang.org/api v0.283.0/go.mod h1:6Wssta4c5n9qHq5CBhmlai5h/PUa1djdDAIhYEHyvcM= +google.golang.org/genproto v0.0.0-20260526163538-3dc84a4a5aaa h1:mfj8IS4EA4VAR9a6QDVxTQkLY64iBybb5QI1B4pXrpE= +google.golang.org/genproto v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:fuT7yonGw1Iq2oa+YC0fyqPPQJkgo/54gPNC6VitOkI= +google.golang.org/genproto/googleapis/api v0.0.0-20260622175928-b703f567277d h1:xr2lwHI91bn3UiXcnyzRMQjp2LRiM8wEHzwUaE0YhTs= +google.golang.org/genproto/googleapis/api v0.0.0-20260622175928-b703f567277d/go.mod h1:O0ZOWSrfWfJ+Z5HbwZ+wNtHsg/vk1k2C/w67eww8PfQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260622175928-b703f567277d h1:mpAgMyM9vQHxycBlDq50y1VHpfSfVwzXvrQKtYbXuUY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260622175928-b703f567277d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.81.1 h1:VnnIIZ88UzOOKLukQi+ImGz8O1Wdp8nAGGnvOfEIWQQ= google.golang.org/grpc v1.81.1/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI= -google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= diff --git a/magefile.go b/magefile.go new file mode 100644 index 000000000..9890c537a --- /dev/null +++ b/magefile.go @@ -0,0 +1,211 @@ +//go:build mage + +// Command mage is the build system for livekit-cli. Run targets with +// `go tool mage ` (mage is pinned as a go.mod tool dependency, so no +// separate install is needed), e.g. `go tool mage build` or `go tool mage generate`. +// +// The Makefile is retained as a thin shim that delegates here: GitHub's default +// CodeQL setup uses C/C++ autobuild, which detects the Makefile and runs it, +// tracing the cgo compilation of the vendored PortAudio + WebRTC APM. Keeping +// `make` -> `mage build` preserves that while making mage the source of truth. +package main + +import ( + "fmt" + "io" + "os" + "os/exec" + "path/filepath" + "runtime" + "strings" +) + +// Default target when `mage` is run with no arguments. +var Default = Build + +const binDir = "bin" + +// Build compiles the lk binary. This is a cgo build (CGO_ENABLED=1) that links +// the vendored PortAudio + WebRTC APM C/C++, and is the same artifact CodeQL's +// autobuild traces via the Makefile shim. +func Build() error { + // The PortAudio C source lives in a submodule; init it so fresh clones (and + // CodeQL checkouts) build. + if err := run(nil, "git", "submodule", "update", "--init", "--recursive"); err != nil { + return err + } + return run([]string{"CGO_ENABLED=1"}, "go", "build", "-o", filepath.Join(binDir, exe("lk")), "./cmd/lk") +} + +// Install builds lk and installs it to GOBIN, with a `livekit-cli` alias for the +// legacy binary name. +func Install() error { + if err := Build(); err != nil { + return err + } + gobin, err := goBin() + if err != nil { + return err + } + dst := filepath.Join(gobin, exe("lk")) + if err := copyFile(filepath.Join(binDir, exe("lk")), dst); err != nil { + return err + } + alias := filepath.Join(gobin, exe("livekit-cli")) + _ = os.Remove(alias) + if runtime.GOOS == "windows" { + return copyFile(dst, alias) + } + return os.Symlink(dst, alias) +} + +// Test runs the Go test suite. +func Test() error { return run(nil, "go", "test", "./...") } + +// Clean removes build artifacts. +func Clean() error { return os.RemoveAll(binDir) } + +// Generate regenerates the LiveKit Public API Connect client from the protobufs +// under protobufs/livekit/publicapi into pkg/gen. It runs protoc with the +// protoc-gen-go and protoc-gen-connect-go plugins pinned via go.mod tool +// directives (built on the fly into bin/), mirroring the public-api-server's +// buf setup so the generated package layout matches the future published Go +// library. The livekit/protocol proto imports (used by the simulations service) +// are resolved from the github.com/livekit/protocol module in go.mod, so they +// always match the generated Go types the CLI already depends on. +// +// Requires a local `protoc` (e.g. `brew install protobuf`); the generated Go is +// committed, so only regeneration needs it. +func Generate() error { + if _, err := exec.LookPath("protoc"); err != nil { + return fmt.Errorf("protoc not found on PATH; install it (e.g. `brew install protobuf`)") + } + if err := os.MkdirAll(binDir, 0o755); err != nil { + return err + } + // Build the codegen plugins from the pinned tool dependencies into bin/. + for _, pkg := range []string{ + "google.golang.org/protobuf/cmd/protoc-gen-go", + "connectrpc.com/connect/cmd/protoc-gen-connect-go", + } { + if err := run(nil, "go", "build", "-o", filepath.Join(binDir, exe(filepath.Base(pkg))), pkg); err != nil { + return fmt.Errorf("build plugin %s: %w", pkg, err) + } + } + + // Resolve third-party proto import roots from their Go modules (version-matched + // to go.mod), rather than vendoring them: livekit/protocol (livekit_*.proto, + // used by projects/simulations) and livekit/cloud-protocol (pii.proto, used by + // projects). Both are imported flat, so the module dir goes straight on -I. + protoModDir, err := output("go", "list", "-m", "-f", "{{.Dir}}", "github.com/livekit/protocol") + if err != nil { + return fmt.Errorf("locate github.com/livekit/protocol: %w", err) + } + protocolProtos := filepath.Join(protoModDir, "protobufs") + + cloudProtoDir, err := output("go", "list", "-m", "-f", "{{.Dir}}", "github.com/livekit/cloud-protocol") + if err != nil { + return fmt.Errorf("locate github.com/livekit/cloud-protocol: %w", err) + } + + // go_package mappings for the publicapi protos (they carry no go_package + // option — managed by buf upstream — so map each here to our pkg/gen path, + // matching the server's v1 / v1connect package names). + const goPrefix = "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi" + domains := []string{"common", "projects", "users", "workspaces", "analytics", "simulations"} + mappings := make([]string, 0, len(domains)) + for _, d := range domains { + mappings = append(mappings, fmt.Sprintf("Mlivekit/publicapi/%s/v1/%s.proto=%s/%s/v1;%sv1", d, d, goPrefix, d, d)) + } + mopt := strings.Join(mappings, ",") + + protos, err := filepath.Glob("protobufs/livekit/publicapi/*/v1/*.proto") + if err != nil { + return err + } + if len(protos) == 0 { + return fmt.Errorf("no protos found under protobufs/livekit/publicapi") + } + + if err := os.RemoveAll("pkg/gen"); err != nil { + return err + } + if err := os.MkdirAll("pkg/gen", 0o755); err != nil { + return err + } + + absBin, err := filepath.Abs(binDir) + if err != nil { + return err + } + args := []string{ + "-I", "protobufs", + "-I", protocolProtos, + "-I", cloudProtoDir, + "--go_out=pkg/gen", "--go_opt=paths=source_relative," + mopt, + "--connect-go_out=pkg/gen", "--connect-go_opt=paths=source_relative," + mopt, + } + args = append(args, protos...) + + fmt.Println("generating Connect client: protobufs/livekit/publicapi -> pkg/gen ...") + // Put bin/ first on PATH so protoc finds the pinned plugins we just built. + return run([]string{"PATH=" + absBin + string(os.PathListSeparator) + os.Getenv("PATH")}, "protoc", args...) +} + +// --- helpers --- + +func exe(name string) string { + if runtime.GOOS == "windows" { + return name + ".exe" + } + return name +} + +func run(extraEnv []string, name string, args ...string) error { + cmd := exec.Command(name, args...) + cmd.Stdout, cmd.Stderr, cmd.Stdin = os.Stdout, os.Stderr, os.Stdin + if extraEnv != nil { + cmd.Env = append(os.Environ(), extraEnv...) + } + return cmd.Run() +} + +func output(name string, args ...string) (string, error) { + out, err := exec.Command(name, args...).Output() + return strings.TrimSpace(string(out)), err +} + +func goBin() (string, error) { + gobin, err := output("go", "env", "GOBIN") + if err != nil { + return "", err + } + if gobin != "" { + return gobin, nil + } + gopath, err := output("go", "env", "GOPATH") + if err != nil { + return "", err + } + return filepath.Join(gopath, "bin"), nil +} + +func copyFile(src, dst string) error { + in, err := os.Open(src) + if err != nil { + return err + } + defer in.Close() + if err := os.MkdirAll(filepath.Dir(dst), 0o755); err != nil { + return err + } + out, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o755) + if err != nil { + return err + } + if _, err := io.Copy(out, in); err != nil { + out.Close() + return err + } + return out.Close() +} diff --git a/pkg/agentfs/docker.go b/pkg/agentfs/docker.go index 7f1f2e6b3..b23d39b39 100644 --- a/pkg/agentfs/docker.go +++ b/pkg/agentfs/docker.go @@ -202,7 +202,7 @@ func validateEntrypoint(dir string, dockerfileContent []byte, dockerignoreConten newEntrypoint = util.ToUnixPath(selected) } - fmt.Printf("Using entrypoint file [%s]\n", util.Accented(newEntrypoint)) + util.Statusf("Using entrypoint file [%s]", util.Accented(newEntrypoint)) tpl := template.Must(template.New("Dockerfile").Parse(string(dockerfileContent))) buf := &bytes.Buffer{} diff --git a/pkg/bootstrap/bootstrap.go b/pkg/bootstrap/bootstrap.go index 5fbd7026f..6363b0f7c 100644 --- a/pkg/bootstrap/bootstrap.go +++ b/pkg/bootstrap/bootstrap.go @@ -41,6 +41,7 @@ import ( "gopkg.in/yaml.v3" authutil "github.com/livekit/livekit-cli/v2/pkg/auth" + "github.com/livekit/livekit-cli/v2/pkg/util" ) const ( @@ -300,8 +301,8 @@ func PrintDotEnv(envMap map[string]string) error { if err != nil { return err } - _, err = fmt.Println(envContents) - return err + util.Result(envContents) + return nil } // ReadDotEnv reads filePath under rootDir as a dotenv file. Returns (nil, nil) diff --git a/pkg/config/config.go b/pkg/config/config.go index 254759359..211c793aa 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -63,10 +63,31 @@ type UserConfig struct { // ProjectConfig it carries no API key/secret: requests are authorized with the // user's session token and scoped to a project by id. type UserProjectConfig struct { - ProjectId string `yaml:"project_id"` - Name string `yaml:"name,omitempty"` - Subdomain string `yaml:"subdomain,omitempty"` - URL string `yaml:"url,omitempty"` + ProjectId string `yaml:"project_id" json:"id"` + Name string `yaml:"name,omitempty" json:"name,omitempty"` + // Alias is a URL-safe handle derived from Name (deduplicated with a numeric + // suffix), so a project can be referenced by a short, typeable name. + Alias string `yaml:"alias,omitempty" json:"alias,omitempty"` + Subdomain string `yaml:"subdomain,omitempty" json:"subdomain,omitempty"` + URL string `yaml:"url,omitempty" json:"url,omitempty"` +} + +// FindProject returns the cached project matching ref by ProjectId or +// (case-insensitively) by Name/alias, or nil if none matches. Used to resolve +// the --project flag against the user's project cache in user-auth mode. +func (u *UserConfig) FindProject(ref string) *UserProjectConfig { + if u == nil || ref == "" { + return nil + } + for i := range u.Projects { + p := &u.Projects[i] + if p.ProjectId == ref || + (p.Name != "" && strings.EqualFold(p.Name, ref)) || + (p.Alias != "" && strings.EqualFold(p.Alias, ref)) { + return p + } + } + return nil } // SessionValid reports whether the user has a session token that has not @@ -227,7 +248,7 @@ func LoadOrCreate() (*CLIConfig, error) { } else if s.Mode().Perm()&0077 != 0 { // because this file contains private keys, warn that // only the owner should have permission to access it - fmt.Fprintf(os.Stderr, "WARNING: config file %s should have permissions %o\n", configPath, 0600) + util.Warnf("WARNING: config file %s should have permissions %o", configPath, 0600) } content, err := os.ReadFile(configPath) @@ -271,12 +292,23 @@ func (c *CLIConfig) RemoveProject(name string) error { return err } - fmt.Println("Removed project", name) + util.Status("Removed project", name) return nil } func (c *CLIConfig) PersistIfNeeded() error { - if len(c.Projects) == 0 && c.Theme == "" && !c.hasPersisted { + return c.persist(true) +} + +// PersistQuietly writes the config without printing the "Saved CLI config" +// notice. Use it for background updates (e.g. refreshing the project cache) that +// shouldn't announce themselves — and must not pollute stdout/JSON output. +func (c *CLIConfig) PersistQuietly() error { + return c.persist(false) +} + +func (c *CLIConfig) persist(announce bool) error { + if len(c.Projects) == 0 && len(c.Users) == 0 && c.Theme == "" && !c.hasPersisted { // nothing worth persisting yet return nil } @@ -297,7 +329,9 @@ func (c *CLIConfig) PersistIfNeeded() error { if err = os.WriteFile(configPath, data, 0600); err != nil { return err } - fmt.Printf("Saved CLI config to [%s]\n", util.Accented(configPath)) + if announce { + util.Statusf("Saved CLI config to [%s]", util.Accented(configPath)) + } c.hasPersisted = true return nil } diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 4b035d319..910791a9e 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -62,6 +62,25 @@ func TestCLIConfigGetUser(t *testing.T) { assert.Equal(t, "p_abc", c.Users[0].Projects[0].ProjectId) } +func TestUserConfigFindProject(t *testing.T) { + u := &UserConfig{ + Projects: []UserProjectConfig{ + {ProjectId: "p_abc", Name: "My App"}, + {ProjectId: "p_def", Name: "other"}, + }, + } + + // by id + assert.Equal(t, "p_abc", u.FindProject("p_abc").ProjectId) + // by name/alias (case-insensitive) + assert.Equal(t, "p_abc", u.FindProject("my app").ProjectId) + assert.Equal(t, "p_def", u.FindProject("other").ProjectId) + // misses + assert.Nil(t, u.FindProject("nope")) + assert.Nil(t, u.FindProject("")) + assert.Nil(t, (*UserConfig)(nil).FindProject("p_abc")) +} + func TestCLIConfigUpsertUser(t *testing.T) { c := &CLIConfig{ Users: []UserConfig{ diff --git a/pkg/config/livekit.go b/pkg/config/livekit.go index 5fd1d44cf..42bc918af 100644 --- a/pkg/config/livekit.go +++ b/pkg/config/livekit.go @@ -81,7 +81,7 @@ func (c *LiveKitTOML) SaveTOMLFile(dir string, tomlFileName string) error { if err := encoder.Encode(c); err != nil { return fmt.Errorf("error encoding TOML: %w", err) } - fmt.Printf("Saving config file [%s]\n", util.Accented(tomlFileName)) + util.Statusf("Saving config file [%s]", util.Accented(tomlFileName)) return nil } diff --git a/pkg/gen/livekit/publicapi/analytics/v1/analytics.pb.go b/pkg/gen/livekit/publicapi/analytics/v1/analytics.pb.go new file mode 100644 index 000000000..635a61746 --- /dev/null +++ b/pkg/gen/livekit/publicapi/analytics/v1/analytics.pb.go @@ -0,0 +1,493 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.12 +// protoc v7.35.1 +// source: livekit/publicapi/analytics/v1/analytics.proto + +package analyticsv1 + +import ( + v1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// SessionStatus is the lifecycle state of a session. +type SessionStatus int32 + +const ( + SessionStatus_SESSION_STATUS_UNSPECIFIED SessionStatus = 0 + SessionStatus_SESSION_STATUS_ACTIVE SessionStatus = 1 + SessionStatus_SESSION_STATUS_CLOSED SessionStatus = 2 +) + +// Enum value maps for SessionStatus. +var ( + SessionStatus_name = map[int32]string{ + 0: "SESSION_STATUS_UNSPECIFIED", + 1: "SESSION_STATUS_ACTIVE", + 2: "SESSION_STATUS_CLOSED", + } + SessionStatus_value = map[string]int32{ + "SESSION_STATUS_UNSPECIFIED": 0, + "SESSION_STATUS_ACTIVE": 1, + "SESSION_STATUS_CLOSED": 2, + } +) + +func (x SessionStatus) Enum() *SessionStatus { + p := new(SessionStatus) + *p = x + return p +} + +func (x SessionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SessionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_livekit_publicapi_analytics_v1_analytics_proto_enumTypes[0].Descriptor() +} + +func (SessionStatus) Type() protoreflect.EnumType { + return &file_livekit_publicapi_analytics_v1_analytics_proto_enumTypes[0] +} + +func (x SessionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SessionStatus.Descriptor instead. +func (SessionStatus) EnumDescriptor() ([]byte, []int) { + return file_livekit_publicapi_analytics_v1_analytics_proto_rawDescGZIP(), []int{0} +} + +// Session is one analytics session row. A representative subset of the former +// REST `Session` schema — the full field set can be filled in incrementally. +type Session struct { + state protoimpl.MessageState `protogen:"open.v1"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + RoomName string `protobuf:"bytes,2,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"` + Status SessionStatus `protobuf:"varint,3,opt,name=status,proto3,enum=livekit.publicapi.analytics.v1.SessionStatus" json:"status,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + EndedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"` + BandwidthIn int64 `protobuf:"varint,6,opt,name=bandwidth_in,json=bandwidthIn,proto3" json:"bandwidth_in,omitempty"` + BandwidthOut int64 `protobuf:"varint,7,opt,name=bandwidth_out,json=bandwidthOut,proto3" json:"bandwidth_out,omitempty"` + NumParticipants int32 `protobuf:"varint,8,opt,name=num_participants,json=numParticipants,proto3" json:"num_participants,omitempty"` + Tags []string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Session) Reset() { + *x = Session{} + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Session) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Session) ProtoMessage() {} + +func (x *Session) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Session.ProtoReflect.Descriptor instead. +func (*Session) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_analytics_v1_analytics_proto_rawDescGZIP(), []int{0} +} + +func (x *Session) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +func (x *Session) GetRoomName() string { + if x != nil { + return x.RoomName + } + return "" +} + +func (x *Session) GetStatus() SessionStatus { + if x != nil { + return x.Status + } + return SessionStatus_SESSION_STATUS_UNSPECIFIED +} + +func (x *Session) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *Session) GetEndedAt() *timestamppb.Timestamp { + if x != nil { + return x.EndedAt + } + return nil +} + +func (x *Session) GetBandwidthIn() int64 { + if x != nil { + return x.BandwidthIn + } + return 0 +} + +func (x *Session) GetBandwidthOut() int64 { + if x != nil { + return x.BandwidthOut + } + return 0 +} + +func (x *Session) GetNumParticipants() int32 { + if x != nil { + return x.NumParticipants + } + return 0 +} + +func (x *Session) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +type ListProjectSessionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Page *v1.PageRequest `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListProjectSessionsRequest) Reset() { + *x = ListProjectSessionsRequest{} + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListProjectSessionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListProjectSessionsRequest) ProtoMessage() {} + +func (x *ListProjectSessionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListProjectSessionsRequest.ProtoReflect.Descriptor instead. +func (*ListProjectSessionsRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_analytics_v1_analytics_proto_rawDescGZIP(), []int{1} +} + +func (x *ListProjectSessionsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListProjectSessionsRequest) GetPage() *v1.PageRequest { + if x != nil { + return x.Page + } + return nil +} + +type ListProjectSessionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*Session `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + PageInfo *v1.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListProjectSessionsResponse) Reset() { + *x = ListProjectSessionsResponse{} + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListProjectSessionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListProjectSessionsResponse) ProtoMessage() {} + +func (x *ListProjectSessionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListProjectSessionsResponse.ProtoReflect.Descriptor instead. +func (*ListProjectSessionsResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_analytics_v1_analytics_proto_rawDescGZIP(), []int{2} +} + +func (x *ListProjectSessionsResponse) GetItems() []*Session { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListProjectSessionsResponse) GetPageInfo() *v1.PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +type GetSessionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSessionRequest) Reset() { + *x = GetSessionRequest{} + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionRequest) ProtoMessage() {} + +func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead. +func (*GetSessionRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_analytics_v1_analytics_proto_rawDescGZIP(), []int{3} +} + +func (x *GetSessionRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetSessionRequest) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +type GetSessionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSessionResponse) Reset() { + *x = GetSessionResponse{} + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionResponse) ProtoMessage() {} + +func (x *GetSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSessionResponse.ProtoReflect.Descriptor instead. +func (*GetSessionResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_analytics_v1_analytics_proto_rawDescGZIP(), []int{4} +} + +func (x *GetSessionResponse) GetSession() *Session { + if x != nil { + return x.Session + } + return nil +} + +var File_livekit_publicapi_analytics_v1_analytics_proto protoreflect.FileDescriptor + +const file_livekit_publicapi_analytics_v1_analytics_proto_rawDesc = "" + + "\n" + + ".livekit/publicapi/analytics/v1/analytics.proto\x12\x1elivekit.publicapi.analytics.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a(livekit/publicapi/common/v1/common.proto\"\x85\x03\n" + + "\aSession\x12\x1d\n" + + "\n" + + "session_id\x18\x01 \x01(\tR\tsessionId\x12\x1b\n" + + "\troom_name\x18\x02 \x01(\tR\broomName\x12E\n" + + "\x06status\x18\x03 \x01(\x0e2-.livekit.publicapi.analytics.v1.SessionStatusR\x06status\x129\n" + + "\n" + + "started_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x125\n" + + "\bended_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\aendedAt\x12!\n" + + "\fbandwidth_in\x18\x06 \x01(\x03R\vbandwidthIn\x12#\n" + + "\rbandwidth_out\x18\a \x01(\x03R\fbandwidthOut\x12)\n" + + "\x10num_participants\x18\b \x01(\x05R\x0fnumParticipants\x12\x12\n" + + "\x04tags\x18\t \x03(\tR\x04tags\"y\n" + + "\x1aListProjectSessionsRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12<\n" + + "\x04page\x18\x02 \x01(\v2(.livekit.publicapi.common.v1.PageRequestR\x04page\"\xa0\x01\n" + + "\x1bListProjectSessionsResponse\x12=\n" + + "\x05items\x18\x01 \x03(\v2'.livekit.publicapi.analytics.v1.SessionR\x05items\x12B\n" + + "\tpage_info\x18\x02 \x01(\v2%.livekit.publicapi.common.v1.PageInfoR\bpageInfo\"Q\n" + + "\x11GetSessionRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x1d\n" + + "\n" + + "session_id\x18\x02 \x01(\tR\tsessionId\"W\n" + + "\x12GetSessionResponse\x12A\n" + + "\asession\x18\x01 \x01(\v2'.livekit.publicapi.analytics.v1.SessionR\asession*e\n" + + "\rSessionStatus\x12\x1e\n" + + "\x1aSESSION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n" + + "\x15SESSION_STATUS_ACTIVE\x10\x01\x12\x19\n" + + "\x15SESSION_STATUS_CLOSED\x10\x022\x98\x02\n" + + "\x10AnalyticsService\x12\x8e\x01\n" + + "\x13ListProjectSessions\x12:.livekit.publicapi.analytics.v1.ListProjectSessionsRequest\x1a;.livekit.publicapi.analytics.v1.ListProjectSessionsResponse\x12s\n" + + "\n" + + "GetSession\x121.livekit.publicapi.analytics.v1.GetSessionRequest\x1a2.livekit.publicapi.analytics.v1.GetSessionResponseb\x06proto3" + +var ( + file_livekit_publicapi_analytics_v1_analytics_proto_rawDescOnce sync.Once + file_livekit_publicapi_analytics_v1_analytics_proto_rawDescData []byte +) + +func file_livekit_publicapi_analytics_v1_analytics_proto_rawDescGZIP() []byte { + file_livekit_publicapi_analytics_v1_analytics_proto_rawDescOnce.Do(func() { + file_livekit_publicapi_analytics_v1_analytics_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_publicapi_analytics_v1_analytics_proto_rawDesc), len(file_livekit_publicapi_analytics_v1_analytics_proto_rawDesc))) + }) + return file_livekit_publicapi_analytics_v1_analytics_proto_rawDescData +} + +var file_livekit_publicapi_analytics_v1_analytics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_livekit_publicapi_analytics_v1_analytics_proto_goTypes = []any{ + (SessionStatus)(0), // 0: livekit.publicapi.analytics.v1.SessionStatus + (*Session)(nil), // 1: livekit.publicapi.analytics.v1.Session + (*ListProjectSessionsRequest)(nil), // 2: livekit.publicapi.analytics.v1.ListProjectSessionsRequest + (*ListProjectSessionsResponse)(nil), // 3: livekit.publicapi.analytics.v1.ListProjectSessionsResponse + (*GetSessionRequest)(nil), // 4: livekit.publicapi.analytics.v1.GetSessionRequest + (*GetSessionResponse)(nil), // 5: livekit.publicapi.analytics.v1.GetSessionResponse + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*v1.PageRequest)(nil), // 7: livekit.publicapi.common.v1.PageRequest + (*v1.PageInfo)(nil), // 8: livekit.publicapi.common.v1.PageInfo +} +var file_livekit_publicapi_analytics_v1_analytics_proto_depIdxs = []int32{ + 0, // 0: livekit.publicapi.analytics.v1.Session.status:type_name -> livekit.publicapi.analytics.v1.SessionStatus + 6, // 1: livekit.publicapi.analytics.v1.Session.started_at:type_name -> google.protobuf.Timestamp + 6, // 2: livekit.publicapi.analytics.v1.Session.ended_at:type_name -> google.protobuf.Timestamp + 7, // 3: livekit.publicapi.analytics.v1.ListProjectSessionsRequest.page:type_name -> livekit.publicapi.common.v1.PageRequest + 1, // 4: livekit.publicapi.analytics.v1.ListProjectSessionsResponse.items:type_name -> livekit.publicapi.analytics.v1.Session + 8, // 5: livekit.publicapi.analytics.v1.ListProjectSessionsResponse.page_info:type_name -> livekit.publicapi.common.v1.PageInfo + 1, // 6: livekit.publicapi.analytics.v1.GetSessionResponse.session:type_name -> livekit.publicapi.analytics.v1.Session + 2, // 7: livekit.publicapi.analytics.v1.AnalyticsService.ListProjectSessions:input_type -> livekit.publicapi.analytics.v1.ListProjectSessionsRequest + 4, // 8: livekit.publicapi.analytics.v1.AnalyticsService.GetSession:input_type -> livekit.publicapi.analytics.v1.GetSessionRequest + 3, // 9: livekit.publicapi.analytics.v1.AnalyticsService.ListProjectSessions:output_type -> livekit.publicapi.analytics.v1.ListProjectSessionsResponse + 5, // 10: livekit.publicapi.analytics.v1.AnalyticsService.GetSession:output_type -> livekit.publicapi.analytics.v1.GetSessionResponse + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_livekit_publicapi_analytics_v1_analytics_proto_init() } +func file_livekit_publicapi_analytics_v1_analytics_proto_init() { + if File_livekit_publicapi_analytics_v1_analytics_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_publicapi_analytics_v1_analytics_proto_rawDesc), len(file_livekit_publicapi_analytics_v1_analytics_proto_rawDesc)), + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_livekit_publicapi_analytics_v1_analytics_proto_goTypes, + DependencyIndexes: file_livekit_publicapi_analytics_v1_analytics_proto_depIdxs, + EnumInfos: file_livekit_publicapi_analytics_v1_analytics_proto_enumTypes, + MessageInfos: file_livekit_publicapi_analytics_v1_analytics_proto_msgTypes, + }.Build() + File_livekit_publicapi_analytics_v1_analytics_proto = out.File + file_livekit_publicapi_analytics_v1_analytics_proto_goTypes = nil + file_livekit_publicapi_analytics_v1_analytics_proto_depIdxs = nil +} diff --git a/pkg/gen/livekit/publicapi/analytics/v1/analyticsv1connect/analytics.connect.go b/pkg/gen/livekit/publicapi/analytics/v1/analyticsv1connect/analytics.connect.go new file mode 100644 index 000000000..80d963a04 --- /dev/null +++ b/pkg/gen/livekit/publicapi/analytics/v1/analyticsv1connect/analytics.connect.go @@ -0,0 +1,141 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: livekit/publicapi/analytics/v1/analytics.proto + +package analyticsv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/analytics/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // AnalyticsServiceName is the fully-qualified name of the AnalyticsService service. + AnalyticsServiceName = "livekit.publicapi.analytics.v1.AnalyticsService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // AnalyticsServiceListProjectSessionsProcedure is the fully-qualified name of the + // AnalyticsService's ListProjectSessions RPC. + AnalyticsServiceListProjectSessionsProcedure = "/livekit.publicapi.analytics.v1.AnalyticsService/ListProjectSessions" + // AnalyticsServiceGetSessionProcedure is the fully-qualified name of the AnalyticsService's + // GetSession RPC. + AnalyticsServiceGetSessionProcedure = "/livekit.publicapi.analytics.v1.AnalyticsService/GetSession" +) + +// AnalyticsServiceClient is a client for the livekit.publicapi.analytics.v1.AnalyticsService +// service. +type AnalyticsServiceClient interface { + ListProjectSessions(context.Context, *connect.Request[v1.ListProjectSessionsRequest]) (*connect.Response[v1.ListProjectSessionsResponse], error) + GetSession(context.Context, *connect.Request[v1.GetSessionRequest]) (*connect.Response[v1.GetSessionResponse], error) +} + +// NewAnalyticsServiceClient constructs a client for the +// livekit.publicapi.analytics.v1.AnalyticsService service. By default, it uses the Connect protocol +// with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To +// use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() +// options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewAnalyticsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AnalyticsServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + analyticsServiceMethods := v1.File_livekit_publicapi_analytics_v1_analytics_proto.Services().ByName("AnalyticsService").Methods() + return &analyticsServiceClient{ + listProjectSessions: connect.NewClient[v1.ListProjectSessionsRequest, v1.ListProjectSessionsResponse]( + httpClient, + baseURL+AnalyticsServiceListProjectSessionsProcedure, + connect.WithSchema(analyticsServiceMethods.ByName("ListProjectSessions")), + connect.WithClientOptions(opts...), + ), + getSession: connect.NewClient[v1.GetSessionRequest, v1.GetSessionResponse]( + httpClient, + baseURL+AnalyticsServiceGetSessionProcedure, + connect.WithSchema(analyticsServiceMethods.ByName("GetSession")), + connect.WithClientOptions(opts...), + ), + } +} + +// analyticsServiceClient implements AnalyticsServiceClient. +type analyticsServiceClient struct { + listProjectSessions *connect.Client[v1.ListProjectSessionsRequest, v1.ListProjectSessionsResponse] + getSession *connect.Client[v1.GetSessionRequest, v1.GetSessionResponse] +} + +// ListProjectSessions calls livekit.publicapi.analytics.v1.AnalyticsService.ListProjectSessions. +func (c *analyticsServiceClient) ListProjectSessions(ctx context.Context, req *connect.Request[v1.ListProjectSessionsRequest]) (*connect.Response[v1.ListProjectSessionsResponse], error) { + return c.listProjectSessions.CallUnary(ctx, req) +} + +// GetSession calls livekit.publicapi.analytics.v1.AnalyticsService.GetSession. +func (c *analyticsServiceClient) GetSession(ctx context.Context, req *connect.Request[v1.GetSessionRequest]) (*connect.Response[v1.GetSessionResponse], error) { + return c.getSession.CallUnary(ctx, req) +} + +// AnalyticsServiceHandler is an implementation of the +// livekit.publicapi.analytics.v1.AnalyticsService service. +type AnalyticsServiceHandler interface { + ListProjectSessions(context.Context, *connect.Request[v1.ListProjectSessionsRequest]) (*connect.Response[v1.ListProjectSessionsResponse], error) + GetSession(context.Context, *connect.Request[v1.GetSessionRequest]) (*connect.Response[v1.GetSessionResponse], error) +} + +// NewAnalyticsServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewAnalyticsServiceHandler(svc AnalyticsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + analyticsServiceMethods := v1.File_livekit_publicapi_analytics_v1_analytics_proto.Services().ByName("AnalyticsService").Methods() + analyticsServiceListProjectSessionsHandler := connect.NewUnaryHandler( + AnalyticsServiceListProjectSessionsProcedure, + svc.ListProjectSessions, + connect.WithSchema(analyticsServiceMethods.ByName("ListProjectSessions")), + connect.WithHandlerOptions(opts...), + ) + analyticsServiceGetSessionHandler := connect.NewUnaryHandler( + AnalyticsServiceGetSessionProcedure, + svc.GetSession, + connect.WithSchema(analyticsServiceMethods.ByName("GetSession")), + connect.WithHandlerOptions(opts...), + ) + return "/livekit.publicapi.analytics.v1.AnalyticsService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case AnalyticsServiceListProjectSessionsProcedure: + analyticsServiceListProjectSessionsHandler.ServeHTTP(w, r) + case AnalyticsServiceGetSessionProcedure: + analyticsServiceGetSessionHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedAnalyticsServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedAnalyticsServiceHandler struct{} + +func (UnimplementedAnalyticsServiceHandler) ListProjectSessions(context.Context, *connect.Request[v1.ListProjectSessionsRequest]) (*connect.Response[v1.ListProjectSessionsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.analytics.v1.AnalyticsService.ListProjectSessions is not implemented")) +} + +func (UnimplementedAnalyticsServiceHandler) GetSession(context.Context, *connect.Request[v1.GetSessionRequest]) (*connect.Response[v1.GetSessionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.analytics.v1.AnalyticsService.GetSession is not implemented")) +} diff --git a/pkg/gen/livekit/publicapi/common/v1/common.pb.go b/pkg/gen/livekit/publicapi/common/v1/common.pb.go new file mode 100644 index 000000000..1de5ef1de --- /dev/null +++ b/pkg/gen/livekit/publicapi/common/v1/common.pb.go @@ -0,0 +1,304 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.12 +// protoc v7.35.1 +// source: livekit/publicapi/common/v1/common.proto + +package commonv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Error mirrors the JSON error envelope the REST surface used to return. Connect +// carries its own structured error model (code + message + details), so most +// handlers should prefer returning a *connect.Error; this message exists for +// endpoints that want to embed a structured error inside a normal response. +type Error struct { + state protoimpl.MessageState `protogen:"open.v1"` + Error *Error_Detail `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Error) Reset() { + *x = Error{} + mi := &file_livekit_publicapi_common_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_common_v1_common_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_common_v1_common_proto_rawDescGZIP(), []int{0} +} + +func (x *Error) GetError() *Error_Detail { + if x != nil { + return x.Error + } + return nil +} + +// PageInfo is the cursor-pagination metadata shared by every list response. +type PageInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Pass as `cursor` on the next request to fetch the following page. Empty on + // the last page. + NextCursor string `protobuf:"bytes,1,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"` + HasMore bool `protobuf:"varint,2,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PageInfo) Reset() { + *x = PageInfo{} + mi := &file_livekit_publicapi_common_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PageInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PageInfo) ProtoMessage() {} + +func (x *PageInfo) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_common_v1_common_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PageInfo.ProtoReflect.Descriptor instead. +func (*PageInfo) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_common_v1_common_proto_rawDescGZIP(), []int{1} +} + +func (x *PageInfo) GetNextCursor() string { + if x != nil { + return x.NextCursor + } + return "" +} + +func (x *PageInfo) GetHasMore() bool { + if x != nil { + return x.HasMore + } + return false +} + +// PageRequest is the shared cursor-pagination request fragment. Embed it in a +// list request. +type PageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Opaque cursor returned by a prior page (PageInfo.next_cursor). Empty starts + // from the beginning. + Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"` + // Maximum items to return; 0 lets the server pick a default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PageRequest) Reset() { + *x = PageRequest{} + mi := &file_livekit_publicapi_common_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PageRequest) ProtoMessage() {} + +func (x *PageRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_common_v1_common_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PageRequest.ProtoReflect.Descriptor instead. +func (*PageRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_common_v1_common_proto_rawDescGZIP(), []int{2} +} + +func (x *PageRequest) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +func (x *PageRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type Error_Detail struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Error_Detail) Reset() { + *x = Error_Detail{} + mi := &file_livekit_publicapi_common_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Error_Detail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error_Detail) ProtoMessage() {} + +func (x *Error_Detail) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_common_v1_common_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Error_Detail.ProtoReflect.Descriptor instead. +func (*Error_Detail) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_common_v1_common_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Error_Detail) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *Error_Detail) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_livekit_publicapi_common_v1_common_proto protoreflect.FileDescriptor + +const file_livekit_publicapi_common_v1_common_proto_rawDesc = "" + + "\n" + + "(livekit/publicapi/common/v1/common.proto\x12\x1blivekit.publicapi.common.v1\"\x80\x01\n" + + "\x05Error\x12?\n" + + "\x05error\x18\x01 \x01(\v2).livekit.publicapi.common.v1.Error.DetailR\x05error\x1a6\n" + + "\x06Detail\x12\x12\n" + + "\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"F\n" + + "\bPageInfo\x12\x1f\n" + + "\vnext_cursor\x18\x01 \x01(\tR\n" + + "nextCursor\x12\x19\n" + + "\bhas_more\x18\x02 \x01(\bR\ahasMore\"B\n" + + "\vPageRequest\x12\x16\n" + + "\x06cursor\x18\x01 \x01(\tR\x06cursor\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSizeb\x06proto3" + +var ( + file_livekit_publicapi_common_v1_common_proto_rawDescOnce sync.Once + file_livekit_publicapi_common_v1_common_proto_rawDescData []byte +) + +func file_livekit_publicapi_common_v1_common_proto_rawDescGZIP() []byte { + file_livekit_publicapi_common_v1_common_proto_rawDescOnce.Do(func() { + file_livekit_publicapi_common_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_publicapi_common_v1_common_proto_rawDesc), len(file_livekit_publicapi_common_v1_common_proto_rawDesc))) + }) + return file_livekit_publicapi_common_v1_common_proto_rawDescData +} + +var file_livekit_publicapi_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_livekit_publicapi_common_v1_common_proto_goTypes = []any{ + (*Error)(nil), // 0: livekit.publicapi.common.v1.Error + (*PageInfo)(nil), // 1: livekit.publicapi.common.v1.PageInfo + (*PageRequest)(nil), // 2: livekit.publicapi.common.v1.PageRequest + (*Error_Detail)(nil), // 3: livekit.publicapi.common.v1.Error.Detail +} +var file_livekit_publicapi_common_v1_common_proto_depIdxs = []int32{ + 3, // 0: livekit.publicapi.common.v1.Error.error:type_name -> livekit.publicapi.common.v1.Error.Detail + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_livekit_publicapi_common_v1_common_proto_init() } +func file_livekit_publicapi_common_v1_common_proto_init() { + if File_livekit_publicapi_common_v1_common_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_publicapi_common_v1_common_proto_rawDesc), len(file_livekit_publicapi_common_v1_common_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_livekit_publicapi_common_v1_common_proto_goTypes, + DependencyIndexes: file_livekit_publicapi_common_v1_common_proto_depIdxs, + MessageInfos: file_livekit_publicapi_common_v1_common_proto_msgTypes, + }.Build() + File_livekit_publicapi_common_v1_common_proto = out.File + file_livekit_publicapi_common_v1_common_proto_goTypes = nil + file_livekit_publicapi_common_v1_common_proto_depIdxs = nil +} diff --git a/pkg/gen/livekit/publicapi/projects/v1/projects.pb.go b/pkg/gen/livekit/publicapi/projects/v1/projects.pb.go new file mode 100644 index 000000000..7de3f6a65 --- /dev/null +++ b/pkg/gen/livekit/publicapi/projects/v1/projects.pb.go @@ -0,0 +1,2903 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.12 +// protoc v7.35.1 +// source: livekit/publicapi/projects/v1/projects.proto + +package projectsv1 + +import ( + api "github.com/livekit/cloud-protocol/api" + v1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/common/v1" + livekit "github.com/livekit/protocol/livekit" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Webhook is a project webhook destination (mirrors backend-common Webhook). +type Webhook struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + SigningKey string `protobuf:"bytes,4,opt,name=signing_key,json=signingKey,proto3" json:"signing_key,omitempty"` + FilterParams *livekit.FilterParams `protobuf:"bytes,5,opt,name=filter_params,json=filterParams,proto3" json:"filter_params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Webhook) Reset() { + *x = Webhook{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Webhook) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Webhook) ProtoMessage() {} + +func (x *Webhook) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Webhook.ProtoReflect.Descriptor instead. +func (*Webhook) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{0} +} + +func (x *Webhook) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Webhook) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Webhook) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Webhook) GetSigningKey() string { + if x != nil { + return x.SigningKey + } + return "" +} + +func (x *Webhook) GetFilterParams() *livekit.FilterParams { + if x != nil { + return x.FilterParams + } + return nil +} + +// ProjectPreferences holds per-project UI/feature settings (mirrors +// backend-common ProjectPreferences). +type ProjectPreferences struct { + state protoimpl.MessageState `protogen:"open.v1"` + HideOnboarding bool `protobuf:"varint,1,opt,name=hide_onboarding,json=hideOnboarding,proto3" json:"hide_onboarding,omitempty"` + DiscoverableByDomain bool `protobuf:"varint,2,opt,name=discoverable_by_domain,json=discoverableByDomain,proto3" json:"discoverable_by_domain,omitempty"` + JoinableByDomain bool `protobuf:"varint,3,opt,name=joinable_by_domain,json=joinableByDomain,proto3" json:"joinable_by_domain,omitempty"` + HideSampleAppGallery bool `protobuf:"varint,4,opt,name=hide_sample_app_gallery,json=hideSampleAppGallery,proto3" json:"hide_sample_app_gallery,omitempty"` + DisableTokenEndpoint bool `protobuf:"varint,5,opt,name=disable_token_endpoint,json=disableTokenEndpoint,proto3" json:"disable_token_endpoint,omitempty"` + TokenEndpointKey string `protobuf:"bytes,6,opt,name=token_endpoint_key,json=tokenEndpointKey,proto3" json:"token_endpoint_key,omitempty"` + SfuAllowPause bool `protobuf:"varint,7,opt,name=sfu_allow_pause,json=sfuAllowPause,proto3" json:"sfu_allow_pause,omitempty"` + EnableEgressBackupStorage bool `protobuf:"varint,8,opt,name=enable_egress_backup_storage,json=enableEgressBackupStorage,proto3" json:"enable_egress_backup_storage,omitempty"` + FeatureFlags map[string]string `protobuf:"bytes,9,rep,name=feature_flags,json=featureFlags,proto3" json:"feature_flags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + EnableEgressAutoRetry bool `protobuf:"varint,10,opt,name=enable_egress_auto_retry,json=enableEgressAutoRetry,proto3" json:"enable_egress_auto_retry,omitempty"` + HipaaCompliant bool `protobuf:"varint,11,opt,name=hipaa_compliant,json=hipaaCompliant,proto3" json:"hipaa_compliant,omitempty"` + RoomConfigurations map[string]*livekit.RoomConfiguration `protobuf:"bytes,12,rep,name=room_configurations,json=roomConfigurations,proto3" json:"room_configurations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectPreferences) Reset() { + *x = ProjectPreferences{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectPreferences) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectPreferences) ProtoMessage() {} + +func (x *ProjectPreferences) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectPreferences.ProtoReflect.Descriptor instead. +func (*ProjectPreferences) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{1} +} + +func (x *ProjectPreferences) GetHideOnboarding() bool { + if x != nil { + return x.HideOnboarding + } + return false +} + +func (x *ProjectPreferences) GetDiscoverableByDomain() bool { + if x != nil { + return x.DiscoverableByDomain + } + return false +} + +func (x *ProjectPreferences) GetJoinableByDomain() bool { + if x != nil { + return x.JoinableByDomain + } + return false +} + +func (x *ProjectPreferences) GetHideSampleAppGallery() bool { + if x != nil { + return x.HideSampleAppGallery + } + return false +} + +func (x *ProjectPreferences) GetDisableTokenEndpoint() bool { + if x != nil { + return x.DisableTokenEndpoint + } + return false +} + +func (x *ProjectPreferences) GetTokenEndpointKey() string { + if x != nil { + return x.TokenEndpointKey + } + return "" +} + +func (x *ProjectPreferences) GetSfuAllowPause() bool { + if x != nil { + return x.SfuAllowPause + } + return false +} + +func (x *ProjectPreferences) GetEnableEgressBackupStorage() bool { + if x != nil { + return x.EnableEgressBackupStorage + } + return false +} + +func (x *ProjectPreferences) GetFeatureFlags() map[string]string { + if x != nil { + return x.FeatureFlags + } + return nil +} + +func (x *ProjectPreferences) GetEnableEgressAutoRetry() bool { + if x != nil { + return x.EnableEgressAutoRetry + } + return false +} + +func (x *ProjectPreferences) GetHipaaCompliant() bool { + if x != nil { + return x.HipaaCompliant + } + return false +} + +func (x *ProjectPreferences) GetRoomConfigurations() map[string]*livekit.RoomConfiguration { + if x != nil { + return x.RoomConfigurations + } + return nil +} + +// Project is a LiveKit Cloud project (owned by cloud-api-server). +// Field set mirrors backend-common model.Project (most config fields); +// members/domains are separate list resources and are not embedded here. +type Project struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + WorkspaceId string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Webhooks []*Webhook `protobuf:"bytes,5,rep,name=webhooks,proto3" json:"webhooks,omitempty"` + CreatorId string `protobuf:"bytes,6,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` + Subdomain string `protobuf:"bytes,7,opt,name=subdomain,proto3" json:"subdomain,omitempty"` + EnableAnalytics bool `protobuf:"varint,8,opt,name=enable_analytics,json=enableAnalytics,proto3" json:"enable_analytics,omitempty"` + AnalyticsAccessKey string `protobuf:"bytes,9,opt,name=analytics_access_key,json=analyticsAccessKey,proto3" json:"analytics_access_key,omitempty"` + EnableAutoCreate bool `protobuf:"varint,10,opt,name=enable_auto_create,json=enableAutoCreate,proto3" json:"enable_auto_create,omitempty"` + EnableRemoteUnmute bool `protobuf:"varint,11,opt,name=enable_remote_unmute,json=enableRemoteUnmute,proto3" json:"enable_remote_unmute,omitempty"` + EnableEnhancedNoiseCancellation bool `protobuf:"varint,12,opt,name=enable_enhanced_noise_cancellation,json=enableEnhancedNoiseCancellation,proto3" json:"enable_enhanced_noise_cancellation,omitempty"` + EnableHostedAgents bool `protobuf:"varint,13,opt,name=enable_hosted_agents,json=enableHostedAgents,proto3" json:"enable_hosted_agents,omitempty"` + Preferences *ProjectPreferences `protobuf:"bytes,14,opt,name=preferences,proto3" json:"preferences,omitempty"` + EnabledCodecs []string `protobuf:"bytes,15,rep,name=enabled_codecs,json=enabledCodecs,proto3" json:"enabled_codecs,omitempty"` + PinnedRegions []string `protobuf:"bytes,16,rep,name=pinned_regions,json=pinnedRegions,proto3" json:"pinned_regions,omitempty"` + EgressClusterId string `protobuf:"bytes,17,opt,name=egress_cluster_id,json=egressClusterId,proto3" json:"egress_cluster_id,omitempty"` + EnableSafeMode bool `protobuf:"varint,18,opt,name=enable_safe_mode,json=enableSafeMode,proto3" json:"enable_safe_mode,omitempty"` + EnableUserDataRecording bool `protobuf:"varint,19,opt,name=enable_user_data_recording,json=enableUserDataRecording,proto3" json:"enable_user_data_recording,omitempty"` + EnableUserDataTraining bool `protobuf:"varint,20,opt,name=enable_user_data_training,json=enableUserDataTraining,proto3" json:"enable_user_data_training,omitempty"` + UserDataRegion string `protobuf:"bytes,21,opt,name=user_data_region,json=userDataRegion,proto3" json:"user_data_region,omitempty"` + UserDataLifetimeDays int32 `protobuf:"varint,22,opt,name=user_data_lifetime_days,json=userDataLifetimeDays,proto3" json:"user_data_lifetime_days,omitempty"` + EnableSipCustomDomain bool `protobuf:"varint,23,opt,name=enable_sip_custom_domain,json=enableSipCustomDomain,proto3" json:"enable_sip_custom_domain,omitempty"` + RequireExplicitDispatch bool `protobuf:"varint,24,opt,name=require_explicit_dispatch,json=requireExplicitDispatch,proto3" json:"require_explicit_dispatch,omitempty"` + IsPrivate bool `protobuf:"varint,25,opt,name=is_private,json=isPrivate,proto3" json:"is_private,omitempty"` + EnablePiiRedaction bool `protobuf:"varint,26,opt,name=enable_pii_redaction,json=enablePiiRedaction,proto3" json:"enable_pii_redaction,omitempty"` + // Categories to redact when enable_pii_redaction is on. Empty on read means + // the stored set (or defaults applied at enable time) — never "redact nothing". + // Same taxonomy as cloud-api UpdateProject (cloud_protocol.PIIRedactionCategory). + PiiRedactionCategories []api.PIIRedactionCategory `protobuf:"varint,27,rep,packed,name=pii_redaction_categories,json=piiRedactionCategories,proto3,enum=cloud_protocol.PIIRedactionCategory" json:"pii_redaction_categories,omitempty"` + EnableInferenceRegionRestriction bool `protobuf:"varint,28,opt,name=enable_inference_region_restriction,json=enableInferenceRegionRestriction,proto3" json:"enable_inference_region_restriction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Project) Reset() { + *x = Project{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Project) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Project) ProtoMessage() {} + +func (x *Project) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Project.ProtoReflect.Descriptor instead. +func (*Project) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{2} +} + +func (x *Project) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Project) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Project) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *Project) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Project) GetWebhooks() []*Webhook { + if x != nil { + return x.Webhooks + } + return nil +} + +func (x *Project) GetCreatorId() string { + if x != nil { + return x.CreatorId + } + return "" +} + +func (x *Project) GetSubdomain() string { + if x != nil { + return x.Subdomain + } + return "" +} + +func (x *Project) GetEnableAnalytics() bool { + if x != nil { + return x.EnableAnalytics + } + return false +} + +func (x *Project) GetAnalyticsAccessKey() string { + if x != nil { + return x.AnalyticsAccessKey + } + return "" +} + +func (x *Project) GetEnableAutoCreate() bool { + if x != nil { + return x.EnableAutoCreate + } + return false +} + +func (x *Project) GetEnableRemoteUnmute() bool { + if x != nil { + return x.EnableRemoteUnmute + } + return false +} + +func (x *Project) GetEnableEnhancedNoiseCancellation() bool { + if x != nil { + return x.EnableEnhancedNoiseCancellation + } + return false +} + +func (x *Project) GetEnableHostedAgents() bool { + if x != nil { + return x.EnableHostedAgents + } + return false +} + +func (x *Project) GetPreferences() *ProjectPreferences { + if x != nil { + return x.Preferences + } + return nil +} + +func (x *Project) GetEnabledCodecs() []string { + if x != nil { + return x.EnabledCodecs + } + return nil +} + +func (x *Project) GetPinnedRegions() []string { + if x != nil { + return x.PinnedRegions + } + return nil +} + +func (x *Project) GetEgressClusterId() string { + if x != nil { + return x.EgressClusterId + } + return "" +} + +func (x *Project) GetEnableSafeMode() bool { + if x != nil { + return x.EnableSafeMode + } + return false +} + +func (x *Project) GetEnableUserDataRecording() bool { + if x != nil { + return x.EnableUserDataRecording + } + return false +} + +func (x *Project) GetEnableUserDataTraining() bool { + if x != nil { + return x.EnableUserDataTraining + } + return false +} + +func (x *Project) GetUserDataRegion() string { + if x != nil { + return x.UserDataRegion + } + return "" +} + +func (x *Project) GetUserDataLifetimeDays() int32 { + if x != nil { + return x.UserDataLifetimeDays + } + return 0 +} + +func (x *Project) GetEnableSipCustomDomain() bool { + if x != nil { + return x.EnableSipCustomDomain + } + return false +} + +func (x *Project) GetRequireExplicitDispatch() bool { + if x != nil { + return x.RequireExplicitDispatch + } + return false +} + +func (x *Project) GetIsPrivate() bool { + if x != nil { + return x.IsPrivate + } + return false +} + +func (x *Project) GetEnablePiiRedaction() bool { + if x != nil { + return x.EnablePiiRedaction + } + return false +} + +func (x *Project) GetPiiRedactionCategories() []api.PIIRedactionCategory { + if x != nil { + return x.PiiRedactionCategories + } + return nil +} + +func (x *Project) GetEnableInferenceRegionRestriction() bool { + if x != nil { + return x.EnableInferenceRegionRestriction + } + return false +} + +type ListProjectsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page *v1.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"` + // Mutually exclusive: only one of workspace_id or member_id can be set + // if workspace_id is set, list projects for the workspace + WorkspaceId string `protobuf:"bytes,2,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + // if member_id is set, list projects for the member + MemberId string `protobuf:"bytes,3,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListProjectsRequest) Reset() { + *x = ListProjectsRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListProjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListProjectsRequest) ProtoMessage() {} + +func (x *ListProjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListProjectsRequest.ProtoReflect.Descriptor instead. +func (*ListProjectsRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{3} +} + +func (x *ListProjectsRequest) GetPage() *v1.PageRequest { + if x != nil { + return x.Page + } + return nil +} + +func (x *ListProjectsRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *ListProjectsRequest) GetMemberId() string { + if x != nil { + return x.MemberId + } + return "" +} + +type ListProjectsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*Project `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + PageInfo *v1.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListProjectsResponse) Reset() { + *x = ListProjectsResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListProjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListProjectsResponse) ProtoMessage() {} + +func (x *ListProjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListProjectsResponse.ProtoReflect.Descriptor instead. +func (*ListProjectsResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{4} +} + +func (x *ListProjectsResponse) GetItems() []*Project { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListProjectsResponse) GetPageInfo() *v1.PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +type GetProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProjectRequest) Reset() { + *x = GetProjectRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectRequest) ProtoMessage() {} + +func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectRequest.ProtoReflect.Descriptor instead. +func (*GetProjectRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{5} +} + +func (x *GetProjectRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +type GetProjectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProjectResponse) Reset() { + *x = GetProjectResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectResponse) ProtoMessage() {} + +func (x *GetProjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectResponse.ProtoReflect.Descriptor instead. +func (*GetProjectResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{6} +} + +func (x *GetProjectResponse) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +// TODO: Add more parts that allow for a full project creation, not just the name +type CreateProjectMember struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + // Matches cloud_protocol.ProjectMemberRole: INVITED=0, READ=1, WRITE=2, ADMIN=3. + Role int32 `protobuf:"varint,2,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateProjectMember) Reset() { + *x = CreateProjectMember{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateProjectMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateProjectMember) ProtoMessage() {} + +func (x *CreateProjectMember) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateProjectMember.ProtoReflect.Descriptor instead. +func (*CreateProjectMember) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateProjectMember) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *CreateProjectMember) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +type CreateProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` // optional; when empty a new workspace is created + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Subdomain string `protobuf:"bytes,3,opt,name=subdomain,proto3" json:"subdomain,omitempty"` // optional; generated from name when empty + IsPrivate bool `protobuf:"varint,4,opt,name=is_private,json=isPrivate,proto3" json:"is_private,omitempty"` + Members []*CreateProjectMember `protobuf:"bytes,5,rep,name=members,proto3" json:"members,omitempty"` // private projects only + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateProjectRequest) Reset() { + *x = CreateProjectRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateProjectRequest) ProtoMessage() {} + +func (x *CreateProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateProjectRequest.ProtoReflect.Descriptor instead. +func (*CreateProjectRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateProjectRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *CreateProjectRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateProjectRequest) GetSubdomain() string { + if x != nil { + return x.Subdomain + } + return "" +} + +func (x *CreateProjectRequest) GetIsPrivate() bool { + if x != nil { + return x.IsPrivate + } + return false +} + +func (x *CreateProjectRequest) GetMembers() []*CreateProjectMember { + if x != nil { + return x.Members + } + return nil +} + +type CreateProjectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateProjectResponse) Reset() { + *x = CreateProjectResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateProjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateProjectResponse) ProtoMessage() {} + +func (x *CreateProjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateProjectResponse.ProtoReflect.Descriptor instead. +func (*CreateProjectResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateProjectResponse) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +// UpdateProjectRequest patches a project. Unset optional fields are left +// unchanged (proto3 optional). Mirrors cloud-api UpdateProject for local mode; +// webhooks are separate RPCs (not included here). +type UpdateProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` + Subdomain *string `protobuf:"bytes,3,opt,name=subdomain,proto3,oneof" json:"subdomain,omitempty"` + CustomDomain *string `protobuf:"bytes,4,opt,name=custom_domain,json=customDomain,proto3,oneof" json:"custom_domain,omitempty"` + EnableAnalytics *bool `protobuf:"varint,5,opt,name=enable_analytics,json=enableAnalytics,proto3,oneof" json:"enable_analytics,omitempty"` + EnableAutoCreate *bool `protobuf:"varint,6,opt,name=enable_auto_create,json=enableAutoCreate,proto3,oneof" json:"enable_auto_create,omitempty"` + EnableRemoteUnmute *bool `protobuf:"varint,7,opt,name=enable_remote_unmute,json=enableRemoteUnmute,proto3,oneof" json:"enable_remote_unmute,omitempty"` + EnabledCodecs []string `protobuf:"bytes,8,rep,name=enabled_codecs,json=enabledCodecs,proto3" json:"enabled_codecs,omitempty"` + EgressClusterId *string `protobuf:"bytes,9,opt,name=egress_cluster_id,json=egressClusterId,proto3,oneof" json:"egress_cluster_id,omitempty"` // LK-admin only + EnableHostedAgents *bool `protobuf:"varint,10,opt,name=enable_hosted_agents,json=enableHostedAgents,proto3,oneof" json:"enable_hosted_agents,omitempty"` // LK-admin only + EnableUserDataRecording *bool `protobuf:"varint,11,opt,name=enable_user_data_recording,json=enableUserDataRecording,proto3,oneof" json:"enable_user_data_recording,omitempty"` + UserDataRegion *string `protobuf:"bytes,12,opt,name=user_data_region,json=userDataRegion,proto3,oneof" json:"user_data_region,omitempty"` + RequireExplicitDispatch *bool `protobuf:"varint,13,opt,name=require_explicit_dispatch,json=requireExplicitDispatch,proto3,oneof" json:"require_explicit_dispatch,omitempty"` + IsPrivate *bool `protobuf:"varint,14,opt,name=is_private,json=isPrivate,proto3,oneof" json:"is_private,omitempty"` + // Used when becoming private: explicit member set (actor kept as ADMIN). + Members []*CreateProjectMember `protobuf:"bytes,15,rep,name=members,proto3" json:"members,omitempty"` + EnablePiiRedaction *bool `protobuf:"varint,16,opt,name=enable_pii_redaction,json=enablePiiRedaction,proto3,oneof" json:"enable_pii_redaction,omitempty"` + // Non-empty list replaces the stored set (validated via Canonical). + // Empty is ignored (cannot clear). When enabling with nothing stored, + // defaults are applied server-side — same as cloud-api UpdateProject. + PiiRedactionCategories []api.PIIRedactionCategory `protobuf:"varint,17,rep,packed,name=pii_redaction_categories,json=piiRedactionCategories,proto3,enum=cloud_protocol.PIIRedactionCategory" json:"pii_redaction_categories,omitempty"` + EnableInferenceRegionRestriction *bool `protobuf:"varint,18,opt,name=enable_inference_region_restriction,json=enableInferenceRegionRestriction,proto3,oneof" json:"enable_inference_region_restriction,omitempty"` + // Preferences (flat, matching cloud-api UpdateProjectRequest). + HideOnboarding *bool `protobuf:"varint,19,opt,name=hide_onboarding,json=hideOnboarding,proto3,oneof" json:"hide_onboarding,omitempty"` + DiscoverableByDomain *bool `protobuf:"varint,20,opt,name=discoverable_by_domain,json=discoverableByDomain,proto3,oneof" json:"discoverable_by_domain,omitempty"` + JoinableByDomain *bool `protobuf:"varint,21,opt,name=joinable_by_domain,json=joinableByDomain,proto3,oneof" json:"joinable_by_domain,omitempty"` + HideSampleAppGallery *bool `protobuf:"varint,22,opt,name=hide_sample_app_gallery,json=hideSampleAppGallery,proto3,oneof" json:"hide_sample_app_gallery,omitempty"` + DisableTokenEndpoint *bool `protobuf:"varint,23,opt,name=disable_token_endpoint,json=disableTokenEndpoint,proto3,oneof" json:"disable_token_endpoint,omitempty"` + TokenEndpointKey *string `protobuf:"bytes,24,opt,name=token_endpoint_key,json=tokenEndpointKey,proto3,oneof" json:"token_endpoint_key,omitempty"` + SfuAllowPause *bool `protobuf:"varint,25,opt,name=sfu_allow_pause,json=sfuAllowPause,proto3,oneof" json:"sfu_allow_pause,omitempty"` + EnableEgressBackupStorage *bool `protobuf:"varint,26,opt,name=enable_egress_backup_storage,json=enableEgressBackupStorage,proto3,oneof" json:"enable_egress_backup_storage,omitempty"` + EnableEgressAutoRetry *bool `protobuf:"varint,27,opt,name=enable_egress_auto_retry,json=enableEgressAutoRetry,proto3,oneof" json:"enable_egress_auto_retry,omitempty"` + FeatureFlags map[string]string `protobuf:"bytes,28,rep,name=feature_flags,json=featureFlags,proto3" json:"feature_flags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // RoomConfiguration management (stored on project preferences). + RoomConfigsToUpsert []*livekit.RoomConfiguration `protobuf:"bytes,29,rep,name=room_configs_to_upsert,json=roomConfigsToUpsert,proto3" json:"room_configs_to_upsert,omitempty"` + RoomConfigsToDelete []string `protobuf:"bytes,30,rep,name=room_configs_to_delete,json=roomConfigsToDelete,proto3" json:"room_configs_to_delete,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateProjectRequest) Reset() { + *x = UpdateProjectRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateProjectRequest) ProtoMessage() {} + +func (x *UpdateProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateProjectRequest.ProtoReflect.Descriptor instead. +func (*UpdateProjectRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateProjectRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *UpdateProjectRequest) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *UpdateProjectRequest) GetSubdomain() string { + if x != nil && x.Subdomain != nil { + return *x.Subdomain + } + return "" +} + +func (x *UpdateProjectRequest) GetCustomDomain() string { + if x != nil && x.CustomDomain != nil { + return *x.CustomDomain + } + return "" +} + +func (x *UpdateProjectRequest) GetEnableAnalytics() bool { + if x != nil && x.EnableAnalytics != nil { + return *x.EnableAnalytics + } + return false +} + +func (x *UpdateProjectRequest) GetEnableAutoCreate() bool { + if x != nil && x.EnableAutoCreate != nil { + return *x.EnableAutoCreate + } + return false +} + +func (x *UpdateProjectRequest) GetEnableRemoteUnmute() bool { + if x != nil && x.EnableRemoteUnmute != nil { + return *x.EnableRemoteUnmute + } + return false +} + +func (x *UpdateProjectRequest) GetEnabledCodecs() []string { + if x != nil { + return x.EnabledCodecs + } + return nil +} + +func (x *UpdateProjectRequest) GetEgressClusterId() string { + if x != nil && x.EgressClusterId != nil { + return *x.EgressClusterId + } + return "" +} + +func (x *UpdateProjectRequest) GetEnableHostedAgents() bool { + if x != nil && x.EnableHostedAgents != nil { + return *x.EnableHostedAgents + } + return false +} + +func (x *UpdateProjectRequest) GetEnableUserDataRecording() bool { + if x != nil && x.EnableUserDataRecording != nil { + return *x.EnableUserDataRecording + } + return false +} + +func (x *UpdateProjectRequest) GetUserDataRegion() string { + if x != nil && x.UserDataRegion != nil { + return *x.UserDataRegion + } + return "" +} + +func (x *UpdateProjectRequest) GetRequireExplicitDispatch() bool { + if x != nil && x.RequireExplicitDispatch != nil { + return *x.RequireExplicitDispatch + } + return false +} + +func (x *UpdateProjectRequest) GetIsPrivate() bool { + if x != nil && x.IsPrivate != nil { + return *x.IsPrivate + } + return false +} + +func (x *UpdateProjectRequest) GetMembers() []*CreateProjectMember { + if x != nil { + return x.Members + } + return nil +} + +func (x *UpdateProjectRequest) GetEnablePiiRedaction() bool { + if x != nil && x.EnablePiiRedaction != nil { + return *x.EnablePiiRedaction + } + return false +} + +func (x *UpdateProjectRequest) GetPiiRedactionCategories() []api.PIIRedactionCategory { + if x != nil { + return x.PiiRedactionCategories + } + return nil +} + +func (x *UpdateProjectRequest) GetEnableInferenceRegionRestriction() bool { + if x != nil && x.EnableInferenceRegionRestriction != nil { + return *x.EnableInferenceRegionRestriction + } + return false +} + +func (x *UpdateProjectRequest) GetHideOnboarding() bool { + if x != nil && x.HideOnboarding != nil { + return *x.HideOnboarding + } + return false +} + +func (x *UpdateProjectRequest) GetDiscoverableByDomain() bool { + if x != nil && x.DiscoverableByDomain != nil { + return *x.DiscoverableByDomain + } + return false +} + +func (x *UpdateProjectRequest) GetJoinableByDomain() bool { + if x != nil && x.JoinableByDomain != nil { + return *x.JoinableByDomain + } + return false +} + +func (x *UpdateProjectRequest) GetHideSampleAppGallery() bool { + if x != nil && x.HideSampleAppGallery != nil { + return *x.HideSampleAppGallery + } + return false +} + +func (x *UpdateProjectRequest) GetDisableTokenEndpoint() bool { + if x != nil && x.DisableTokenEndpoint != nil { + return *x.DisableTokenEndpoint + } + return false +} + +func (x *UpdateProjectRequest) GetTokenEndpointKey() string { + if x != nil && x.TokenEndpointKey != nil { + return *x.TokenEndpointKey + } + return "" +} + +func (x *UpdateProjectRequest) GetSfuAllowPause() bool { + if x != nil && x.SfuAllowPause != nil { + return *x.SfuAllowPause + } + return false +} + +func (x *UpdateProjectRequest) GetEnableEgressBackupStorage() bool { + if x != nil && x.EnableEgressBackupStorage != nil { + return *x.EnableEgressBackupStorage + } + return false +} + +func (x *UpdateProjectRequest) GetEnableEgressAutoRetry() bool { + if x != nil && x.EnableEgressAutoRetry != nil { + return *x.EnableEgressAutoRetry + } + return false +} + +func (x *UpdateProjectRequest) GetFeatureFlags() map[string]string { + if x != nil { + return x.FeatureFlags + } + return nil +} + +func (x *UpdateProjectRequest) GetRoomConfigsToUpsert() []*livekit.RoomConfiguration { + if x != nil { + return x.RoomConfigsToUpsert + } + return nil +} + +func (x *UpdateProjectRequest) GetRoomConfigsToDelete() []string { + if x != nil { + return x.RoomConfigsToDelete + } + return nil +} + +type UpdateProjectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateProjectResponse) Reset() { + *x = UpdateProjectResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateProjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateProjectResponse) ProtoMessage() {} + +func (x *UpdateProjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateProjectResponse.ProtoReflect.Descriptor instead. +func (*UpdateProjectResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{11} +} + +func (x *UpdateProjectResponse) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +type DeleteProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteProjectRequest) Reset() { + *x = DeleteProjectRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteProjectRequest) ProtoMessage() {} + +func (x *DeleteProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteProjectRequest.ProtoReflect.Descriptor instead. +func (*DeleteProjectRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{12} +} + +func (x *DeleteProjectRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +type DeleteProjectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteProjectResponse) Reset() { + *x = DeleteProjectResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteProjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteProjectResponse) ProtoMessage() {} + +func (x *DeleteProjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteProjectResponse.ProtoReflect.Descriptor instead. +func (*DeleteProjectResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{13} +} + +// ProjectMember is a user's membership on a project. +type ProjectMember struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + // Matches cloud_protocol.ProjectMemberRole: INVITED=0, READ=1, WRITE=2, ADMIN=3. + Role int32 `protobuf:"varint,4,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectMember) Reset() { + *x = ProjectMember{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectMember) ProtoMessage() {} + +func (x *ProjectMember) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectMember.ProtoReflect.Descriptor instead. +func (*ProjectMember) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{14} +} + +func (x *ProjectMember) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ProjectMember) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ProjectMember) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ProjectMember) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +// ProjectInvite is a pending email invite to a project (token-based, cloud InviteMember2). +type ProjectInvite struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + Role int32 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` + InviteToken string `protobuf:"bytes,4,opt,name=invite_token,json=inviteToken,proto3" json:"invite_token,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectInvite) Reset() { + *x = ProjectInvite{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectInvite) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectInvite) ProtoMessage() {} + +func (x *ProjectInvite) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectInvite.ProtoReflect.Descriptor instead. +func (*ProjectInvite) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{15} +} + +func (x *ProjectInvite) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ProjectInvite) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ProjectInvite) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +func (x *ProjectInvite) GetInviteToken() string { + if x != nil { + return x.InviteToken + } + return "" +} + +func (x *ProjectInvite) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +type ListMembersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersRequest) Reset() { + *x = ListMembersRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersRequest) ProtoMessage() {} + +func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersRequest.ProtoReflect.Descriptor instead. +func (*ListMembersRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{16} +} + +func (x *ListMembersRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +type ListMembersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*ProjectMember `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersResponse) Reset() { + *x = ListMembersResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersResponse) ProtoMessage() {} + +func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersResponse.ProtoReflect.Descriptor instead. +func (*ListMembersResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{17} +} + +func (x *ListMembersResponse) GetItems() []*ProjectMember { + if x != nil { + return x.Items + } + return nil +} + +type GetMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMemberRequest) Reset() { + *x = GetMemberRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemberRequest) ProtoMessage() {} + +func (x *GetMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMemberRequest.ProtoReflect.Descriptor instead. +func (*GetMemberRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{18} +} + +func (x *GetMemberRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type GetMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Member *ProjectMember `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMemberResponse) Reset() { + *x = GetMemberResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemberResponse) ProtoMessage() {} + +func (x *GetMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMemberResponse.ProtoReflect.Descriptor instead. +func (*GetMemberResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{19} +} + +func (x *GetMemberResponse) GetMember() *ProjectMember { + if x != nil { + return x.Member + } + return nil +} + +type UpdateMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Role int32 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateMemberRequest) Reset() { + *x = UpdateMemberRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMemberRequest) ProtoMessage() {} + +func (x *UpdateMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateMemberRequest.ProtoReflect.Descriptor instead. +func (*UpdateMemberRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{20} +} + +func (x *UpdateMemberRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *UpdateMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *UpdateMemberRequest) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +type UpdateMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Member *ProjectMember `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateMemberResponse) Reset() { + *x = UpdateMemberResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMemberResponse) ProtoMessage() {} + +func (x *UpdateMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateMemberResponse.ProtoReflect.Descriptor instead. +func (*UpdateMemberResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{21} +} + +func (x *UpdateMemberResponse) GetMember() *ProjectMember { + if x != nil { + return x.Member + } + return nil +} + +type RemoveMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveMemberRequest) Reset() { + *x = RemoveMemberRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMemberRequest) ProtoMessage() {} + +func (x *RemoveMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveMemberRequest.ProtoReflect.Descriptor instead. +func (*RemoveMemberRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{22} +} + +func (x *RemoveMemberRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *RemoveMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type RemoveMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveMemberResponse) Reset() { + *x = RemoveMemberResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMemberResponse) ProtoMessage() {} + +func (x *RemoveMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveMemberResponse.ProtoReflect.Descriptor instead. +func (*RemoveMemberResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{23} +} + +// InviteMember creates or refreshes a token invite (cloud InviteMember2). +type InviteMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + Role int32 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InviteMemberRequest) Reset() { + *x = InviteMemberRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InviteMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InviteMemberRequest) ProtoMessage() {} + +func (x *InviteMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InviteMemberRequest.ProtoReflect.Descriptor instead. +func (*InviteMemberRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{24} +} + +func (x *InviteMemberRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *InviteMemberRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *InviteMemberRequest) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +type InviteMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + InviteToken string `protobuf:"bytes,2,opt,name=invite_token,json=inviteToken,proto3" json:"invite_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InviteMemberResponse) Reset() { + *x = InviteMemberResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InviteMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InviteMemberResponse) ProtoMessage() {} + +func (x *InviteMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InviteMemberResponse.ProtoReflect.Descriptor instead. +func (*InviteMemberResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{25} +} + +func (x *InviteMemberResponse) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *InviteMemberResponse) GetInviteToken() string { + if x != nil { + return x.InviteToken + } + return "" +} + +type ListInvitesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListInvitesRequest) Reset() { + *x = ListInvitesRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListInvitesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInvitesRequest) ProtoMessage() {} + +func (x *ListInvitesRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInvitesRequest.ProtoReflect.Descriptor instead. +func (*ListInvitesRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{26} +} + +func (x *ListInvitesRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +type ListInvitesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*ProjectInvite `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListInvitesResponse) Reset() { + *x = ListInvitesResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListInvitesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInvitesResponse) ProtoMessage() {} + +func (x *ListInvitesResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInvitesResponse.ProtoReflect.Descriptor instead. +func (*ListInvitesResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{27} +} + +func (x *ListInvitesResponse) GetItems() []*ProjectInvite { + if x != nil { + return x.Items + } + return nil +} + +type GetInviteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + InviteToken string `protobuf:"bytes,1,opt,name=invite_token,json=inviteToken,proto3" json:"invite_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetInviteRequest) Reset() { + *x = GetInviteRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetInviteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInviteRequest) ProtoMessage() {} + +func (x *GetInviteRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInviteRequest.ProtoReflect.Descriptor instead. +func (*GetInviteRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{28} +} + +func (x *GetInviteRequest) GetInviteToken() string { + if x != nil { + return x.InviteToken + } + return "" +} + +type GetInviteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Invite *ProjectInvite `protobuf:"bytes,1,opt,name=invite,proto3" json:"invite,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetInviteResponse) Reset() { + *x = GetInviteResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetInviteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInviteResponse) ProtoMessage() {} + +func (x *GetInviteResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInviteResponse.ProtoReflect.Descriptor instead. +func (*GetInviteResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{29} +} + +func (x *GetInviteResponse) GetInvite() *ProjectInvite { + if x != nil { + return x.Invite + } + return nil +} + +type UpdateInviteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + Role int32 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateInviteRequest) Reset() { + *x = UpdateInviteRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateInviteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateInviteRequest) ProtoMessage() {} + +func (x *UpdateInviteRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateInviteRequest.ProtoReflect.Descriptor instead. +func (*UpdateInviteRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{30} +} + +func (x *UpdateInviteRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *UpdateInviteRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *UpdateInviteRequest) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +type UpdateInviteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Invite *ProjectInvite `protobuf:"bytes,1,opt,name=invite,proto3" json:"invite,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateInviteResponse) Reset() { + *x = UpdateInviteResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateInviteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateInviteResponse) ProtoMessage() {} + +func (x *UpdateInviteResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateInviteResponse.ProtoReflect.Descriptor instead. +func (*UpdateInviteResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{31} +} + +func (x *UpdateInviteResponse) GetInvite() *ProjectInvite { + if x != nil { + return x.Invite + } + return nil +} + +type DeleteInviteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteInviteRequest) Reset() { + *x = DeleteInviteRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteInviteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteInviteRequest) ProtoMessage() {} + +func (x *DeleteInviteRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteInviteRequest.ProtoReflect.Descriptor instead. +func (*DeleteInviteRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{32} +} + +func (x *DeleteInviteRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *DeleteInviteRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +type DeleteInviteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteInviteResponse) Reset() { + *x = DeleteInviteResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteInviteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteInviteResponse) ProtoMessage() {} + +func (x *DeleteInviteResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteInviteResponse.ProtoReflect.Descriptor instead. +func (*DeleteInviteResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{33} +} + +type AnswerInvitationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + InviteToken string `protobuf:"bytes,1,opt,name=invite_token,json=inviteToken,proto3" json:"invite_token,omitempty"` + Accept bool `protobuf:"varint,2,opt,name=accept,proto3" json:"accept,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnswerInvitationRequest) Reset() { + *x = AnswerInvitationRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnswerInvitationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnswerInvitationRequest) ProtoMessage() {} + +func (x *AnswerInvitationRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnswerInvitationRequest.ProtoReflect.Descriptor instead. +func (*AnswerInvitationRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{34} +} + +func (x *AnswerInvitationRequest) GetInviteToken() string { + if x != nil { + return x.InviteToken + } + return "" +} + +func (x *AnswerInvitationRequest) GetAccept() bool { + if x != nil { + return x.Accept + } + return false +} + +type AnswerInvitationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Member *ProjectMember `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` // set when accept=true + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnswerInvitationResponse) Reset() { + *x = AnswerInvitationResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnswerInvitationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnswerInvitationResponse) ProtoMessage() {} + +func (x *AnswerInvitationResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnswerInvitationResponse.ProtoReflect.Descriptor instead. +func (*AnswerInvitationResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{35} +} + +func (x *AnswerInvitationResponse) GetMember() *ProjectMember { + if x != nil { + return x.Member + } + return nil +} + +type AddWorkspaceMembersToProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + UserIds []string `protobuf:"bytes,2,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + Role int32 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddWorkspaceMembersToProjectRequest) Reset() { + *x = AddWorkspaceMembersToProjectRequest{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddWorkspaceMembersToProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddWorkspaceMembersToProjectRequest) ProtoMessage() {} + +func (x *AddWorkspaceMembersToProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddWorkspaceMembersToProjectRequest.ProtoReflect.Descriptor instead. +func (*AddWorkspaceMembersToProjectRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{36} +} + +func (x *AddWorkspaceMembersToProjectRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *AddWorkspaceMembersToProjectRequest) GetUserIds() []string { + if x != nil { + return x.UserIds + } + return nil +} + +func (x *AddWorkspaceMembersToProjectRequest) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +type AddWorkspaceMembersToProjectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*ProjectMember `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddWorkspaceMembersToProjectResponse) Reset() { + *x = AddWorkspaceMembersToProjectResponse{} + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddWorkspaceMembersToProjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddWorkspaceMembersToProjectResponse) ProtoMessage() {} + +func (x *AddWorkspaceMembersToProjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_projects_v1_projects_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddWorkspaceMembersToProjectResponse.ProtoReflect.Descriptor instead. +func (*AddWorkspaceMembersToProjectResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP(), []int{37} +} + +func (x *AddWorkspaceMembersToProjectResponse) GetItems() []*ProjectMember { + if x != nil { + return x.Items + } + return nil +} + +var File_livekit_publicapi_projects_v1_projects_proto protoreflect.FileDescriptor + +const file_livekit_publicapi_projects_v1_projects_proto_rawDesc = "" + + "\n" + + ",livekit/publicapi/projects/v1/projects.proto\x12\x1dlivekit.publicapi.projects.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a(livekit/publicapi/common/v1/common.proto\x1a\x14livekit_models.proto\x1a\x12livekit_room.proto\x1a\tpii.proto\"\x9c\x01\n" + + "\aWebhook\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n" + + "\x03url\x18\x03 \x01(\tR\x03url\x12\x1f\n" + + "\vsigning_key\x18\x04 \x01(\tR\n" + + "signingKey\x12:\n" + + "\rfilter_params\x18\x05 \x01(\v2\x15.livekit.FilterParamsR\ffilterParams\"\x91\a\n" + + "\x12ProjectPreferences\x12'\n" + + "\x0fhide_onboarding\x18\x01 \x01(\bR\x0ehideOnboarding\x124\n" + + "\x16discoverable_by_domain\x18\x02 \x01(\bR\x14discoverableByDomain\x12,\n" + + "\x12joinable_by_domain\x18\x03 \x01(\bR\x10joinableByDomain\x125\n" + + "\x17hide_sample_app_gallery\x18\x04 \x01(\bR\x14hideSampleAppGallery\x124\n" + + "\x16disable_token_endpoint\x18\x05 \x01(\bR\x14disableTokenEndpoint\x12,\n" + + "\x12token_endpoint_key\x18\x06 \x01(\tR\x10tokenEndpointKey\x12&\n" + + "\x0fsfu_allow_pause\x18\a \x01(\bR\rsfuAllowPause\x12?\n" + + "\x1cenable_egress_backup_storage\x18\b \x01(\bR\x19enableEgressBackupStorage\x12h\n" + + "\rfeature_flags\x18\t \x03(\v2C.livekit.publicapi.projects.v1.ProjectPreferences.FeatureFlagsEntryR\ffeatureFlags\x127\n" + + "\x18enable_egress_auto_retry\x18\n" + + " \x01(\bR\x15enableEgressAutoRetry\x12'\n" + + "\x0fhipaa_compliant\x18\v \x01(\bR\x0ehipaaCompliant\x12z\n" + + "\x13room_configurations\x18\f \x03(\v2I.livekit.publicapi.projects.v1.ProjectPreferences.RoomConfigurationsEntryR\x12roomConfigurations\x1a?\n" + + "\x11FeatureFlagsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aa\n" + + "\x17RoomConfigurationsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.livekit.RoomConfigurationR\x05value:\x028\x01\"\x8f\v\n" + + "\aProject\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12!\n" + + "\fworkspace_id\x18\x03 \x01(\tR\vworkspaceId\x129\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12B\n" + + "\bwebhooks\x18\x05 \x03(\v2&.livekit.publicapi.projects.v1.WebhookR\bwebhooks\x12\x1d\n" + + "\n" + + "creator_id\x18\x06 \x01(\tR\tcreatorId\x12\x1c\n" + + "\tsubdomain\x18\a \x01(\tR\tsubdomain\x12)\n" + + "\x10enable_analytics\x18\b \x01(\bR\x0fenableAnalytics\x120\n" + + "\x14analytics_access_key\x18\t \x01(\tR\x12analyticsAccessKey\x12,\n" + + "\x12enable_auto_create\x18\n" + + " \x01(\bR\x10enableAutoCreate\x120\n" + + "\x14enable_remote_unmute\x18\v \x01(\bR\x12enableRemoteUnmute\x12K\n" + + "\"enable_enhanced_noise_cancellation\x18\f \x01(\bR\x1fenableEnhancedNoiseCancellation\x120\n" + + "\x14enable_hosted_agents\x18\r \x01(\bR\x12enableHostedAgents\x12S\n" + + "\vpreferences\x18\x0e \x01(\v21.livekit.publicapi.projects.v1.ProjectPreferencesR\vpreferences\x12%\n" + + "\x0eenabled_codecs\x18\x0f \x03(\tR\renabledCodecs\x12%\n" + + "\x0epinned_regions\x18\x10 \x03(\tR\rpinnedRegions\x12*\n" + + "\x11egress_cluster_id\x18\x11 \x01(\tR\x0fegressClusterId\x12(\n" + + "\x10enable_safe_mode\x18\x12 \x01(\bR\x0eenableSafeMode\x12;\n" + + "\x1aenable_user_data_recording\x18\x13 \x01(\bR\x17enableUserDataRecording\x129\n" + + "\x19enable_user_data_training\x18\x14 \x01(\bR\x16enableUserDataTraining\x12(\n" + + "\x10user_data_region\x18\x15 \x01(\tR\x0euserDataRegion\x125\n" + + "\x17user_data_lifetime_days\x18\x16 \x01(\x05R\x14userDataLifetimeDays\x127\n" + + "\x18enable_sip_custom_domain\x18\x17 \x01(\bR\x15enableSipCustomDomain\x12:\n" + + "\x19require_explicit_dispatch\x18\x18 \x01(\bR\x17requireExplicitDispatch\x12\x1d\n" + + "\n" + + "is_private\x18\x19 \x01(\bR\tisPrivate\x120\n" + + "\x14enable_pii_redaction\x18\x1a \x01(\bR\x12enablePiiRedaction\x12^\n" + + "\x18pii_redaction_categories\x18\x1b \x03(\x0e2$.cloud_protocol.PIIRedactionCategoryR\x16piiRedactionCategories\x12M\n" + + "#enable_inference_region_restriction\x18\x1c \x01(\bR enableInferenceRegionRestriction\"\x93\x01\n" + + "\x13ListProjectsRequest\x12<\n" + + "\x04page\x18\x01 \x01(\v2(.livekit.publicapi.common.v1.PageRequestR\x04page\x12!\n" + + "\fworkspace_id\x18\x02 \x01(\tR\vworkspaceId\x12\x1b\n" + + "\tmember_id\x18\x03 \x01(\tR\bmemberId\"\x98\x01\n" + + "\x14ListProjectsResponse\x12<\n" + + "\x05items\x18\x01 \x03(\v2&.livekit.publicapi.projects.v1.ProjectR\x05items\x12B\n" + + "\tpage_info\x18\x02 \x01(\v2%.livekit.publicapi.common.v1.PageInfoR\bpageInfo\"2\n" + + "\x11GetProjectRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\"V\n" + + "\x12GetProjectResponse\x12@\n" + + "\aproject\x18\x01 \x01(\v2&.livekit.publicapi.projects.v1.ProjectR\aproject\"B\n" + + "\x13CreateProjectMember\x12\x17\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\x12\x12\n" + + "\x04role\x18\x02 \x01(\x05R\x04role\"\xd8\x01\n" + + "\x14CreateProjectRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1c\n" + + "\tsubdomain\x18\x03 \x01(\tR\tsubdomain\x12\x1d\n" + + "\n" + + "is_private\x18\x04 \x01(\bR\tisPrivate\x12L\n" + + "\amembers\x18\x05 \x03(\v22.livekit.publicapi.projects.v1.CreateProjectMemberR\amembers\"Y\n" + + "\x15CreateProjectResponse\x12@\n" + + "\aproject\x18\x01 \x01(\v2&.livekit.publicapi.projects.v1.ProjectR\aproject\"\xa2\x12\n" + + "\x14UpdateProjectRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x17\n" + + "\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x12!\n" + + "\tsubdomain\x18\x03 \x01(\tH\x01R\tsubdomain\x88\x01\x01\x12(\n" + + "\rcustom_domain\x18\x04 \x01(\tH\x02R\fcustomDomain\x88\x01\x01\x12.\n" + + "\x10enable_analytics\x18\x05 \x01(\bH\x03R\x0fenableAnalytics\x88\x01\x01\x121\n" + + "\x12enable_auto_create\x18\x06 \x01(\bH\x04R\x10enableAutoCreate\x88\x01\x01\x125\n" + + "\x14enable_remote_unmute\x18\a \x01(\bH\x05R\x12enableRemoteUnmute\x88\x01\x01\x12%\n" + + "\x0eenabled_codecs\x18\b \x03(\tR\renabledCodecs\x12/\n" + + "\x11egress_cluster_id\x18\t \x01(\tH\x06R\x0fegressClusterId\x88\x01\x01\x125\n" + + "\x14enable_hosted_agents\x18\n" + + " \x01(\bH\aR\x12enableHostedAgents\x88\x01\x01\x12@\n" + + "\x1aenable_user_data_recording\x18\v \x01(\bH\bR\x17enableUserDataRecording\x88\x01\x01\x12-\n" + + "\x10user_data_region\x18\f \x01(\tH\tR\x0euserDataRegion\x88\x01\x01\x12?\n" + + "\x19require_explicit_dispatch\x18\r \x01(\bH\n" + + "R\x17requireExplicitDispatch\x88\x01\x01\x12\"\n" + + "\n" + + "is_private\x18\x0e \x01(\bH\vR\tisPrivate\x88\x01\x01\x12L\n" + + "\amembers\x18\x0f \x03(\v22.livekit.publicapi.projects.v1.CreateProjectMemberR\amembers\x125\n" + + "\x14enable_pii_redaction\x18\x10 \x01(\bH\fR\x12enablePiiRedaction\x88\x01\x01\x12^\n" + + "\x18pii_redaction_categories\x18\x11 \x03(\x0e2$.cloud_protocol.PIIRedactionCategoryR\x16piiRedactionCategories\x12R\n" + + "#enable_inference_region_restriction\x18\x12 \x01(\bH\rR enableInferenceRegionRestriction\x88\x01\x01\x12,\n" + + "\x0fhide_onboarding\x18\x13 \x01(\bH\x0eR\x0ehideOnboarding\x88\x01\x01\x129\n" + + "\x16discoverable_by_domain\x18\x14 \x01(\bH\x0fR\x14discoverableByDomain\x88\x01\x01\x121\n" + + "\x12joinable_by_domain\x18\x15 \x01(\bH\x10R\x10joinableByDomain\x88\x01\x01\x12:\n" + + "\x17hide_sample_app_gallery\x18\x16 \x01(\bH\x11R\x14hideSampleAppGallery\x88\x01\x01\x129\n" + + "\x16disable_token_endpoint\x18\x17 \x01(\bH\x12R\x14disableTokenEndpoint\x88\x01\x01\x121\n" + + "\x12token_endpoint_key\x18\x18 \x01(\tH\x13R\x10tokenEndpointKey\x88\x01\x01\x12+\n" + + "\x0fsfu_allow_pause\x18\x19 \x01(\bH\x14R\rsfuAllowPause\x88\x01\x01\x12D\n" + + "\x1cenable_egress_backup_storage\x18\x1a \x01(\bH\x15R\x19enableEgressBackupStorage\x88\x01\x01\x12<\n" + + "\x18enable_egress_auto_retry\x18\x1b \x01(\bH\x16R\x15enableEgressAutoRetry\x88\x01\x01\x12j\n" + + "\rfeature_flags\x18\x1c \x03(\v2E.livekit.publicapi.projects.v1.UpdateProjectRequest.FeatureFlagsEntryR\ffeatureFlags\x12O\n" + + "\x16room_configs_to_upsert\x18\x1d \x03(\v2\x1a.livekit.RoomConfigurationR\x13roomConfigsToUpsert\x123\n" + + "\x16room_configs_to_delete\x18\x1e \x03(\tR\x13roomConfigsToDelete\x1a?\n" + + "\x11FeatureFlagsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\a\n" + + "\x05_nameB\f\n" + + "\n" + + "_subdomainB\x10\n" + + "\x0e_custom_domainB\x13\n" + + "\x11_enable_analyticsB\x15\n" + + "\x13_enable_auto_createB\x17\n" + + "\x15_enable_remote_unmuteB\x14\n" + + "\x12_egress_cluster_idB\x17\n" + + "\x15_enable_hosted_agentsB\x1d\n" + + "\x1b_enable_user_data_recordingB\x13\n" + + "\x11_user_data_regionB\x1c\n" + + "\x1a_require_explicit_dispatchB\r\n" + + "\v_is_privateB\x17\n" + + "\x15_enable_pii_redactionB&\n" + + "$_enable_inference_region_restrictionB\x12\n" + + "\x10_hide_onboardingB\x19\n" + + "\x17_discoverable_by_domainB\x15\n" + + "\x13_joinable_by_domainB\x1a\n" + + "\x18_hide_sample_app_galleryB\x19\n" + + "\x17_disable_token_endpointB\x15\n" + + "\x13_token_endpoint_keyB\x12\n" + + "\x10_sfu_allow_pauseB\x1f\n" + + "\x1d_enable_egress_backup_storageB\x1b\n" + + "\x19_enable_egress_auto_retry\"Y\n" + + "\x15UpdateProjectResponse\x12@\n" + + "\aproject\x18\x01 \x01(\v2&.livekit.publicapi.projects.v1.ProjectR\aproject\"5\n" + + "\x14DeleteProjectRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\"\x17\n" + + "\x15DeleteProjectResponse\"q\n" + + "\rProjectMember\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x17\n" + + "\auser_id\x18\x02 \x01(\tR\x06userId\x12\x14\n" + + "\x05email\x18\x03 \x01(\tR\x05email\x12\x12\n" + + "\x04role\x18\x04 \x01(\x05R\x04role\"\xb6\x01\n" + + "\rProjectInvite\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\x12\x12\n" + + "\x04role\x18\x03 \x01(\x05R\x04role\x12!\n" + + "\finvite_token\x18\x04 \x01(\tR\vinviteToken\x129\n" + + "\n" + + "expires_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"3\n" + + "\x12ListMembersRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\"Y\n" + + "\x13ListMembersResponse\x12B\n" + + "\x05items\x18\x01 \x03(\v2,.livekit.publicapi.projects.v1.ProjectMemberR\x05items\"J\n" + + "\x10GetMemberRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x17\n" + + "\auser_id\x18\x02 \x01(\tR\x06userId\"Y\n" + + "\x11GetMemberResponse\x12D\n" + + "\x06member\x18\x01 \x01(\v2,.livekit.publicapi.projects.v1.ProjectMemberR\x06member\"a\n" + + "\x13UpdateMemberRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x17\n" + + "\auser_id\x18\x02 \x01(\tR\x06userId\x12\x12\n" + + "\x04role\x18\x03 \x01(\x05R\x04role\"\\\n" + + "\x14UpdateMemberResponse\x12D\n" + + "\x06member\x18\x01 \x01(\v2,.livekit.publicapi.projects.v1.ProjectMemberR\x06member\"M\n" + + "\x13RemoveMemberRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x17\n" + + "\auser_id\x18\x02 \x01(\tR\x06userId\"\x16\n" + + "\x14RemoveMemberResponse\"^\n" + + "\x13InviteMemberRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\x12\x12\n" + + "\x04role\x18\x03 \x01(\x05R\x04role\"X\n" + + "\x14InviteMemberResponse\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12!\n" + + "\finvite_token\x18\x02 \x01(\tR\vinviteToken\"3\n" + + "\x12ListInvitesRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\"Y\n" + + "\x13ListInvitesResponse\x12B\n" + + "\x05items\x18\x01 \x03(\v2,.livekit.publicapi.projects.v1.ProjectInviteR\x05items\"5\n" + + "\x10GetInviteRequest\x12!\n" + + "\finvite_token\x18\x01 \x01(\tR\vinviteToken\"Y\n" + + "\x11GetInviteResponse\x12D\n" + + "\x06invite\x18\x01 \x01(\v2,.livekit.publicapi.projects.v1.ProjectInviteR\x06invite\"^\n" + + "\x13UpdateInviteRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\x12\x12\n" + + "\x04role\x18\x03 \x01(\x05R\x04role\"\\\n" + + "\x14UpdateInviteResponse\x12D\n" + + "\x06invite\x18\x01 \x01(\v2,.livekit.publicapi.projects.v1.ProjectInviteR\x06invite\"J\n" + + "\x13DeleteInviteRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\"\x16\n" + + "\x14DeleteInviteResponse\"T\n" + + "\x17AnswerInvitationRequest\x12!\n" + + "\finvite_token\x18\x01 \x01(\tR\vinviteToken\x12\x16\n" + + "\x06accept\x18\x02 \x01(\bR\x06accept\"`\n" + + "\x18AnswerInvitationResponse\x12D\n" + + "\x06member\x18\x01 \x01(\v2,.livekit.publicapi.projects.v1.ProjectMemberR\x06member\"s\n" + + "#AddWorkspaceMembersToProjectRequest\x12\x1d\n" + + "\n" + + "project_id\x18\x01 \x01(\tR\tprojectId\x12\x19\n" + + "\buser_ids\x18\x02 \x03(\tR\auserIds\x12\x12\n" + + "\x04role\x18\x03 \x01(\x05R\x04role\"j\n" + + "$AddWorkspaceMembersToProjectResponse\x12B\n" + + "\x05items\x18\x01 \x03(\v2,.livekit.publicapi.projects.v1.ProjectMemberR\x05items2\xc9\x0f\n" + + "\x0eProjectService\x12w\n" + + "\fListProjects\x122.livekit.publicapi.projects.v1.ListProjectsRequest\x1a3.livekit.publicapi.projects.v1.ListProjectsResponse\x12q\n" + + "\n" + + "GetProject\x120.livekit.publicapi.projects.v1.GetProjectRequest\x1a1.livekit.publicapi.projects.v1.GetProjectResponse\x12z\n" + + "\rCreateProject\x123.livekit.publicapi.projects.v1.CreateProjectRequest\x1a4.livekit.publicapi.projects.v1.CreateProjectResponse\x12z\n" + + "\rUpdateProject\x123.livekit.publicapi.projects.v1.UpdateProjectRequest\x1a4.livekit.publicapi.projects.v1.UpdateProjectResponse\x12z\n" + + "\rDeleteProject\x123.livekit.publicapi.projects.v1.DeleteProjectRequest\x1a4.livekit.publicapi.projects.v1.DeleteProjectResponse\x12t\n" + + "\vListMembers\x121.livekit.publicapi.projects.v1.ListMembersRequest\x1a2.livekit.publicapi.projects.v1.ListMembersResponse\x12n\n" + + "\tGetMember\x12/.livekit.publicapi.projects.v1.GetMemberRequest\x1a0.livekit.publicapi.projects.v1.GetMemberResponse\x12w\n" + + "\fUpdateMember\x122.livekit.publicapi.projects.v1.UpdateMemberRequest\x1a3.livekit.publicapi.projects.v1.UpdateMemberResponse\x12w\n" + + "\fRemoveMember\x122.livekit.publicapi.projects.v1.RemoveMemberRequest\x1a3.livekit.publicapi.projects.v1.RemoveMemberResponse\x12w\n" + + "\fInviteMember\x122.livekit.publicapi.projects.v1.InviteMemberRequest\x1a3.livekit.publicapi.projects.v1.InviteMemberResponse\x12t\n" + + "\vListInvites\x121.livekit.publicapi.projects.v1.ListInvitesRequest\x1a2.livekit.publicapi.projects.v1.ListInvitesResponse\x12n\n" + + "\tGetInvite\x12/.livekit.publicapi.projects.v1.GetInviteRequest\x1a0.livekit.publicapi.projects.v1.GetInviteResponse\x12w\n" + + "\fUpdateInvite\x122.livekit.publicapi.projects.v1.UpdateInviteRequest\x1a3.livekit.publicapi.projects.v1.UpdateInviteResponse\x12w\n" + + "\fDeleteInvite\x122.livekit.publicapi.projects.v1.DeleteInviteRequest\x1a3.livekit.publicapi.projects.v1.DeleteInviteResponse\x12\x83\x01\n" + + "\x10AnswerInvitation\x126.livekit.publicapi.projects.v1.AnswerInvitationRequest\x1a7.livekit.publicapi.projects.v1.AnswerInvitationResponse\x12\xa7\x01\n" + + "\x1cAddWorkspaceMembersToProject\x12B.livekit.publicapi.projects.v1.AddWorkspaceMembersToProjectRequest\x1aC.livekit.publicapi.projects.v1.AddWorkspaceMembersToProjectResponseb\x06proto3" + +var ( + file_livekit_publicapi_projects_v1_projects_proto_rawDescOnce sync.Once + file_livekit_publicapi_projects_v1_projects_proto_rawDescData []byte +) + +func file_livekit_publicapi_projects_v1_projects_proto_rawDescGZIP() []byte { + file_livekit_publicapi_projects_v1_projects_proto_rawDescOnce.Do(func() { + file_livekit_publicapi_projects_v1_projects_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_publicapi_projects_v1_projects_proto_rawDesc), len(file_livekit_publicapi_projects_v1_projects_proto_rawDesc))) + }) + return file_livekit_publicapi_projects_v1_projects_proto_rawDescData +} + +var file_livekit_publicapi_projects_v1_projects_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_livekit_publicapi_projects_v1_projects_proto_goTypes = []any{ + (*Webhook)(nil), // 0: livekit.publicapi.projects.v1.Webhook + (*ProjectPreferences)(nil), // 1: livekit.publicapi.projects.v1.ProjectPreferences + (*Project)(nil), // 2: livekit.publicapi.projects.v1.Project + (*ListProjectsRequest)(nil), // 3: livekit.publicapi.projects.v1.ListProjectsRequest + (*ListProjectsResponse)(nil), // 4: livekit.publicapi.projects.v1.ListProjectsResponse + (*GetProjectRequest)(nil), // 5: livekit.publicapi.projects.v1.GetProjectRequest + (*GetProjectResponse)(nil), // 6: livekit.publicapi.projects.v1.GetProjectResponse + (*CreateProjectMember)(nil), // 7: livekit.publicapi.projects.v1.CreateProjectMember + (*CreateProjectRequest)(nil), // 8: livekit.publicapi.projects.v1.CreateProjectRequest + (*CreateProjectResponse)(nil), // 9: livekit.publicapi.projects.v1.CreateProjectResponse + (*UpdateProjectRequest)(nil), // 10: livekit.publicapi.projects.v1.UpdateProjectRequest + (*UpdateProjectResponse)(nil), // 11: livekit.publicapi.projects.v1.UpdateProjectResponse + (*DeleteProjectRequest)(nil), // 12: livekit.publicapi.projects.v1.DeleteProjectRequest + (*DeleteProjectResponse)(nil), // 13: livekit.publicapi.projects.v1.DeleteProjectResponse + (*ProjectMember)(nil), // 14: livekit.publicapi.projects.v1.ProjectMember + (*ProjectInvite)(nil), // 15: livekit.publicapi.projects.v1.ProjectInvite + (*ListMembersRequest)(nil), // 16: livekit.publicapi.projects.v1.ListMembersRequest + (*ListMembersResponse)(nil), // 17: livekit.publicapi.projects.v1.ListMembersResponse + (*GetMemberRequest)(nil), // 18: livekit.publicapi.projects.v1.GetMemberRequest + (*GetMemberResponse)(nil), // 19: livekit.publicapi.projects.v1.GetMemberResponse + (*UpdateMemberRequest)(nil), // 20: livekit.publicapi.projects.v1.UpdateMemberRequest + (*UpdateMemberResponse)(nil), // 21: livekit.publicapi.projects.v1.UpdateMemberResponse + (*RemoveMemberRequest)(nil), // 22: livekit.publicapi.projects.v1.RemoveMemberRequest + (*RemoveMemberResponse)(nil), // 23: livekit.publicapi.projects.v1.RemoveMemberResponse + (*InviteMemberRequest)(nil), // 24: livekit.publicapi.projects.v1.InviteMemberRequest + (*InviteMemberResponse)(nil), // 25: livekit.publicapi.projects.v1.InviteMemberResponse + (*ListInvitesRequest)(nil), // 26: livekit.publicapi.projects.v1.ListInvitesRequest + (*ListInvitesResponse)(nil), // 27: livekit.publicapi.projects.v1.ListInvitesResponse + (*GetInviteRequest)(nil), // 28: livekit.publicapi.projects.v1.GetInviteRequest + (*GetInviteResponse)(nil), // 29: livekit.publicapi.projects.v1.GetInviteResponse + (*UpdateInviteRequest)(nil), // 30: livekit.publicapi.projects.v1.UpdateInviteRequest + (*UpdateInviteResponse)(nil), // 31: livekit.publicapi.projects.v1.UpdateInviteResponse + (*DeleteInviteRequest)(nil), // 32: livekit.publicapi.projects.v1.DeleteInviteRequest + (*DeleteInviteResponse)(nil), // 33: livekit.publicapi.projects.v1.DeleteInviteResponse + (*AnswerInvitationRequest)(nil), // 34: livekit.publicapi.projects.v1.AnswerInvitationRequest + (*AnswerInvitationResponse)(nil), // 35: livekit.publicapi.projects.v1.AnswerInvitationResponse + (*AddWorkspaceMembersToProjectRequest)(nil), // 36: livekit.publicapi.projects.v1.AddWorkspaceMembersToProjectRequest + (*AddWorkspaceMembersToProjectResponse)(nil), // 37: livekit.publicapi.projects.v1.AddWorkspaceMembersToProjectResponse + nil, // 38: livekit.publicapi.projects.v1.ProjectPreferences.FeatureFlagsEntry + nil, // 39: livekit.publicapi.projects.v1.ProjectPreferences.RoomConfigurationsEntry + nil, // 40: livekit.publicapi.projects.v1.UpdateProjectRequest.FeatureFlagsEntry + (*livekit.FilterParams)(nil), // 41: livekit.FilterParams + (*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp + (api.PIIRedactionCategory)(0), // 43: cloud_protocol.PIIRedactionCategory + (*v1.PageRequest)(nil), // 44: livekit.publicapi.common.v1.PageRequest + (*v1.PageInfo)(nil), // 45: livekit.publicapi.common.v1.PageInfo + (*livekit.RoomConfiguration)(nil), // 46: livekit.RoomConfiguration +} +var file_livekit_publicapi_projects_v1_projects_proto_depIdxs = []int32{ + 41, // 0: livekit.publicapi.projects.v1.Webhook.filter_params:type_name -> livekit.FilterParams + 38, // 1: livekit.publicapi.projects.v1.ProjectPreferences.feature_flags:type_name -> livekit.publicapi.projects.v1.ProjectPreferences.FeatureFlagsEntry + 39, // 2: livekit.publicapi.projects.v1.ProjectPreferences.room_configurations:type_name -> livekit.publicapi.projects.v1.ProjectPreferences.RoomConfigurationsEntry + 42, // 3: livekit.publicapi.projects.v1.Project.created_at:type_name -> google.protobuf.Timestamp + 0, // 4: livekit.publicapi.projects.v1.Project.webhooks:type_name -> livekit.publicapi.projects.v1.Webhook + 1, // 5: livekit.publicapi.projects.v1.Project.preferences:type_name -> livekit.publicapi.projects.v1.ProjectPreferences + 43, // 6: livekit.publicapi.projects.v1.Project.pii_redaction_categories:type_name -> cloud_protocol.PIIRedactionCategory + 44, // 7: livekit.publicapi.projects.v1.ListProjectsRequest.page:type_name -> livekit.publicapi.common.v1.PageRequest + 2, // 8: livekit.publicapi.projects.v1.ListProjectsResponse.items:type_name -> livekit.publicapi.projects.v1.Project + 45, // 9: livekit.publicapi.projects.v1.ListProjectsResponse.page_info:type_name -> livekit.publicapi.common.v1.PageInfo + 2, // 10: livekit.publicapi.projects.v1.GetProjectResponse.project:type_name -> livekit.publicapi.projects.v1.Project + 7, // 11: livekit.publicapi.projects.v1.CreateProjectRequest.members:type_name -> livekit.publicapi.projects.v1.CreateProjectMember + 2, // 12: livekit.publicapi.projects.v1.CreateProjectResponse.project:type_name -> livekit.publicapi.projects.v1.Project + 7, // 13: livekit.publicapi.projects.v1.UpdateProjectRequest.members:type_name -> livekit.publicapi.projects.v1.CreateProjectMember + 43, // 14: livekit.publicapi.projects.v1.UpdateProjectRequest.pii_redaction_categories:type_name -> cloud_protocol.PIIRedactionCategory + 40, // 15: livekit.publicapi.projects.v1.UpdateProjectRequest.feature_flags:type_name -> livekit.publicapi.projects.v1.UpdateProjectRequest.FeatureFlagsEntry + 46, // 16: livekit.publicapi.projects.v1.UpdateProjectRequest.room_configs_to_upsert:type_name -> livekit.RoomConfiguration + 2, // 17: livekit.publicapi.projects.v1.UpdateProjectResponse.project:type_name -> livekit.publicapi.projects.v1.Project + 42, // 18: livekit.publicapi.projects.v1.ProjectInvite.expires_at:type_name -> google.protobuf.Timestamp + 14, // 19: livekit.publicapi.projects.v1.ListMembersResponse.items:type_name -> livekit.publicapi.projects.v1.ProjectMember + 14, // 20: livekit.publicapi.projects.v1.GetMemberResponse.member:type_name -> livekit.publicapi.projects.v1.ProjectMember + 14, // 21: livekit.publicapi.projects.v1.UpdateMemberResponse.member:type_name -> livekit.publicapi.projects.v1.ProjectMember + 15, // 22: livekit.publicapi.projects.v1.ListInvitesResponse.items:type_name -> livekit.publicapi.projects.v1.ProjectInvite + 15, // 23: livekit.publicapi.projects.v1.GetInviteResponse.invite:type_name -> livekit.publicapi.projects.v1.ProjectInvite + 15, // 24: livekit.publicapi.projects.v1.UpdateInviteResponse.invite:type_name -> livekit.publicapi.projects.v1.ProjectInvite + 14, // 25: livekit.publicapi.projects.v1.AnswerInvitationResponse.member:type_name -> livekit.publicapi.projects.v1.ProjectMember + 14, // 26: livekit.publicapi.projects.v1.AddWorkspaceMembersToProjectResponse.items:type_name -> livekit.publicapi.projects.v1.ProjectMember + 46, // 27: livekit.publicapi.projects.v1.ProjectPreferences.RoomConfigurationsEntry.value:type_name -> livekit.RoomConfiguration + 3, // 28: livekit.publicapi.projects.v1.ProjectService.ListProjects:input_type -> livekit.publicapi.projects.v1.ListProjectsRequest + 5, // 29: livekit.publicapi.projects.v1.ProjectService.GetProject:input_type -> livekit.publicapi.projects.v1.GetProjectRequest + 8, // 30: livekit.publicapi.projects.v1.ProjectService.CreateProject:input_type -> livekit.publicapi.projects.v1.CreateProjectRequest + 10, // 31: livekit.publicapi.projects.v1.ProjectService.UpdateProject:input_type -> livekit.publicapi.projects.v1.UpdateProjectRequest + 12, // 32: livekit.publicapi.projects.v1.ProjectService.DeleteProject:input_type -> livekit.publicapi.projects.v1.DeleteProjectRequest + 16, // 33: livekit.publicapi.projects.v1.ProjectService.ListMembers:input_type -> livekit.publicapi.projects.v1.ListMembersRequest + 18, // 34: livekit.publicapi.projects.v1.ProjectService.GetMember:input_type -> livekit.publicapi.projects.v1.GetMemberRequest + 20, // 35: livekit.publicapi.projects.v1.ProjectService.UpdateMember:input_type -> livekit.publicapi.projects.v1.UpdateMemberRequest + 22, // 36: livekit.publicapi.projects.v1.ProjectService.RemoveMember:input_type -> livekit.publicapi.projects.v1.RemoveMemberRequest + 24, // 37: livekit.publicapi.projects.v1.ProjectService.InviteMember:input_type -> livekit.publicapi.projects.v1.InviteMemberRequest + 26, // 38: livekit.publicapi.projects.v1.ProjectService.ListInvites:input_type -> livekit.publicapi.projects.v1.ListInvitesRequest + 28, // 39: livekit.publicapi.projects.v1.ProjectService.GetInvite:input_type -> livekit.publicapi.projects.v1.GetInviteRequest + 30, // 40: livekit.publicapi.projects.v1.ProjectService.UpdateInvite:input_type -> livekit.publicapi.projects.v1.UpdateInviteRequest + 32, // 41: livekit.publicapi.projects.v1.ProjectService.DeleteInvite:input_type -> livekit.publicapi.projects.v1.DeleteInviteRequest + 34, // 42: livekit.publicapi.projects.v1.ProjectService.AnswerInvitation:input_type -> livekit.publicapi.projects.v1.AnswerInvitationRequest + 36, // 43: livekit.publicapi.projects.v1.ProjectService.AddWorkspaceMembersToProject:input_type -> livekit.publicapi.projects.v1.AddWorkspaceMembersToProjectRequest + 4, // 44: livekit.publicapi.projects.v1.ProjectService.ListProjects:output_type -> livekit.publicapi.projects.v1.ListProjectsResponse + 6, // 45: livekit.publicapi.projects.v1.ProjectService.GetProject:output_type -> livekit.publicapi.projects.v1.GetProjectResponse + 9, // 46: livekit.publicapi.projects.v1.ProjectService.CreateProject:output_type -> livekit.publicapi.projects.v1.CreateProjectResponse + 11, // 47: livekit.publicapi.projects.v1.ProjectService.UpdateProject:output_type -> livekit.publicapi.projects.v1.UpdateProjectResponse + 13, // 48: livekit.publicapi.projects.v1.ProjectService.DeleteProject:output_type -> livekit.publicapi.projects.v1.DeleteProjectResponse + 17, // 49: livekit.publicapi.projects.v1.ProjectService.ListMembers:output_type -> livekit.publicapi.projects.v1.ListMembersResponse + 19, // 50: livekit.publicapi.projects.v1.ProjectService.GetMember:output_type -> livekit.publicapi.projects.v1.GetMemberResponse + 21, // 51: livekit.publicapi.projects.v1.ProjectService.UpdateMember:output_type -> livekit.publicapi.projects.v1.UpdateMemberResponse + 23, // 52: livekit.publicapi.projects.v1.ProjectService.RemoveMember:output_type -> livekit.publicapi.projects.v1.RemoveMemberResponse + 25, // 53: livekit.publicapi.projects.v1.ProjectService.InviteMember:output_type -> livekit.publicapi.projects.v1.InviteMemberResponse + 27, // 54: livekit.publicapi.projects.v1.ProjectService.ListInvites:output_type -> livekit.publicapi.projects.v1.ListInvitesResponse + 29, // 55: livekit.publicapi.projects.v1.ProjectService.GetInvite:output_type -> livekit.publicapi.projects.v1.GetInviteResponse + 31, // 56: livekit.publicapi.projects.v1.ProjectService.UpdateInvite:output_type -> livekit.publicapi.projects.v1.UpdateInviteResponse + 33, // 57: livekit.publicapi.projects.v1.ProjectService.DeleteInvite:output_type -> livekit.publicapi.projects.v1.DeleteInviteResponse + 35, // 58: livekit.publicapi.projects.v1.ProjectService.AnswerInvitation:output_type -> livekit.publicapi.projects.v1.AnswerInvitationResponse + 37, // 59: livekit.publicapi.projects.v1.ProjectService.AddWorkspaceMembersToProject:output_type -> livekit.publicapi.projects.v1.AddWorkspaceMembersToProjectResponse + 44, // [44:60] is the sub-list for method output_type + 28, // [28:44] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name +} + +func init() { file_livekit_publicapi_projects_v1_projects_proto_init() } +func file_livekit_publicapi_projects_v1_projects_proto_init() { + if File_livekit_publicapi_projects_v1_projects_proto != nil { + return + } + file_livekit_publicapi_projects_v1_projects_proto_msgTypes[10].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_publicapi_projects_v1_projects_proto_rawDesc), len(file_livekit_publicapi_projects_v1_projects_proto_rawDesc)), + NumEnums: 0, + NumMessages: 41, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_livekit_publicapi_projects_v1_projects_proto_goTypes, + DependencyIndexes: file_livekit_publicapi_projects_v1_projects_proto_depIdxs, + MessageInfos: file_livekit_publicapi_projects_v1_projects_proto_msgTypes, + }.Build() + File_livekit_publicapi_projects_v1_projects_proto = out.File + file_livekit_publicapi_projects_v1_projects_proto_goTypes = nil + file_livekit_publicapi_projects_v1_projects_proto_depIdxs = nil +} diff --git a/pkg/gen/livekit/publicapi/projects/v1/projectsv1connect/projects.connect.go b/pkg/gen/livekit/publicapi/projects/v1/projectsv1connect/projects.connect.go new file mode 100644 index 000000000..e1a429621 --- /dev/null +++ b/pkg/gen/livekit/publicapi/projects/v1/projectsv1connect/projects.connect.go @@ -0,0 +1,548 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: livekit/publicapi/projects/v1/projects.proto + +package projectsv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/projects/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // ProjectServiceName is the fully-qualified name of the ProjectService service. + ProjectServiceName = "livekit.publicapi.projects.v1.ProjectService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // ProjectServiceListProjectsProcedure is the fully-qualified name of the ProjectService's + // ListProjects RPC. + ProjectServiceListProjectsProcedure = "/livekit.publicapi.projects.v1.ProjectService/ListProjects" + // ProjectServiceGetProjectProcedure is the fully-qualified name of the ProjectService's GetProject + // RPC. + ProjectServiceGetProjectProcedure = "/livekit.publicapi.projects.v1.ProjectService/GetProject" + // ProjectServiceCreateProjectProcedure is the fully-qualified name of the ProjectService's + // CreateProject RPC. + ProjectServiceCreateProjectProcedure = "/livekit.publicapi.projects.v1.ProjectService/CreateProject" + // ProjectServiceUpdateProjectProcedure is the fully-qualified name of the ProjectService's + // UpdateProject RPC. + ProjectServiceUpdateProjectProcedure = "/livekit.publicapi.projects.v1.ProjectService/UpdateProject" + // ProjectServiceDeleteProjectProcedure is the fully-qualified name of the ProjectService's + // DeleteProject RPC. + ProjectServiceDeleteProjectProcedure = "/livekit.publicapi.projects.v1.ProjectService/DeleteProject" + // ProjectServiceListMembersProcedure is the fully-qualified name of the ProjectService's + // ListMembers RPC. + ProjectServiceListMembersProcedure = "/livekit.publicapi.projects.v1.ProjectService/ListMembers" + // ProjectServiceGetMemberProcedure is the fully-qualified name of the ProjectService's GetMember + // RPC. + ProjectServiceGetMemberProcedure = "/livekit.publicapi.projects.v1.ProjectService/GetMember" + // ProjectServiceUpdateMemberProcedure is the fully-qualified name of the ProjectService's + // UpdateMember RPC. + ProjectServiceUpdateMemberProcedure = "/livekit.publicapi.projects.v1.ProjectService/UpdateMember" + // ProjectServiceRemoveMemberProcedure is the fully-qualified name of the ProjectService's + // RemoveMember RPC. + ProjectServiceRemoveMemberProcedure = "/livekit.publicapi.projects.v1.ProjectService/RemoveMember" + // ProjectServiceInviteMemberProcedure is the fully-qualified name of the ProjectService's + // InviteMember RPC. + ProjectServiceInviteMemberProcedure = "/livekit.publicapi.projects.v1.ProjectService/InviteMember" + // ProjectServiceListInvitesProcedure is the fully-qualified name of the ProjectService's + // ListInvites RPC. + ProjectServiceListInvitesProcedure = "/livekit.publicapi.projects.v1.ProjectService/ListInvites" + // ProjectServiceGetInviteProcedure is the fully-qualified name of the ProjectService's GetInvite + // RPC. + ProjectServiceGetInviteProcedure = "/livekit.publicapi.projects.v1.ProjectService/GetInvite" + // ProjectServiceUpdateInviteProcedure is the fully-qualified name of the ProjectService's + // UpdateInvite RPC. + ProjectServiceUpdateInviteProcedure = "/livekit.publicapi.projects.v1.ProjectService/UpdateInvite" + // ProjectServiceDeleteInviteProcedure is the fully-qualified name of the ProjectService's + // DeleteInvite RPC. + ProjectServiceDeleteInviteProcedure = "/livekit.publicapi.projects.v1.ProjectService/DeleteInvite" + // ProjectServiceAnswerInvitationProcedure is the fully-qualified name of the ProjectService's + // AnswerInvitation RPC. + ProjectServiceAnswerInvitationProcedure = "/livekit.publicapi.projects.v1.ProjectService/AnswerInvitation" + // ProjectServiceAddWorkspaceMembersToProjectProcedure is the fully-qualified name of the + // ProjectService's AddWorkspaceMembersToProject RPC. + ProjectServiceAddWorkspaceMembersToProjectProcedure = "/livekit.publicapi.projects.v1.ProjectService/AddWorkspaceMembersToProject" +) + +// ProjectServiceClient is a client for the livekit.publicapi.projects.v1.ProjectService service. +type ProjectServiceClient interface { + ListProjects(context.Context, *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v1.ListProjectsResponse], error) + GetProject(context.Context, *connect.Request[v1.GetProjectRequest]) (*connect.Response[v1.GetProjectResponse], error) + CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v1.CreateProjectResponse], error) + UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) + DeleteProject(context.Context, *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v1.DeleteProjectResponse], error) + // Members & invites (token-based; mirrors cloud ProjectService current flows). + ListMembers(context.Context, *connect.Request[v1.ListMembersRequest]) (*connect.Response[v1.ListMembersResponse], error) + GetMember(context.Context, *connect.Request[v1.GetMemberRequest]) (*connect.Response[v1.GetMemberResponse], error) + UpdateMember(context.Context, *connect.Request[v1.UpdateMemberRequest]) (*connect.Response[v1.UpdateMemberResponse], error) + RemoveMember(context.Context, *connect.Request[v1.RemoveMemberRequest]) (*connect.Response[v1.RemoveMemberResponse], error) + InviteMember(context.Context, *connect.Request[v1.InviteMemberRequest]) (*connect.Response[v1.InviteMemberResponse], error) + ListInvites(context.Context, *connect.Request[v1.ListInvitesRequest]) (*connect.Response[v1.ListInvitesResponse], error) + GetInvite(context.Context, *connect.Request[v1.GetInviteRequest]) (*connect.Response[v1.GetInviteResponse], error) + UpdateInvite(context.Context, *connect.Request[v1.UpdateInviteRequest]) (*connect.Response[v1.UpdateInviteResponse], error) + DeleteInvite(context.Context, *connect.Request[v1.DeleteInviteRequest]) (*connect.Response[v1.DeleteInviteResponse], error) + AnswerInvitation(context.Context, *connect.Request[v1.AnswerInvitationRequest]) (*connect.Response[v1.AnswerInvitationResponse], error) + AddWorkspaceMembersToProject(context.Context, *connect.Request[v1.AddWorkspaceMembersToProjectRequest]) (*connect.Response[v1.AddWorkspaceMembersToProjectResponse], error) +} + +// NewProjectServiceClient constructs a client for the livekit.publicapi.projects.v1.ProjectService +// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for +// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply +// the connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewProjectServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ProjectServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + projectServiceMethods := v1.File_livekit_publicapi_projects_v1_projects_proto.Services().ByName("ProjectService").Methods() + return &projectServiceClient{ + listProjects: connect.NewClient[v1.ListProjectsRequest, v1.ListProjectsResponse]( + httpClient, + baseURL+ProjectServiceListProjectsProcedure, + connect.WithSchema(projectServiceMethods.ByName("ListProjects")), + connect.WithClientOptions(opts...), + ), + getProject: connect.NewClient[v1.GetProjectRequest, v1.GetProjectResponse]( + httpClient, + baseURL+ProjectServiceGetProjectProcedure, + connect.WithSchema(projectServiceMethods.ByName("GetProject")), + connect.WithClientOptions(opts...), + ), + createProject: connect.NewClient[v1.CreateProjectRequest, v1.CreateProjectResponse]( + httpClient, + baseURL+ProjectServiceCreateProjectProcedure, + connect.WithSchema(projectServiceMethods.ByName("CreateProject")), + connect.WithClientOptions(opts...), + ), + updateProject: connect.NewClient[v1.UpdateProjectRequest, v1.UpdateProjectResponse]( + httpClient, + baseURL+ProjectServiceUpdateProjectProcedure, + connect.WithSchema(projectServiceMethods.ByName("UpdateProject")), + connect.WithClientOptions(opts...), + ), + deleteProject: connect.NewClient[v1.DeleteProjectRequest, v1.DeleteProjectResponse]( + httpClient, + baseURL+ProjectServiceDeleteProjectProcedure, + connect.WithSchema(projectServiceMethods.ByName("DeleteProject")), + connect.WithClientOptions(opts...), + ), + listMembers: connect.NewClient[v1.ListMembersRequest, v1.ListMembersResponse]( + httpClient, + baseURL+ProjectServiceListMembersProcedure, + connect.WithSchema(projectServiceMethods.ByName("ListMembers")), + connect.WithClientOptions(opts...), + ), + getMember: connect.NewClient[v1.GetMemberRequest, v1.GetMemberResponse]( + httpClient, + baseURL+ProjectServiceGetMemberProcedure, + connect.WithSchema(projectServiceMethods.ByName("GetMember")), + connect.WithClientOptions(opts...), + ), + updateMember: connect.NewClient[v1.UpdateMemberRequest, v1.UpdateMemberResponse]( + httpClient, + baseURL+ProjectServiceUpdateMemberProcedure, + connect.WithSchema(projectServiceMethods.ByName("UpdateMember")), + connect.WithClientOptions(opts...), + ), + removeMember: connect.NewClient[v1.RemoveMemberRequest, v1.RemoveMemberResponse]( + httpClient, + baseURL+ProjectServiceRemoveMemberProcedure, + connect.WithSchema(projectServiceMethods.ByName("RemoveMember")), + connect.WithClientOptions(opts...), + ), + inviteMember: connect.NewClient[v1.InviteMemberRequest, v1.InviteMemberResponse]( + httpClient, + baseURL+ProjectServiceInviteMemberProcedure, + connect.WithSchema(projectServiceMethods.ByName("InviteMember")), + connect.WithClientOptions(opts...), + ), + listInvites: connect.NewClient[v1.ListInvitesRequest, v1.ListInvitesResponse]( + httpClient, + baseURL+ProjectServiceListInvitesProcedure, + connect.WithSchema(projectServiceMethods.ByName("ListInvites")), + connect.WithClientOptions(opts...), + ), + getInvite: connect.NewClient[v1.GetInviteRequest, v1.GetInviteResponse]( + httpClient, + baseURL+ProjectServiceGetInviteProcedure, + connect.WithSchema(projectServiceMethods.ByName("GetInvite")), + connect.WithClientOptions(opts...), + ), + updateInvite: connect.NewClient[v1.UpdateInviteRequest, v1.UpdateInviteResponse]( + httpClient, + baseURL+ProjectServiceUpdateInviteProcedure, + connect.WithSchema(projectServiceMethods.ByName("UpdateInvite")), + connect.WithClientOptions(opts...), + ), + deleteInvite: connect.NewClient[v1.DeleteInviteRequest, v1.DeleteInviteResponse]( + httpClient, + baseURL+ProjectServiceDeleteInviteProcedure, + connect.WithSchema(projectServiceMethods.ByName("DeleteInvite")), + connect.WithClientOptions(opts...), + ), + answerInvitation: connect.NewClient[v1.AnswerInvitationRequest, v1.AnswerInvitationResponse]( + httpClient, + baseURL+ProjectServiceAnswerInvitationProcedure, + connect.WithSchema(projectServiceMethods.ByName("AnswerInvitation")), + connect.WithClientOptions(opts...), + ), + addWorkspaceMembersToProject: connect.NewClient[v1.AddWorkspaceMembersToProjectRequest, v1.AddWorkspaceMembersToProjectResponse]( + httpClient, + baseURL+ProjectServiceAddWorkspaceMembersToProjectProcedure, + connect.WithSchema(projectServiceMethods.ByName("AddWorkspaceMembersToProject")), + connect.WithClientOptions(opts...), + ), + } +} + +// projectServiceClient implements ProjectServiceClient. +type projectServiceClient struct { + listProjects *connect.Client[v1.ListProjectsRequest, v1.ListProjectsResponse] + getProject *connect.Client[v1.GetProjectRequest, v1.GetProjectResponse] + createProject *connect.Client[v1.CreateProjectRequest, v1.CreateProjectResponse] + updateProject *connect.Client[v1.UpdateProjectRequest, v1.UpdateProjectResponse] + deleteProject *connect.Client[v1.DeleteProjectRequest, v1.DeleteProjectResponse] + listMembers *connect.Client[v1.ListMembersRequest, v1.ListMembersResponse] + getMember *connect.Client[v1.GetMemberRequest, v1.GetMemberResponse] + updateMember *connect.Client[v1.UpdateMemberRequest, v1.UpdateMemberResponse] + removeMember *connect.Client[v1.RemoveMemberRequest, v1.RemoveMemberResponse] + inviteMember *connect.Client[v1.InviteMemberRequest, v1.InviteMemberResponse] + listInvites *connect.Client[v1.ListInvitesRequest, v1.ListInvitesResponse] + getInvite *connect.Client[v1.GetInviteRequest, v1.GetInviteResponse] + updateInvite *connect.Client[v1.UpdateInviteRequest, v1.UpdateInviteResponse] + deleteInvite *connect.Client[v1.DeleteInviteRequest, v1.DeleteInviteResponse] + answerInvitation *connect.Client[v1.AnswerInvitationRequest, v1.AnswerInvitationResponse] + addWorkspaceMembersToProject *connect.Client[v1.AddWorkspaceMembersToProjectRequest, v1.AddWorkspaceMembersToProjectResponse] +} + +// ListProjects calls livekit.publicapi.projects.v1.ProjectService.ListProjects. +func (c *projectServiceClient) ListProjects(ctx context.Context, req *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v1.ListProjectsResponse], error) { + return c.listProjects.CallUnary(ctx, req) +} + +// GetProject calls livekit.publicapi.projects.v1.ProjectService.GetProject. +func (c *projectServiceClient) GetProject(ctx context.Context, req *connect.Request[v1.GetProjectRequest]) (*connect.Response[v1.GetProjectResponse], error) { + return c.getProject.CallUnary(ctx, req) +} + +// CreateProject calls livekit.publicapi.projects.v1.ProjectService.CreateProject. +func (c *projectServiceClient) CreateProject(ctx context.Context, req *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v1.CreateProjectResponse], error) { + return c.createProject.CallUnary(ctx, req) +} + +// UpdateProject calls livekit.publicapi.projects.v1.ProjectService.UpdateProject. +func (c *projectServiceClient) UpdateProject(ctx context.Context, req *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) { + return c.updateProject.CallUnary(ctx, req) +} + +// DeleteProject calls livekit.publicapi.projects.v1.ProjectService.DeleteProject. +func (c *projectServiceClient) DeleteProject(ctx context.Context, req *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v1.DeleteProjectResponse], error) { + return c.deleteProject.CallUnary(ctx, req) +} + +// ListMembers calls livekit.publicapi.projects.v1.ProjectService.ListMembers. +func (c *projectServiceClient) ListMembers(ctx context.Context, req *connect.Request[v1.ListMembersRequest]) (*connect.Response[v1.ListMembersResponse], error) { + return c.listMembers.CallUnary(ctx, req) +} + +// GetMember calls livekit.publicapi.projects.v1.ProjectService.GetMember. +func (c *projectServiceClient) GetMember(ctx context.Context, req *connect.Request[v1.GetMemberRequest]) (*connect.Response[v1.GetMemberResponse], error) { + return c.getMember.CallUnary(ctx, req) +} + +// UpdateMember calls livekit.publicapi.projects.v1.ProjectService.UpdateMember. +func (c *projectServiceClient) UpdateMember(ctx context.Context, req *connect.Request[v1.UpdateMemberRequest]) (*connect.Response[v1.UpdateMemberResponse], error) { + return c.updateMember.CallUnary(ctx, req) +} + +// RemoveMember calls livekit.publicapi.projects.v1.ProjectService.RemoveMember. +func (c *projectServiceClient) RemoveMember(ctx context.Context, req *connect.Request[v1.RemoveMemberRequest]) (*connect.Response[v1.RemoveMemberResponse], error) { + return c.removeMember.CallUnary(ctx, req) +} + +// InviteMember calls livekit.publicapi.projects.v1.ProjectService.InviteMember. +func (c *projectServiceClient) InviteMember(ctx context.Context, req *connect.Request[v1.InviteMemberRequest]) (*connect.Response[v1.InviteMemberResponse], error) { + return c.inviteMember.CallUnary(ctx, req) +} + +// ListInvites calls livekit.publicapi.projects.v1.ProjectService.ListInvites. +func (c *projectServiceClient) ListInvites(ctx context.Context, req *connect.Request[v1.ListInvitesRequest]) (*connect.Response[v1.ListInvitesResponse], error) { + return c.listInvites.CallUnary(ctx, req) +} + +// GetInvite calls livekit.publicapi.projects.v1.ProjectService.GetInvite. +func (c *projectServiceClient) GetInvite(ctx context.Context, req *connect.Request[v1.GetInviteRequest]) (*connect.Response[v1.GetInviteResponse], error) { + return c.getInvite.CallUnary(ctx, req) +} + +// UpdateInvite calls livekit.publicapi.projects.v1.ProjectService.UpdateInvite. +func (c *projectServiceClient) UpdateInvite(ctx context.Context, req *connect.Request[v1.UpdateInviteRequest]) (*connect.Response[v1.UpdateInviteResponse], error) { + return c.updateInvite.CallUnary(ctx, req) +} + +// DeleteInvite calls livekit.publicapi.projects.v1.ProjectService.DeleteInvite. +func (c *projectServiceClient) DeleteInvite(ctx context.Context, req *connect.Request[v1.DeleteInviteRequest]) (*connect.Response[v1.DeleteInviteResponse], error) { + return c.deleteInvite.CallUnary(ctx, req) +} + +// AnswerInvitation calls livekit.publicapi.projects.v1.ProjectService.AnswerInvitation. +func (c *projectServiceClient) AnswerInvitation(ctx context.Context, req *connect.Request[v1.AnswerInvitationRequest]) (*connect.Response[v1.AnswerInvitationResponse], error) { + return c.answerInvitation.CallUnary(ctx, req) +} + +// AddWorkspaceMembersToProject calls +// livekit.publicapi.projects.v1.ProjectService.AddWorkspaceMembersToProject. +func (c *projectServiceClient) AddWorkspaceMembersToProject(ctx context.Context, req *connect.Request[v1.AddWorkspaceMembersToProjectRequest]) (*connect.Response[v1.AddWorkspaceMembersToProjectResponse], error) { + return c.addWorkspaceMembersToProject.CallUnary(ctx, req) +} + +// ProjectServiceHandler is an implementation of the livekit.publicapi.projects.v1.ProjectService +// service. +type ProjectServiceHandler interface { + ListProjects(context.Context, *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v1.ListProjectsResponse], error) + GetProject(context.Context, *connect.Request[v1.GetProjectRequest]) (*connect.Response[v1.GetProjectResponse], error) + CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v1.CreateProjectResponse], error) + UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) + DeleteProject(context.Context, *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v1.DeleteProjectResponse], error) + // Members & invites (token-based; mirrors cloud ProjectService current flows). + ListMembers(context.Context, *connect.Request[v1.ListMembersRequest]) (*connect.Response[v1.ListMembersResponse], error) + GetMember(context.Context, *connect.Request[v1.GetMemberRequest]) (*connect.Response[v1.GetMemberResponse], error) + UpdateMember(context.Context, *connect.Request[v1.UpdateMemberRequest]) (*connect.Response[v1.UpdateMemberResponse], error) + RemoveMember(context.Context, *connect.Request[v1.RemoveMemberRequest]) (*connect.Response[v1.RemoveMemberResponse], error) + InviteMember(context.Context, *connect.Request[v1.InviteMemberRequest]) (*connect.Response[v1.InviteMemberResponse], error) + ListInvites(context.Context, *connect.Request[v1.ListInvitesRequest]) (*connect.Response[v1.ListInvitesResponse], error) + GetInvite(context.Context, *connect.Request[v1.GetInviteRequest]) (*connect.Response[v1.GetInviteResponse], error) + UpdateInvite(context.Context, *connect.Request[v1.UpdateInviteRequest]) (*connect.Response[v1.UpdateInviteResponse], error) + DeleteInvite(context.Context, *connect.Request[v1.DeleteInviteRequest]) (*connect.Response[v1.DeleteInviteResponse], error) + AnswerInvitation(context.Context, *connect.Request[v1.AnswerInvitationRequest]) (*connect.Response[v1.AnswerInvitationResponse], error) + AddWorkspaceMembersToProject(context.Context, *connect.Request[v1.AddWorkspaceMembersToProjectRequest]) (*connect.Response[v1.AddWorkspaceMembersToProjectResponse], error) +} + +// NewProjectServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewProjectServiceHandler(svc ProjectServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + projectServiceMethods := v1.File_livekit_publicapi_projects_v1_projects_proto.Services().ByName("ProjectService").Methods() + projectServiceListProjectsHandler := connect.NewUnaryHandler( + ProjectServiceListProjectsProcedure, + svc.ListProjects, + connect.WithSchema(projectServiceMethods.ByName("ListProjects")), + connect.WithHandlerOptions(opts...), + ) + projectServiceGetProjectHandler := connect.NewUnaryHandler( + ProjectServiceGetProjectProcedure, + svc.GetProject, + connect.WithSchema(projectServiceMethods.ByName("GetProject")), + connect.WithHandlerOptions(opts...), + ) + projectServiceCreateProjectHandler := connect.NewUnaryHandler( + ProjectServiceCreateProjectProcedure, + svc.CreateProject, + connect.WithSchema(projectServiceMethods.ByName("CreateProject")), + connect.WithHandlerOptions(opts...), + ) + projectServiceUpdateProjectHandler := connect.NewUnaryHandler( + ProjectServiceUpdateProjectProcedure, + svc.UpdateProject, + connect.WithSchema(projectServiceMethods.ByName("UpdateProject")), + connect.WithHandlerOptions(opts...), + ) + projectServiceDeleteProjectHandler := connect.NewUnaryHandler( + ProjectServiceDeleteProjectProcedure, + svc.DeleteProject, + connect.WithSchema(projectServiceMethods.ByName("DeleteProject")), + connect.WithHandlerOptions(opts...), + ) + projectServiceListMembersHandler := connect.NewUnaryHandler( + ProjectServiceListMembersProcedure, + svc.ListMembers, + connect.WithSchema(projectServiceMethods.ByName("ListMembers")), + connect.WithHandlerOptions(opts...), + ) + projectServiceGetMemberHandler := connect.NewUnaryHandler( + ProjectServiceGetMemberProcedure, + svc.GetMember, + connect.WithSchema(projectServiceMethods.ByName("GetMember")), + connect.WithHandlerOptions(opts...), + ) + projectServiceUpdateMemberHandler := connect.NewUnaryHandler( + ProjectServiceUpdateMemberProcedure, + svc.UpdateMember, + connect.WithSchema(projectServiceMethods.ByName("UpdateMember")), + connect.WithHandlerOptions(opts...), + ) + projectServiceRemoveMemberHandler := connect.NewUnaryHandler( + ProjectServiceRemoveMemberProcedure, + svc.RemoveMember, + connect.WithSchema(projectServiceMethods.ByName("RemoveMember")), + connect.WithHandlerOptions(opts...), + ) + projectServiceInviteMemberHandler := connect.NewUnaryHandler( + ProjectServiceInviteMemberProcedure, + svc.InviteMember, + connect.WithSchema(projectServiceMethods.ByName("InviteMember")), + connect.WithHandlerOptions(opts...), + ) + projectServiceListInvitesHandler := connect.NewUnaryHandler( + ProjectServiceListInvitesProcedure, + svc.ListInvites, + connect.WithSchema(projectServiceMethods.ByName("ListInvites")), + connect.WithHandlerOptions(opts...), + ) + projectServiceGetInviteHandler := connect.NewUnaryHandler( + ProjectServiceGetInviteProcedure, + svc.GetInvite, + connect.WithSchema(projectServiceMethods.ByName("GetInvite")), + connect.WithHandlerOptions(opts...), + ) + projectServiceUpdateInviteHandler := connect.NewUnaryHandler( + ProjectServiceUpdateInviteProcedure, + svc.UpdateInvite, + connect.WithSchema(projectServiceMethods.ByName("UpdateInvite")), + connect.WithHandlerOptions(opts...), + ) + projectServiceDeleteInviteHandler := connect.NewUnaryHandler( + ProjectServiceDeleteInviteProcedure, + svc.DeleteInvite, + connect.WithSchema(projectServiceMethods.ByName("DeleteInvite")), + connect.WithHandlerOptions(opts...), + ) + projectServiceAnswerInvitationHandler := connect.NewUnaryHandler( + ProjectServiceAnswerInvitationProcedure, + svc.AnswerInvitation, + connect.WithSchema(projectServiceMethods.ByName("AnswerInvitation")), + connect.WithHandlerOptions(opts...), + ) + projectServiceAddWorkspaceMembersToProjectHandler := connect.NewUnaryHandler( + ProjectServiceAddWorkspaceMembersToProjectProcedure, + svc.AddWorkspaceMembersToProject, + connect.WithSchema(projectServiceMethods.ByName("AddWorkspaceMembersToProject")), + connect.WithHandlerOptions(opts...), + ) + return "/livekit.publicapi.projects.v1.ProjectService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case ProjectServiceListProjectsProcedure: + projectServiceListProjectsHandler.ServeHTTP(w, r) + case ProjectServiceGetProjectProcedure: + projectServiceGetProjectHandler.ServeHTTP(w, r) + case ProjectServiceCreateProjectProcedure: + projectServiceCreateProjectHandler.ServeHTTP(w, r) + case ProjectServiceUpdateProjectProcedure: + projectServiceUpdateProjectHandler.ServeHTTP(w, r) + case ProjectServiceDeleteProjectProcedure: + projectServiceDeleteProjectHandler.ServeHTTP(w, r) + case ProjectServiceListMembersProcedure: + projectServiceListMembersHandler.ServeHTTP(w, r) + case ProjectServiceGetMemberProcedure: + projectServiceGetMemberHandler.ServeHTTP(w, r) + case ProjectServiceUpdateMemberProcedure: + projectServiceUpdateMemberHandler.ServeHTTP(w, r) + case ProjectServiceRemoveMemberProcedure: + projectServiceRemoveMemberHandler.ServeHTTP(w, r) + case ProjectServiceInviteMemberProcedure: + projectServiceInviteMemberHandler.ServeHTTP(w, r) + case ProjectServiceListInvitesProcedure: + projectServiceListInvitesHandler.ServeHTTP(w, r) + case ProjectServiceGetInviteProcedure: + projectServiceGetInviteHandler.ServeHTTP(w, r) + case ProjectServiceUpdateInviteProcedure: + projectServiceUpdateInviteHandler.ServeHTTP(w, r) + case ProjectServiceDeleteInviteProcedure: + projectServiceDeleteInviteHandler.ServeHTTP(w, r) + case ProjectServiceAnswerInvitationProcedure: + projectServiceAnswerInvitationHandler.ServeHTTP(w, r) + case ProjectServiceAddWorkspaceMembersToProjectProcedure: + projectServiceAddWorkspaceMembersToProjectHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedProjectServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedProjectServiceHandler struct{} + +func (UnimplementedProjectServiceHandler) ListProjects(context.Context, *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v1.ListProjectsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.ListProjects is not implemented")) +} + +func (UnimplementedProjectServiceHandler) GetProject(context.Context, *connect.Request[v1.GetProjectRequest]) (*connect.Response[v1.GetProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.GetProject is not implemented")) +} + +func (UnimplementedProjectServiceHandler) CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v1.CreateProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.CreateProject is not implemented")) +} + +func (UnimplementedProjectServiceHandler) UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.UpdateProject is not implemented")) +} + +func (UnimplementedProjectServiceHandler) DeleteProject(context.Context, *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v1.DeleteProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.DeleteProject is not implemented")) +} + +func (UnimplementedProjectServiceHandler) ListMembers(context.Context, *connect.Request[v1.ListMembersRequest]) (*connect.Response[v1.ListMembersResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.ListMembers is not implemented")) +} + +func (UnimplementedProjectServiceHandler) GetMember(context.Context, *connect.Request[v1.GetMemberRequest]) (*connect.Response[v1.GetMemberResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.GetMember is not implemented")) +} + +func (UnimplementedProjectServiceHandler) UpdateMember(context.Context, *connect.Request[v1.UpdateMemberRequest]) (*connect.Response[v1.UpdateMemberResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.UpdateMember is not implemented")) +} + +func (UnimplementedProjectServiceHandler) RemoveMember(context.Context, *connect.Request[v1.RemoveMemberRequest]) (*connect.Response[v1.RemoveMemberResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.RemoveMember is not implemented")) +} + +func (UnimplementedProjectServiceHandler) InviteMember(context.Context, *connect.Request[v1.InviteMemberRequest]) (*connect.Response[v1.InviteMemberResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.InviteMember is not implemented")) +} + +func (UnimplementedProjectServiceHandler) ListInvites(context.Context, *connect.Request[v1.ListInvitesRequest]) (*connect.Response[v1.ListInvitesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.ListInvites is not implemented")) +} + +func (UnimplementedProjectServiceHandler) GetInvite(context.Context, *connect.Request[v1.GetInviteRequest]) (*connect.Response[v1.GetInviteResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.GetInvite is not implemented")) +} + +func (UnimplementedProjectServiceHandler) UpdateInvite(context.Context, *connect.Request[v1.UpdateInviteRequest]) (*connect.Response[v1.UpdateInviteResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.UpdateInvite is not implemented")) +} + +func (UnimplementedProjectServiceHandler) DeleteInvite(context.Context, *connect.Request[v1.DeleteInviteRequest]) (*connect.Response[v1.DeleteInviteResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.DeleteInvite is not implemented")) +} + +func (UnimplementedProjectServiceHandler) AnswerInvitation(context.Context, *connect.Request[v1.AnswerInvitationRequest]) (*connect.Response[v1.AnswerInvitationResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.AnswerInvitation is not implemented")) +} + +func (UnimplementedProjectServiceHandler) AddWorkspaceMembersToProject(context.Context, *connect.Request[v1.AddWorkspaceMembersToProjectRequest]) (*connect.Response[v1.AddWorkspaceMembersToProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.projects.v1.ProjectService.AddWorkspaceMembersToProject is not implemented")) +} diff --git a/pkg/gen/livekit/publicapi/simulations/v1/simulations.pb.go b/pkg/gen/livekit/publicapi/simulations/v1/simulations.pb.go new file mode 100644 index 000000000..4100e5fd8 --- /dev/null +++ b/pkg/gen/livekit/publicapi/simulations/v1/simulations.pb.go @@ -0,0 +1,82 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.12 +// protoc v7.35.1 +// source: livekit/publicapi/simulations/v1/simulations.proto + +package simulationsv1 + +import ( + livekit "github.com/livekit/protocol/livekit" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_livekit_publicapi_simulations_v1_simulations_proto protoreflect.FileDescriptor + +const file_livekit_publicapi_simulations_v1_simulations_proto_rawDesc = "" + + "\n" + + "2livekit/publicapi/simulations/v1/simulations.proto\x12 livekit.publicapi.simulations.v1\x1a\x1elivekit_agent_simulation.proto2\x9d\x03\n" + + "\x11SimulationService\x12d\n" + + "\x13CreateSimulationRun\x12%.livekit.SimulationRun.Create.Request\x1a&.livekit.SimulationRun.Create.Response\x12[\n" + + "\x10GetSimulationRun\x12\".livekit.SimulationRun.Get.Request\x1a#.livekit.SimulationRun.Get.Response\x12_\n" + + "\x12ListSimulationRuns\x12#.livekit.SimulationRun.List.Request\x1a$.livekit.SimulationRun.List.Response\x12d\n" + + "\x13CancelSimulationRun\x12%.livekit.SimulationRun.Cancel.Request\x1a&.livekit.SimulationRun.Cancel.Responseb\x06proto3" + +var file_livekit_publicapi_simulations_v1_simulations_proto_goTypes = []any{ + (*livekit.SimulationRun_Create_Request)(nil), // 0: livekit.SimulationRun.Create.Request + (*livekit.SimulationRun_Get_Request)(nil), // 1: livekit.SimulationRun.Get.Request + (*livekit.SimulationRun_List_Request)(nil), // 2: livekit.SimulationRun.List.Request + (*livekit.SimulationRun_Cancel_Request)(nil), // 3: livekit.SimulationRun.Cancel.Request + (*livekit.SimulationRun_Create_Response)(nil), // 4: livekit.SimulationRun.Create.Response + (*livekit.SimulationRun_Get_Response)(nil), // 5: livekit.SimulationRun.Get.Response + (*livekit.SimulationRun_List_Response)(nil), // 6: livekit.SimulationRun.List.Response + (*livekit.SimulationRun_Cancel_Response)(nil), // 7: livekit.SimulationRun.Cancel.Response +} +var file_livekit_publicapi_simulations_v1_simulations_proto_depIdxs = []int32{ + 0, // 0: livekit.publicapi.simulations.v1.SimulationService.CreateSimulationRun:input_type -> livekit.SimulationRun.Create.Request + 1, // 1: livekit.publicapi.simulations.v1.SimulationService.GetSimulationRun:input_type -> livekit.SimulationRun.Get.Request + 2, // 2: livekit.publicapi.simulations.v1.SimulationService.ListSimulationRuns:input_type -> livekit.SimulationRun.List.Request + 3, // 3: livekit.publicapi.simulations.v1.SimulationService.CancelSimulationRun:input_type -> livekit.SimulationRun.Cancel.Request + 4, // 4: livekit.publicapi.simulations.v1.SimulationService.CreateSimulationRun:output_type -> livekit.SimulationRun.Create.Response + 5, // 5: livekit.publicapi.simulations.v1.SimulationService.GetSimulationRun:output_type -> livekit.SimulationRun.Get.Response + 6, // 6: livekit.publicapi.simulations.v1.SimulationService.ListSimulationRuns:output_type -> livekit.SimulationRun.List.Response + 7, // 7: livekit.publicapi.simulations.v1.SimulationService.CancelSimulationRun:output_type -> livekit.SimulationRun.Cancel.Response + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_livekit_publicapi_simulations_v1_simulations_proto_init() } +func file_livekit_publicapi_simulations_v1_simulations_proto_init() { + if File_livekit_publicapi_simulations_v1_simulations_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_publicapi_simulations_v1_simulations_proto_rawDesc), len(file_livekit_publicapi_simulations_v1_simulations_proto_rawDesc)), + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_livekit_publicapi_simulations_v1_simulations_proto_goTypes, + DependencyIndexes: file_livekit_publicapi_simulations_v1_simulations_proto_depIdxs, + }.Build() + File_livekit_publicapi_simulations_v1_simulations_proto = out.File + file_livekit_publicapi_simulations_v1_simulations_proto_goTypes = nil + file_livekit_publicapi_simulations_v1_simulations_proto_depIdxs = nil +} diff --git a/pkg/gen/livekit/publicapi/simulations/v1/simulationsv1connect/simulations.connect.go b/pkg/gen/livekit/publicapi/simulations/v1/simulationsv1connect/simulations.connect.go new file mode 100644 index 000000000..028eac8ad --- /dev/null +++ b/pkg/gen/livekit/publicapi/simulations/v1/simulationsv1connect/simulations.connect.go @@ -0,0 +1,200 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: livekit/publicapi/simulations/v1/simulations.proto + +package simulationsv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/simulations/v1" + livekit "github.com/livekit/protocol/livekit" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // SimulationServiceName is the fully-qualified name of the SimulationService service. + SimulationServiceName = "livekit.publicapi.simulations.v1.SimulationService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // SimulationServiceCreateSimulationRunProcedure is the fully-qualified name of the + // SimulationService's CreateSimulationRun RPC. + SimulationServiceCreateSimulationRunProcedure = "/livekit.publicapi.simulations.v1.SimulationService/CreateSimulationRun" + // SimulationServiceGetSimulationRunProcedure is the fully-qualified name of the SimulationService's + // GetSimulationRun RPC. + SimulationServiceGetSimulationRunProcedure = "/livekit.publicapi.simulations.v1.SimulationService/GetSimulationRun" + // SimulationServiceListSimulationRunsProcedure is the fully-qualified name of the + // SimulationService's ListSimulationRuns RPC. + SimulationServiceListSimulationRunsProcedure = "/livekit.publicapi.simulations.v1.SimulationService/ListSimulationRuns" + // SimulationServiceCancelSimulationRunProcedure is the fully-qualified name of the + // SimulationService's CancelSimulationRun RPC. + SimulationServiceCancelSimulationRunProcedure = "/livekit.publicapi.simulations.v1.SimulationService/CancelSimulationRun" +) + +// SimulationServiceClient is a client for the livekit.publicapi.simulations.v1.SimulationService +// service. +type SimulationServiceClient interface { + CreateSimulationRun(context.Context, *connect.Request[livekit.SimulationRun_Create_Request]) (*connect.Response[livekit.SimulationRun_Create_Response], error) + GetSimulationRun(context.Context, *connect.Request[livekit.SimulationRun_Get_Request]) (*connect.Response[livekit.SimulationRun_Get_Response], error) + ListSimulationRuns(context.Context, *connect.Request[livekit.SimulationRun_List_Request]) (*connect.Response[livekit.SimulationRun_List_Response], error) + CancelSimulationRun(context.Context, *connect.Request[livekit.SimulationRun_Cancel_Request]) (*connect.Response[livekit.SimulationRun_Cancel_Response], error) +} + +// NewSimulationServiceClient constructs a client for the +// livekit.publicapi.simulations.v1.SimulationService service. By default, it uses the Connect +// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed +// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewSimulationServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SimulationServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + simulationServiceMethods := v1.File_livekit_publicapi_simulations_v1_simulations_proto.Services().ByName("SimulationService").Methods() + return &simulationServiceClient{ + createSimulationRun: connect.NewClient[livekit.SimulationRun_Create_Request, livekit.SimulationRun_Create_Response]( + httpClient, + baseURL+SimulationServiceCreateSimulationRunProcedure, + connect.WithSchema(simulationServiceMethods.ByName("CreateSimulationRun")), + connect.WithClientOptions(opts...), + ), + getSimulationRun: connect.NewClient[livekit.SimulationRun_Get_Request, livekit.SimulationRun_Get_Response]( + httpClient, + baseURL+SimulationServiceGetSimulationRunProcedure, + connect.WithSchema(simulationServiceMethods.ByName("GetSimulationRun")), + connect.WithClientOptions(opts...), + ), + listSimulationRuns: connect.NewClient[livekit.SimulationRun_List_Request, livekit.SimulationRun_List_Response]( + httpClient, + baseURL+SimulationServiceListSimulationRunsProcedure, + connect.WithSchema(simulationServiceMethods.ByName("ListSimulationRuns")), + connect.WithClientOptions(opts...), + ), + cancelSimulationRun: connect.NewClient[livekit.SimulationRun_Cancel_Request, livekit.SimulationRun_Cancel_Response]( + httpClient, + baseURL+SimulationServiceCancelSimulationRunProcedure, + connect.WithSchema(simulationServiceMethods.ByName("CancelSimulationRun")), + connect.WithClientOptions(opts...), + ), + } +} + +// simulationServiceClient implements SimulationServiceClient. +type simulationServiceClient struct { + createSimulationRun *connect.Client[livekit.SimulationRun_Create_Request, livekit.SimulationRun_Create_Response] + getSimulationRun *connect.Client[livekit.SimulationRun_Get_Request, livekit.SimulationRun_Get_Response] + listSimulationRuns *connect.Client[livekit.SimulationRun_List_Request, livekit.SimulationRun_List_Response] + cancelSimulationRun *connect.Client[livekit.SimulationRun_Cancel_Request, livekit.SimulationRun_Cancel_Response] +} + +// CreateSimulationRun calls livekit.publicapi.simulations.v1.SimulationService.CreateSimulationRun. +func (c *simulationServiceClient) CreateSimulationRun(ctx context.Context, req *connect.Request[livekit.SimulationRun_Create_Request]) (*connect.Response[livekit.SimulationRun_Create_Response], error) { + return c.createSimulationRun.CallUnary(ctx, req) +} + +// GetSimulationRun calls livekit.publicapi.simulations.v1.SimulationService.GetSimulationRun. +func (c *simulationServiceClient) GetSimulationRun(ctx context.Context, req *connect.Request[livekit.SimulationRun_Get_Request]) (*connect.Response[livekit.SimulationRun_Get_Response], error) { + return c.getSimulationRun.CallUnary(ctx, req) +} + +// ListSimulationRuns calls livekit.publicapi.simulations.v1.SimulationService.ListSimulationRuns. +func (c *simulationServiceClient) ListSimulationRuns(ctx context.Context, req *connect.Request[livekit.SimulationRun_List_Request]) (*connect.Response[livekit.SimulationRun_List_Response], error) { + return c.listSimulationRuns.CallUnary(ctx, req) +} + +// CancelSimulationRun calls livekit.publicapi.simulations.v1.SimulationService.CancelSimulationRun. +func (c *simulationServiceClient) CancelSimulationRun(ctx context.Context, req *connect.Request[livekit.SimulationRun_Cancel_Request]) (*connect.Response[livekit.SimulationRun_Cancel_Response], error) { + return c.cancelSimulationRun.CallUnary(ctx, req) +} + +// SimulationServiceHandler is an implementation of the +// livekit.publicapi.simulations.v1.SimulationService service. +type SimulationServiceHandler interface { + CreateSimulationRun(context.Context, *connect.Request[livekit.SimulationRun_Create_Request]) (*connect.Response[livekit.SimulationRun_Create_Response], error) + GetSimulationRun(context.Context, *connect.Request[livekit.SimulationRun_Get_Request]) (*connect.Response[livekit.SimulationRun_Get_Response], error) + ListSimulationRuns(context.Context, *connect.Request[livekit.SimulationRun_List_Request]) (*connect.Response[livekit.SimulationRun_List_Response], error) + CancelSimulationRun(context.Context, *connect.Request[livekit.SimulationRun_Cancel_Request]) (*connect.Response[livekit.SimulationRun_Cancel_Response], error) +} + +// NewSimulationServiceHandler builds an HTTP handler from the service implementation. It returns +// the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewSimulationServiceHandler(svc SimulationServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + simulationServiceMethods := v1.File_livekit_publicapi_simulations_v1_simulations_proto.Services().ByName("SimulationService").Methods() + simulationServiceCreateSimulationRunHandler := connect.NewUnaryHandler( + SimulationServiceCreateSimulationRunProcedure, + svc.CreateSimulationRun, + connect.WithSchema(simulationServiceMethods.ByName("CreateSimulationRun")), + connect.WithHandlerOptions(opts...), + ) + simulationServiceGetSimulationRunHandler := connect.NewUnaryHandler( + SimulationServiceGetSimulationRunProcedure, + svc.GetSimulationRun, + connect.WithSchema(simulationServiceMethods.ByName("GetSimulationRun")), + connect.WithHandlerOptions(opts...), + ) + simulationServiceListSimulationRunsHandler := connect.NewUnaryHandler( + SimulationServiceListSimulationRunsProcedure, + svc.ListSimulationRuns, + connect.WithSchema(simulationServiceMethods.ByName("ListSimulationRuns")), + connect.WithHandlerOptions(opts...), + ) + simulationServiceCancelSimulationRunHandler := connect.NewUnaryHandler( + SimulationServiceCancelSimulationRunProcedure, + svc.CancelSimulationRun, + connect.WithSchema(simulationServiceMethods.ByName("CancelSimulationRun")), + connect.WithHandlerOptions(opts...), + ) + return "/livekit.publicapi.simulations.v1.SimulationService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case SimulationServiceCreateSimulationRunProcedure: + simulationServiceCreateSimulationRunHandler.ServeHTTP(w, r) + case SimulationServiceGetSimulationRunProcedure: + simulationServiceGetSimulationRunHandler.ServeHTTP(w, r) + case SimulationServiceListSimulationRunsProcedure: + simulationServiceListSimulationRunsHandler.ServeHTTP(w, r) + case SimulationServiceCancelSimulationRunProcedure: + simulationServiceCancelSimulationRunHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedSimulationServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedSimulationServiceHandler struct{} + +func (UnimplementedSimulationServiceHandler) CreateSimulationRun(context.Context, *connect.Request[livekit.SimulationRun_Create_Request]) (*connect.Response[livekit.SimulationRun_Create_Response], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.simulations.v1.SimulationService.CreateSimulationRun is not implemented")) +} + +func (UnimplementedSimulationServiceHandler) GetSimulationRun(context.Context, *connect.Request[livekit.SimulationRun_Get_Request]) (*connect.Response[livekit.SimulationRun_Get_Response], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.simulations.v1.SimulationService.GetSimulationRun is not implemented")) +} + +func (UnimplementedSimulationServiceHandler) ListSimulationRuns(context.Context, *connect.Request[livekit.SimulationRun_List_Request]) (*connect.Response[livekit.SimulationRun_List_Response], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.simulations.v1.SimulationService.ListSimulationRuns is not implemented")) +} + +func (UnimplementedSimulationServiceHandler) CancelSimulationRun(context.Context, *connect.Request[livekit.SimulationRun_Cancel_Request]) (*connect.Response[livekit.SimulationRun_Cancel_Response], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.simulations.v1.SimulationService.CancelSimulationRun is not implemented")) +} diff --git a/pkg/gen/livekit/publicapi/users/v1/users.pb.go b/pkg/gen/livekit/publicapi/users/v1/users.pb.go new file mode 100644 index 000000000..1a1a137ca --- /dev/null +++ b/pkg/gen/livekit/publicapi/users/v1/users.pb.go @@ -0,0 +1,467 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.12 +// protoc v7.35.1 +// source: livekit/publicapi/users/v1/users.proto + +package usersv1 + +import ( + v1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// User is a LiveKit Cloud user (owned by cloud-api-server). +type User struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *User) Reset() { + *x = User{} + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_users_v1_users_proto_rawDescGZIP(), []int{0} +} + +func (x *User) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *User) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *User) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +type ListUsersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page *v1.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"` + // At least one of project_id or workspace_id is required. + // If both are set, project_id must belong to workspace_id; members are + // the project's members. + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + WorkspaceId string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListUsersRequest) Reset() { + *x = ListUsersRequest{} + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUsersRequest) ProtoMessage() {} + +func (x *ListUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead. +func (*ListUsersRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_users_v1_users_proto_rawDescGZIP(), []int{1} +} + +func (x *ListUsersRequest) GetPage() *v1.PageRequest { + if x != nil { + return x.Page + } + return nil +} + +func (x *ListUsersRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListUsersRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type ListUsersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*User `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + PageInfo *v1.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListUsersResponse) Reset() { + *x = ListUsersResponse{} + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListUsersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUsersResponse) ProtoMessage() {} + +func (x *ListUsersResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUsersResponse.ProtoReflect.Descriptor instead. +func (*ListUsersResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_users_v1_users_proto_rawDescGZIP(), []int{2} +} + +func (x *ListUsersResponse) GetItems() []*User { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListUsersResponse) GetPageInfo() *v1.PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +type GetUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUserRequest) Reset() { + *x = GetUserRequest{} + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserRequest) ProtoMessage() {} + +func (x *GetUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead. +func (*GetUserRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_users_v1_users_proto_rawDescGZIP(), []int{3} +} + +func (x *GetUserRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type GetUserResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUserResponse) Reset() { + *x = GetUserResponse{} + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserResponse) ProtoMessage() {} + +func (x *GetUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead. +func (*GetUserResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_users_v1_users_proto_rawDescGZIP(), []int{4} +} + +func (x *GetUserResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +type GetCurrentUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCurrentUserRequest) Reset() { + *x = GetCurrentUserRequest{} + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCurrentUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCurrentUserRequest) ProtoMessage() {} + +func (x *GetCurrentUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCurrentUserRequest.ProtoReflect.Descriptor instead. +func (*GetCurrentUserRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_users_v1_users_proto_rawDescGZIP(), []int{5} +} + +type GetCurrentUserResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCurrentUserResponse) Reset() { + *x = GetCurrentUserResponse{} + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCurrentUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCurrentUserResponse) ProtoMessage() {} + +func (x *GetCurrentUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_users_v1_users_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCurrentUserResponse.ProtoReflect.Descriptor instead. +func (*GetCurrentUserResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_users_v1_users_proto_rawDescGZIP(), []int{6} +} + +func (x *GetCurrentUserResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +var File_livekit_publicapi_users_v1_users_proto protoreflect.FileDescriptor + +const file_livekit_publicapi_users_v1_users_proto_rawDesc = "" + + "\n" + + "&livekit/publicapi/users/v1/users.proto\x12\x1alivekit.publicapi.users.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a(livekit/publicapi/common/v1/common.proto\"g\n" + + "\x04User\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\x129\n" + + "\n" + + "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\x92\x01\n" + + "\x10ListUsersRequest\x12<\n" + + "\x04page\x18\x01 \x01(\v2(.livekit.publicapi.common.v1.PageRequestR\x04page\x12\x1d\n" + + "\n" + + "project_id\x18\x02 \x01(\tR\tprojectId\x12!\n" + + "\fworkspace_id\x18\x03 \x01(\tR\vworkspaceId\"\x8f\x01\n" + + "\x11ListUsersResponse\x126\n" + + "\x05items\x18\x01 \x03(\v2 .livekit.publicapi.users.v1.UserR\x05items\x12B\n" + + "\tpage_info\x18\x02 \x01(\v2%.livekit.publicapi.common.v1.PageInfoR\bpageInfo\")\n" + + "\x0eGetUserRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\"G\n" + + "\x0fGetUserResponse\x124\n" + + "\x04user\x18\x01 \x01(\v2 .livekit.publicapi.users.v1.UserR\x04user\"\x17\n" + + "\x15GetCurrentUserRequest\"N\n" + + "\x16GetCurrentUserResponse\x124\n" + + "\x04user\x18\x01 \x01(\v2 .livekit.publicapi.users.v1.UserR\x04user2\xd4\x02\n" + + "\vUserService\x12h\n" + + "\tListUsers\x12,.livekit.publicapi.users.v1.ListUsersRequest\x1a-.livekit.publicapi.users.v1.ListUsersResponse\x12b\n" + + "\aGetUser\x12*.livekit.publicapi.users.v1.GetUserRequest\x1a+.livekit.publicapi.users.v1.GetUserResponse\x12w\n" + + "\x0eGetCurrentUser\x121.livekit.publicapi.users.v1.GetCurrentUserRequest\x1a2.livekit.publicapi.users.v1.GetCurrentUserResponseb\x06proto3" + +var ( + file_livekit_publicapi_users_v1_users_proto_rawDescOnce sync.Once + file_livekit_publicapi_users_v1_users_proto_rawDescData []byte +) + +func file_livekit_publicapi_users_v1_users_proto_rawDescGZIP() []byte { + file_livekit_publicapi_users_v1_users_proto_rawDescOnce.Do(func() { + file_livekit_publicapi_users_v1_users_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_publicapi_users_v1_users_proto_rawDesc), len(file_livekit_publicapi_users_v1_users_proto_rawDesc))) + }) + return file_livekit_publicapi_users_v1_users_proto_rawDescData +} + +var file_livekit_publicapi_users_v1_users_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_livekit_publicapi_users_v1_users_proto_goTypes = []any{ + (*User)(nil), // 0: livekit.publicapi.users.v1.User + (*ListUsersRequest)(nil), // 1: livekit.publicapi.users.v1.ListUsersRequest + (*ListUsersResponse)(nil), // 2: livekit.publicapi.users.v1.ListUsersResponse + (*GetUserRequest)(nil), // 3: livekit.publicapi.users.v1.GetUserRequest + (*GetUserResponse)(nil), // 4: livekit.publicapi.users.v1.GetUserResponse + (*GetCurrentUserRequest)(nil), // 5: livekit.publicapi.users.v1.GetCurrentUserRequest + (*GetCurrentUserResponse)(nil), // 6: livekit.publicapi.users.v1.GetCurrentUserResponse + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*v1.PageRequest)(nil), // 8: livekit.publicapi.common.v1.PageRequest + (*v1.PageInfo)(nil), // 9: livekit.publicapi.common.v1.PageInfo +} +var file_livekit_publicapi_users_v1_users_proto_depIdxs = []int32{ + 7, // 0: livekit.publicapi.users.v1.User.created_at:type_name -> google.protobuf.Timestamp + 8, // 1: livekit.publicapi.users.v1.ListUsersRequest.page:type_name -> livekit.publicapi.common.v1.PageRequest + 0, // 2: livekit.publicapi.users.v1.ListUsersResponse.items:type_name -> livekit.publicapi.users.v1.User + 9, // 3: livekit.publicapi.users.v1.ListUsersResponse.page_info:type_name -> livekit.publicapi.common.v1.PageInfo + 0, // 4: livekit.publicapi.users.v1.GetUserResponse.user:type_name -> livekit.publicapi.users.v1.User + 0, // 5: livekit.publicapi.users.v1.GetCurrentUserResponse.user:type_name -> livekit.publicapi.users.v1.User + 1, // 6: livekit.publicapi.users.v1.UserService.ListUsers:input_type -> livekit.publicapi.users.v1.ListUsersRequest + 3, // 7: livekit.publicapi.users.v1.UserService.GetUser:input_type -> livekit.publicapi.users.v1.GetUserRequest + 5, // 8: livekit.publicapi.users.v1.UserService.GetCurrentUser:input_type -> livekit.publicapi.users.v1.GetCurrentUserRequest + 2, // 9: livekit.publicapi.users.v1.UserService.ListUsers:output_type -> livekit.publicapi.users.v1.ListUsersResponse + 4, // 10: livekit.publicapi.users.v1.UserService.GetUser:output_type -> livekit.publicapi.users.v1.GetUserResponse + 6, // 11: livekit.publicapi.users.v1.UserService.GetCurrentUser:output_type -> livekit.publicapi.users.v1.GetCurrentUserResponse + 9, // [9:12] is the sub-list for method output_type + 6, // [6:9] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_livekit_publicapi_users_v1_users_proto_init() } +func file_livekit_publicapi_users_v1_users_proto_init() { + if File_livekit_publicapi_users_v1_users_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_publicapi_users_v1_users_proto_rawDesc), len(file_livekit_publicapi_users_v1_users_proto_rawDesc)), + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_livekit_publicapi_users_v1_users_proto_goTypes, + DependencyIndexes: file_livekit_publicapi_users_v1_users_proto_depIdxs, + MessageInfos: file_livekit_publicapi_users_v1_users_proto_msgTypes, + }.Build() + File_livekit_publicapi_users_v1_users_proto = out.File + file_livekit_publicapi_users_v1_users_proto_goTypes = nil + file_livekit_publicapi_users_v1_users_proto_depIdxs = nil +} diff --git a/pkg/gen/livekit/publicapi/users/v1/usersv1connect/users.connect.go b/pkg/gen/livekit/publicapi/users/v1/usersv1connect/users.connect.go new file mode 100644 index 000000000..0895aa33e --- /dev/null +++ b/pkg/gen/livekit/publicapi/users/v1/usersv1connect/users.connect.go @@ -0,0 +1,165 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: livekit/publicapi/users/v1/users.proto + +package usersv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/users/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // UserServiceName is the fully-qualified name of the UserService service. + UserServiceName = "livekit.publicapi.users.v1.UserService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // UserServiceListUsersProcedure is the fully-qualified name of the UserService's ListUsers RPC. + UserServiceListUsersProcedure = "/livekit.publicapi.users.v1.UserService/ListUsers" + // UserServiceGetUserProcedure is the fully-qualified name of the UserService's GetUser RPC. + UserServiceGetUserProcedure = "/livekit.publicapi.users.v1.UserService/GetUser" + // UserServiceGetCurrentUserProcedure is the fully-qualified name of the UserService's + // GetCurrentUser RPC. + UserServiceGetCurrentUserProcedure = "/livekit.publicapi.users.v1.UserService/GetCurrentUser" +) + +// UserServiceClient is a client for the livekit.publicapi.users.v1.UserService service. +type UserServiceClient interface { + ListUsers(context.Context, *connect.Request[v1.ListUsersRequest]) (*connect.Response[v1.ListUsersResponse], error) + GetUser(context.Context, *connect.Request[v1.GetUserRequest]) (*connect.Response[v1.GetUserResponse], error) + GetCurrentUser(context.Context, *connect.Request[v1.GetCurrentUserRequest]) (*connect.Response[v1.GetCurrentUserResponse], error) +} + +// NewUserServiceClient constructs a client for the livekit.publicapi.users.v1.UserService service. +// By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped +// responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewUserServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) UserServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + userServiceMethods := v1.File_livekit_publicapi_users_v1_users_proto.Services().ByName("UserService").Methods() + return &userServiceClient{ + listUsers: connect.NewClient[v1.ListUsersRequest, v1.ListUsersResponse]( + httpClient, + baseURL+UserServiceListUsersProcedure, + connect.WithSchema(userServiceMethods.ByName("ListUsers")), + connect.WithClientOptions(opts...), + ), + getUser: connect.NewClient[v1.GetUserRequest, v1.GetUserResponse]( + httpClient, + baseURL+UserServiceGetUserProcedure, + connect.WithSchema(userServiceMethods.ByName("GetUser")), + connect.WithClientOptions(opts...), + ), + getCurrentUser: connect.NewClient[v1.GetCurrentUserRequest, v1.GetCurrentUserResponse]( + httpClient, + baseURL+UserServiceGetCurrentUserProcedure, + connect.WithSchema(userServiceMethods.ByName("GetCurrentUser")), + connect.WithClientOptions(opts...), + ), + } +} + +// userServiceClient implements UserServiceClient. +type userServiceClient struct { + listUsers *connect.Client[v1.ListUsersRequest, v1.ListUsersResponse] + getUser *connect.Client[v1.GetUserRequest, v1.GetUserResponse] + getCurrentUser *connect.Client[v1.GetCurrentUserRequest, v1.GetCurrentUserResponse] +} + +// ListUsers calls livekit.publicapi.users.v1.UserService.ListUsers. +func (c *userServiceClient) ListUsers(ctx context.Context, req *connect.Request[v1.ListUsersRequest]) (*connect.Response[v1.ListUsersResponse], error) { + return c.listUsers.CallUnary(ctx, req) +} + +// GetUser calls livekit.publicapi.users.v1.UserService.GetUser. +func (c *userServiceClient) GetUser(ctx context.Context, req *connect.Request[v1.GetUserRequest]) (*connect.Response[v1.GetUserResponse], error) { + return c.getUser.CallUnary(ctx, req) +} + +// GetCurrentUser calls livekit.publicapi.users.v1.UserService.GetCurrentUser. +func (c *userServiceClient) GetCurrentUser(ctx context.Context, req *connect.Request[v1.GetCurrentUserRequest]) (*connect.Response[v1.GetCurrentUserResponse], error) { + return c.getCurrentUser.CallUnary(ctx, req) +} + +// UserServiceHandler is an implementation of the livekit.publicapi.users.v1.UserService service. +type UserServiceHandler interface { + ListUsers(context.Context, *connect.Request[v1.ListUsersRequest]) (*connect.Response[v1.ListUsersResponse], error) + GetUser(context.Context, *connect.Request[v1.GetUserRequest]) (*connect.Response[v1.GetUserResponse], error) + GetCurrentUser(context.Context, *connect.Request[v1.GetCurrentUserRequest]) (*connect.Response[v1.GetCurrentUserResponse], error) +} + +// NewUserServiceHandler builds an HTTP handler from the service implementation. It returns the path +// on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewUserServiceHandler(svc UserServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + userServiceMethods := v1.File_livekit_publicapi_users_v1_users_proto.Services().ByName("UserService").Methods() + userServiceListUsersHandler := connect.NewUnaryHandler( + UserServiceListUsersProcedure, + svc.ListUsers, + connect.WithSchema(userServiceMethods.ByName("ListUsers")), + connect.WithHandlerOptions(opts...), + ) + userServiceGetUserHandler := connect.NewUnaryHandler( + UserServiceGetUserProcedure, + svc.GetUser, + connect.WithSchema(userServiceMethods.ByName("GetUser")), + connect.WithHandlerOptions(opts...), + ) + userServiceGetCurrentUserHandler := connect.NewUnaryHandler( + UserServiceGetCurrentUserProcedure, + svc.GetCurrentUser, + connect.WithSchema(userServiceMethods.ByName("GetCurrentUser")), + connect.WithHandlerOptions(opts...), + ) + return "/livekit.publicapi.users.v1.UserService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case UserServiceListUsersProcedure: + userServiceListUsersHandler.ServeHTTP(w, r) + case UserServiceGetUserProcedure: + userServiceGetUserHandler.ServeHTTP(w, r) + case UserServiceGetCurrentUserProcedure: + userServiceGetCurrentUserHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedUserServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedUserServiceHandler struct{} + +func (UnimplementedUserServiceHandler) ListUsers(context.Context, *connect.Request[v1.ListUsersRequest]) (*connect.Response[v1.ListUsersResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.users.v1.UserService.ListUsers is not implemented")) +} + +func (UnimplementedUserServiceHandler) GetUser(context.Context, *connect.Request[v1.GetUserRequest]) (*connect.Response[v1.GetUserResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.users.v1.UserService.GetUser is not implemented")) +} + +func (UnimplementedUserServiceHandler) GetCurrentUser(context.Context, *connect.Request[v1.GetCurrentUserRequest]) (*connect.Response[v1.GetCurrentUserResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.users.v1.UserService.GetCurrentUser is not implemented")) +} diff --git a/pkg/gen/livekit/publicapi/workspaces/v1/workspaces.pb.go b/pkg/gen/livekit/publicapi/workspaces/v1/workspaces.pb.go new file mode 100644 index 000000000..5b58124b6 --- /dev/null +++ b/pkg/gen/livekit/publicapi/workspaces/v1/workspaces.pb.go @@ -0,0 +1,2082 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.12 +// protoc v7.35.1 +// source: livekit/publicapi/workspaces/v1/workspaces.proto + +package workspacesv1 + +import ( + v1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/common/v1" + v11 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/projects/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// WorkspacePreferences holds per-workspace settings (mirrors backend-common +// WorkspacePreferences). +type WorkspacePreferences struct { + state protoimpl.MessageState `protogen:"open.v1"` + HipaaCompliant bool `protobuf:"varint,1,opt,name=hipaa_compliant,json=hipaaCompliant,proto3" json:"hipaa_compliant,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkspacePreferences) Reset() { + *x = WorkspacePreferences{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkspacePreferences) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspacePreferences) ProtoMessage() {} + +func (x *WorkspacePreferences) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkspacePreferences.ProtoReflect.Descriptor instead. +func (*WorkspacePreferences) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{0} +} + +func (x *WorkspacePreferences) GetHipaaCompliant() bool { + if x != nil { + return x.HipaaCompliant + } + return false +} + +// Workspace is a LiveKit Cloud workspace (owned by cloud-api-server). +// Field set mirrors backend-common model.Workspace.ToProto(); members/invites +// are separate list resources and are not embedded here. +type Workspace struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + CreatorId string `protobuf:"bytes,3,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` + OrganizationId string `protobuf:"bytes,4,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Preferences *WorkspacePreferences `protobuf:"bytes,6,opt,name=preferences,proto3" json:"preferences,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Workspace) Reset() { + *x = Workspace{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Workspace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workspace) ProtoMessage() {} + +func (x *Workspace) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workspace.ProtoReflect.Descriptor instead. +func (*Workspace) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{1} +} + +func (x *Workspace) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Workspace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Workspace) GetCreatorId() string { + if x != nil { + return x.CreatorId + } + return "" +} + +func (x *Workspace) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *Workspace) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Workspace) GetPreferences() *WorkspacePreferences { + if x != nil { + return x.Preferences + } + return nil +} + +type ListWorkspacesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page *v1.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListWorkspacesRequest) Reset() { + *x = ListWorkspacesRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListWorkspacesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspacesRequest) ProtoMessage() {} + +func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkspacesRequest.ProtoReflect.Descriptor instead. +func (*ListWorkspacesRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{2} +} + +func (x *ListWorkspacesRequest) GetPage() *v1.PageRequest { + if x != nil { + return x.Page + } + return nil +} + +type ListWorkspacesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*Workspace `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + PageInfo *v1.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListWorkspacesResponse) Reset() { + *x = ListWorkspacesResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListWorkspacesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspacesResponse) ProtoMessage() {} + +func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkspacesResponse.ProtoReflect.Descriptor instead. +func (*ListWorkspacesResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{3} +} + +func (x *ListWorkspacesResponse) GetItems() []*Workspace { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListWorkspacesResponse) GetPageInfo() *v1.PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +type GetWorkspaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWorkspaceRequest) Reset() { + *x = GetWorkspaceRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceRequest) ProtoMessage() {} + +func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{4} +} + +func (x *GetWorkspaceRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type GetWorkspaceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Workspace *Workspace `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWorkspaceResponse) Reset() { + *x = GetWorkspaceResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWorkspaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceResponse) ProtoMessage() {} + +func (x *GetWorkspaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWorkspaceResponse.ProtoReflect.Descriptor instead. +func (*GetWorkspaceResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{5} +} + +func (x *GetWorkspaceResponse) GetWorkspace() *Workspace { + if x != nil { + return x.Workspace + } + return nil +} + +// Mirrors cloud-api WorkspaceService.UpdateWorkspace, which only accepts a +// name: workspace preferences (hipaa_compliant) cascade to every project in the +// workspace and are LK-admin-only there (AdminService.UpdateWorkspace), so they +// are deliberately not settable on this path. +type UpdateWorkspaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateWorkspaceRequest) Reset() { + *x = UpdateWorkspaceRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkspaceRequest) ProtoMessage() {} + +func (x *UpdateWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*UpdateWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateWorkspaceRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *UpdateWorkspaceRequest) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +type UpdateWorkspaceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Workspace *Workspace `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateWorkspaceResponse) Reset() { + *x = UpdateWorkspaceResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateWorkspaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkspaceResponse) ProtoMessage() {} + +func (x *UpdateWorkspaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateWorkspaceResponse.ProtoReflect.Descriptor instead. +func (*UpdateWorkspaceResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateWorkspaceResponse) GetWorkspace() *Workspace { + if x != nil { + return x.Workspace + } + return nil +} + +type DeleteWorkspaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteWorkspaceRequest) Reset() { + *x = DeleteWorkspaceRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteWorkspaceRequest) ProtoMessage() {} + +func (x *DeleteWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*DeleteWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteWorkspaceRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type DeleteWorkspaceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteWorkspaceResponse) Reset() { + *x = DeleteWorkspaceResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteWorkspaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteWorkspaceResponse) ProtoMessage() {} + +func (x *DeleteWorkspaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteWorkspaceResponse.ProtoReflect.Descriptor instead. +func (*DeleteWorkspaceResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{9} +} + +// Workspace-scoped project RPCs: requests are owned here (required +// workspace_id); responses reuse projects.v1. +type ListProjectsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Page *v1.PageRequest `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListProjectsRequest) Reset() { + *x = ListProjectsRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListProjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListProjectsRequest) ProtoMessage() {} + +func (x *ListProjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListProjectsRequest.ProtoReflect.Descriptor instead. +func (*ListProjectsRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{10} +} + +func (x *ListProjectsRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *ListProjectsRequest) GetPage() *v1.PageRequest { + if x != nil { + return x.Page + } + return nil +} + +type GetProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProjectRequest) Reset() { + *x = GetProjectRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectRequest) ProtoMessage() {} + +func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectRequest.ProtoReflect.Descriptor instead. +func (*GetProjectRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{11} +} + +func (x *GetProjectRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *GetProjectRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +type CreateProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Subdomain string `protobuf:"bytes,3,opt,name=subdomain,proto3" json:"subdomain,omitempty"` // optional; generated from name when empty + IsPrivate bool `protobuf:"varint,4,opt,name=is_private,json=isPrivate,proto3" json:"is_private,omitempty"` + Members []*v11.CreateProjectMember `protobuf:"bytes,5,rep,name=members,proto3" json:"members,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateProjectRequest) Reset() { + *x = CreateProjectRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateProjectRequest) ProtoMessage() {} + +func (x *CreateProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateProjectRequest.ProtoReflect.Descriptor instead. +func (*CreateProjectRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateProjectRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *CreateProjectRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateProjectRequest) GetSubdomain() string { + if x != nil { + return x.Subdomain + } + return "" +} + +func (x *CreateProjectRequest) GetIsPrivate() bool { + if x != nil { + return x.IsPrivate + } + return false +} + +func (x *CreateProjectRequest) GetMembers() []*v11.CreateProjectMember { + if x != nil { + return x.Members + } + return nil +} + +type UpdateProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + // Nested projects.v1 update; the handler applies this request's workspace_id + // as the store constraint. + Update *v11.UpdateProjectRequest `protobuf:"bytes,2,opt,name=update,proto3" json:"update,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateProjectRequest) Reset() { + *x = UpdateProjectRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateProjectRequest) ProtoMessage() {} + +func (x *UpdateProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateProjectRequest.ProtoReflect.Descriptor instead. +func (*UpdateProjectRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{13} +} + +func (x *UpdateProjectRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *UpdateProjectRequest) GetUpdate() *v11.UpdateProjectRequest { + if x != nil { + return x.Update + } + return nil +} + +type DeleteProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteProjectRequest) Reset() { + *x = DeleteProjectRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteProjectRequest) ProtoMessage() {} + +func (x *DeleteProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteProjectRequest.ProtoReflect.Descriptor instead. +func (*DeleteProjectRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{14} +} + +func (x *DeleteProjectRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *DeleteProjectRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// WorkspaceMember is a user's membership on a workspace. +type WorkspaceMember struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + // Matches cloud_protocol.ProjectMemberRole: INVITED=0, READ=1, WRITE=2, ADMIN=3. + Role int32 `protobuf:"varint,4,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkspaceMember) Reset() { + *x = WorkspaceMember{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkspaceMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceMember) ProtoMessage() {} + +func (x *WorkspaceMember) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkspaceMember.ProtoReflect.Descriptor instead. +func (*WorkspaceMember) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{15} +} + +func (x *WorkspaceMember) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *WorkspaceMember) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *WorkspaceMember) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *WorkspaceMember) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +// WorkspaceInvite is a pending email invite to a workspace. +type WorkspaceInvite struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + Role int32 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` + InviteToken string `protobuf:"bytes,4,opt,name=invite_token,json=inviteToken,proto3" json:"invite_token,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkspaceInvite) Reset() { + *x = WorkspaceInvite{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkspaceInvite) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceInvite) ProtoMessage() {} + +func (x *WorkspaceInvite) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkspaceInvite.ProtoReflect.Descriptor instead. +func (*WorkspaceInvite) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{16} +} + +func (x *WorkspaceInvite) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *WorkspaceInvite) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *WorkspaceInvite) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +func (x *WorkspaceInvite) GetInviteToken() string { + if x != nil { + return x.InviteToken + } + return "" +} + +func (x *WorkspaceInvite) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +type ListMembersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersRequest) Reset() { + *x = ListMembersRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersRequest) ProtoMessage() {} + +func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersRequest.ProtoReflect.Descriptor instead. +func (*ListMembersRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{17} +} + +func (x *ListMembersRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type ListMembersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*WorkspaceMember `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersResponse) Reset() { + *x = ListMembersResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersResponse) ProtoMessage() {} + +func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersResponse.ProtoReflect.Descriptor instead. +func (*ListMembersResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{18} +} + +func (x *ListMembersResponse) GetItems() []*WorkspaceMember { + if x != nil { + return x.Items + } + return nil +} + +type GetMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMemberRequest) Reset() { + *x = GetMemberRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemberRequest) ProtoMessage() {} + +func (x *GetMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMemberRequest.ProtoReflect.Descriptor instead. +func (*GetMemberRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{19} +} + +func (x *GetMemberRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *GetMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type GetMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Member *WorkspaceMember `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMemberResponse) Reset() { + *x = GetMemberResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemberResponse) ProtoMessage() {} + +func (x *GetMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMemberResponse.ProtoReflect.Descriptor instead. +func (*GetMemberResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{20} +} + +func (x *GetMemberResponse) GetMember() *WorkspaceMember { + if x != nil { + return x.Member + } + return nil +} + +type UpdateMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Role int32 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateMemberRequest) Reset() { + *x = UpdateMemberRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMemberRequest) ProtoMessage() {} + +func (x *UpdateMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateMemberRequest.ProtoReflect.Descriptor instead. +func (*UpdateMemberRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{21} +} + +func (x *UpdateMemberRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *UpdateMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *UpdateMemberRequest) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +type UpdateMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Member *WorkspaceMember `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateMemberResponse) Reset() { + *x = UpdateMemberResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMemberResponse) ProtoMessage() {} + +func (x *UpdateMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateMemberResponse.ProtoReflect.Descriptor instead. +func (*UpdateMemberResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{22} +} + +func (x *UpdateMemberResponse) GetMember() *WorkspaceMember { + if x != nil { + return x.Member + } + return nil +} + +type DeleteMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMemberRequest) Reset() { + *x = DeleteMemberRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMemberRequest) ProtoMessage() {} + +func (x *DeleteMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMemberRequest.ProtoReflect.Descriptor instead. +func (*DeleteMemberRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{23} +} + +func (x *DeleteMemberRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *DeleteMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type DeleteMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMemberResponse) Reset() { + *x = DeleteMemberResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMemberResponse) ProtoMessage() {} + +func (x *DeleteMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMemberResponse.ProtoReflect.Descriptor instead. +func (*DeleteMemberResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{24} +} + +type CreateInviteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + Role int32 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateInviteRequest) Reset() { + *x = CreateInviteRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateInviteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInviteRequest) ProtoMessage() {} + +func (x *CreateInviteRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateInviteRequest.ProtoReflect.Descriptor instead. +func (*CreateInviteRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{25} +} + +func (x *CreateInviteRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *CreateInviteRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *CreateInviteRequest) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +type CreateInviteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + InviteToken string `protobuf:"bytes,2,opt,name=invite_token,json=inviteToken,proto3" json:"invite_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateInviteResponse) Reset() { + *x = CreateInviteResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateInviteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInviteResponse) ProtoMessage() {} + +func (x *CreateInviteResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateInviteResponse.ProtoReflect.Descriptor instead. +func (*CreateInviteResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{26} +} + +func (x *CreateInviteResponse) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *CreateInviteResponse) GetInviteToken() string { + if x != nil { + return x.InviteToken + } + return "" +} + +type ListInvitesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListInvitesRequest) Reset() { + *x = ListInvitesRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListInvitesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInvitesRequest) ProtoMessage() {} + +func (x *ListInvitesRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInvitesRequest.ProtoReflect.Descriptor instead. +func (*ListInvitesRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{27} +} + +func (x *ListInvitesRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type ListInvitesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*WorkspaceInvite `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListInvitesResponse) Reset() { + *x = ListInvitesResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListInvitesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInvitesResponse) ProtoMessage() {} + +func (x *ListInvitesResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInvitesResponse.ProtoReflect.Descriptor instead. +func (*ListInvitesResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{28} +} + +func (x *ListInvitesResponse) GetItems() []*WorkspaceInvite { + if x != nil { + return x.Items + } + return nil +} + +type GetInviteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + InviteToken string `protobuf:"bytes,1,opt,name=invite_token,json=inviteToken,proto3" json:"invite_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetInviteRequest) Reset() { + *x = GetInviteRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetInviteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInviteRequest) ProtoMessage() {} + +func (x *GetInviteRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInviteRequest.ProtoReflect.Descriptor instead. +func (*GetInviteRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{29} +} + +func (x *GetInviteRequest) GetInviteToken() string { + if x != nil { + return x.InviteToken + } + return "" +} + +type GetInviteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Invite *WorkspaceInvite `protobuf:"bytes,1,opt,name=invite,proto3" json:"invite,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetInviteResponse) Reset() { + *x = GetInviteResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetInviteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInviteResponse) ProtoMessage() {} + +func (x *GetInviteResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInviteResponse.ProtoReflect.Descriptor instead. +func (*GetInviteResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{30} +} + +func (x *GetInviteResponse) GetInvite() *WorkspaceInvite { + if x != nil { + return x.Invite + } + return nil +} + +type DeleteInviteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteInviteRequest) Reset() { + *x = DeleteInviteRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteInviteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteInviteRequest) ProtoMessage() {} + +func (x *DeleteInviteRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteInviteRequest.ProtoReflect.Descriptor instead. +func (*DeleteInviteRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{31} +} + +func (x *DeleteInviteRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *DeleteInviteRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +type DeleteInviteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteInviteResponse) Reset() { + *x = DeleteInviteResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteInviteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteInviteResponse) ProtoMessage() {} + +func (x *DeleteInviteResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteInviteResponse.ProtoReflect.Descriptor instead. +func (*DeleteInviteResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{32} +} + +type AnswerInviteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + InviteToken string `protobuf:"bytes,1,opt,name=invite_token,json=inviteToken,proto3" json:"invite_token,omitempty"` + Accept bool `protobuf:"varint,2,opt,name=accept,proto3" json:"accept,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnswerInviteRequest) Reset() { + *x = AnswerInviteRequest{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnswerInviteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnswerInviteRequest) ProtoMessage() {} + +func (x *AnswerInviteRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnswerInviteRequest.ProtoReflect.Descriptor instead. +func (*AnswerInviteRequest) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{33} +} + +func (x *AnswerInviteRequest) GetInviteToken() string { + if x != nil { + return x.InviteToken + } + return "" +} + +func (x *AnswerInviteRequest) GetAccept() bool { + if x != nil { + return x.Accept + } + return false +} + +type AnswerInviteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Member *WorkspaceMember `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` // set when accept=true + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnswerInviteResponse) Reset() { + *x = AnswerInviteResponse{} + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnswerInviteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnswerInviteResponse) ProtoMessage() {} + +func (x *AnswerInviteResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnswerInviteResponse.ProtoReflect.Descriptor instead. +func (*AnswerInviteResponse) Descriptor() ([]byte, []int) { + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP(), []int{34} +} + +func (x *AnswerInviteResponse) GetMember() *WorkspaceMember { + if x != nil { + return x.Member + } + return nil +} + +var File_livekit_publicapi_workspaces_v1_workspaces_proto protoreflect.FileDescriptor + +const file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDesc = "" + + "\n" + + "0livekit/publicapi/workspaces/v1/workspaces.proto\x12\x1flivekit.publicapi.workspaces.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a(livekit/publicapi/common/v1/common.proto\x1a,livekit/publicapi/projects/v1/projects.proto\"?\n" + + "\x14WorkspacePreferences\x12'\n" + + "\x0fhipaa_compliant\x18\x01 \x01(\bR\x0ehipaaCompliant\"\x8b\x02\n" + + "\tWorkspace\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1d\n" + + "\n" + + "creator_id\x18\x03 \x01(\tR\tcreatorId\x12'\n" + + "\x0forganization_id\x18\x04 \x01(\tR\x0eorganizationId\x129\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12W\n" + + "\vpreferences\x18\x06 \x01(\v25.livekit.publicapi.workspaces.v1.WorkspacePreferencesR\vpreferences\"U\n" + + "\x15ListWorkspacesRequest\x12<\n" + + "\x04page\x18\x01 \x01(\v2(.livekit.publicapi.common.v1.PageRequestR\x04page\"\x9e\x01\n" + + "\x16ListWorkspacesResponse\x12@\n" + + "\x05items\x18\x01 \x03(\v2*.livekit.publicapi.workspaces.v1.WorkspaceR\x05items\x12B\n" + + "\tpage_info\x18\x02 \x01(\v2%.livekit.publicapi.common.v1.PageInfoR\bpageInfo\"8\n" + + "\x13GetWorkspaceRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\"`\n" + + "\x14GetWorkspaceResponse\x12H\n" + + "\tworkspace\x18\x01 \x01(\v2*.livekit.publicapi.workspaces.v1.WorkspaceR\tworkspace\"]\n" + + "\x16UpdateWorkspaceRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x17\n" + + "\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01B\a\n" + + "\x05_name\"c\n" + + "\x17UpdateWorkspaceResponse\x12H\n" + + "\tworkspace\x18\x01 \x01(\v2*.livekit.publicapi.workspaces.v1.WorkspaceR\tworkspace\";\n" + + "\x16DeleteWorkspaceRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\"\x19\n" + + "\x17DeleteWorkspaceResponse\"v\n" + + "\x13ListProjectsRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12<\n" + + "\x04page\x18\x02 \x01(\v2(.livekit.publicapi.common.v1.PageRequestR\x04page\"U\n" + + "\x11GetProjectRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x1d\n" + + "\n" + + "project_id\x18\x02 \x01(\tR\tprojectId\"\xd8\x01\n" + + "\x14CreateProjectRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1c\n" + + "\tsubdomain\x18\x03 \x01(\tR\tsubdomain\x12\x1d\n" + + "\n" + + "is_private\x18\x04 \x01(\bR\tisPrivate\x12L\n" + + "\amembers\x18\x05 \x03(\v22.livekit.publicapi.projects.v1.CreateProjectMemberR\amembers\"\x86\x01\n" + + "\x14UpdateProjectRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12K\n" + + "\x06update\x18\x02 \x01(\v23.livekit.publicapi.projects.v1.UpdateProjectRequestR\x06update\"X\n" + + "\x14DeleteProjectRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x1d\n" + + "\n" + + "project_id\x18\x02 \x01(\tR\tprojectId\"w\n" + + "\x0fWorkspaceMember\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x17\n" + + "\auser_id\x18\x02 \x01(\tR\x06userId\x12\x14\n" + + "\x05email\x18\x03 \x01(\tR\x05email\x12\x12\n" + + "\x04role\x18\x04 \x01(\x05R\x04role\"\xbc\x01\n" + + "\x0fWorkspaceInvite\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\x12\x12\n" + + "\x04role\x18\x03 \x01(\x05R\x04role\x12!\n" + + "\finvite_token\x18\x04 \x01(\tR\vinviteToken\x129\n" + + "\n" + + "expires_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"7\n" + + "\x12ListMembersRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\"]\n" + + "\x13ListMembersResponse\x12F\n" + + "\x05items\x18\x01 \x03(\v20.livekit.publicapi.workspaces.v1.WorkspaceMemberR\x05items\"N\n" + + "\x10GetMemberRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x17\n" + + "\auser_id\x18\x02 \x01(\tR\x06userId\"]\n" + + "\x11GetMemberResponse\x12H\n" + + "\x06member\x18\x01 \x01(\v20.livekit.publicapi.workspaces.v1.WorkspaceMemberR\x06member\"e\n" + + "\x13UpdateMemberRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x17\n" + + "\auser_id\x18\x02 \x01(\tR\x06userId\x12\x12\n" + + "\x04role\x18\x03 \x01(\x05R\x04role\"`\n" + + "\x14UpdateMemberResponse\x12H\n" + + "\x06member\x18\x01 \x01(\v20.livekit.publicapi.workspaces.v1.WorkspaceMemberR\x06member\"Q\n" + + "\x13DeleteMemberRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x17\n" + + "\auser_id\x18\x02 \x01(\tR\x06userId\"\x16\n" + + "\x14DeleteMemberResponse\"b\n" + + "\x13CreateInviteRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\x12\x12\n" + + "\x04role\x18\x03 \x01(\x05R\x04role\"\\\n" + + "\x14CreateInviteResponse\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12!\n" + + "\finvite_token\x18\x02 \x01(\tR\vinviteToken\"7\n" + + "\x12ListInvitesRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\"]\n" + + "\x13ListInvitesResponse\x12F\n" + + "\x05items\x18\x01 \x03(\v20.livekit.publicapi.workspaces.v1.WorkspaceInviteR\x05items\"5\n" + + "\x10GetInviteRequest\x12!\n" + + "\finvite_token\x18\x01 \x01(\tR\vinviteToken\"]\n" + + "\x11GetInviteResponse\x12H\n" + + "\x06invite\x18\x01 \x01(\v20.livekit.publicapi.workspaces.v1.WorkspaceInviteR\x06invite\"N\n" + + "\x13DeleteInviteRequest\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\"\x16\n" + + "\x14DeleteInviteResponse\"P\n" + + "\x13AnswerInviteRequest\x12!\n" + + "\finvite_token\x18\x01 \x01(\tR\vinviteToken\x12\x16\n" + + "\x06accept\x18\x02 \x01(\bR\x06accept\"`\n" + + "\x14AnswerInviteResponse\x12H\n" + + "\x06member\x18\x01 \x01(\v20.livekit.publicapi.workspaces.v1.WorkspaceMemberR\x06member2\xd8\x11\n" + + "\x10WorkspaceService\x12\x81\x01\n" + + "\x0eListWorkspaces\x126.livekit.publicapi.workspaces.v1.ListWorkspacesRequest\x1a7.livekit.publicapi.workspaces.v1.ListWorkspacesResponse\x12{\n" + + "\fGetWorkspace\x124.livekit.publicapi.workspaces.v1.GetWorkspaceRequest\x1a5.livekit.publicapi.workspaces.v1.GetWorkspaceResponse\x12\x84\x01\n" + + "\x0fUpdateWorkspace\x127.livekit.publicapi.workspaces.v1.UpdateWorkspaceRequest\x1a8.livekit.publicapi.workspaces.v1.UpdateWorkspaceResponse\x12\x84\x01\n" + + "\x0fDeleteWorkspace\x127.livekit.publicapi.workspaces.v1.DeleteWorkspaceRequest\x1a8.livekit.publicapi.workspaces.v1.DeleteWorkspaceResponse\x12y\n" + + "\fListProjects\x124.livekit.publicapi.workspaces.v1.ListProjectsRequest\x1a3.livekit.publicapi.projects.v1.ListProjectsResponse\x12s\n" + + "\n" + + "GetProject\x122.livekit.publicapi.workspaces.v1.GetProjectRequest\x1a1.livekit.publicapi.projects.v1.GetProjectResponse\x12|\n" + + "\rCreateProject\x125.livekit.publicapi.workspaces.v1.CreateProjectRequest\x1a4.livekit.publicapi.projects.v1.CreateProjectResponse\x12|\n" + + "\rUpdateProject\x125.livekit.publicapi.workspaces.v1.UpdateProjectRequest\x1a4.livekit.publicapi.projects.v1.UpdateProjectResponse\x12|\n" + + "\rDeleteProject\x125.livekit.publicapi.workspaces.v1.DeleteProjectRequest\x1a4.livekit.publicapi.projects.v1.DeleteProjectResponse\x12x\n" + + "\vListMembers\x123.livekit.publicapi.workspaces.v1.ListMembersRequest\x1a4.livekit.publicapi.workspaces.v1.ListMembersResponse\x12r\n" + + "\tGetMember\x121.livekit.publicapi.workspaces.v1.GetMemberRequest\x1a2.livekit.publicapi.workspaces.v1.GetMemberResponse\x12{\n" + + "\fUpdateMember\x124.livekit.publicapi.workspaces.v1.UpdateMemberRequest\x1a5.livekit.publicapi.workspaces.v1.UpdateMemberResponse\x12{\n" + + "\fDeleteMember\x124.livekit.publicapi.workspaces.v1.DeleteMemberRequest\x1a5.livekit.publicapi.workspaces.v1.DeleteMemberResponse\x12{\n" + + "\fCreateInvite\x124.livekit.publicapi.workspaces.v1.CreateInviteRequest\x1a5.livekit.publicapi.workspaces.v1.CreateInviteResponse\x12x\n" + + "\vListInvites\x123.livekit.publicapi.workspaces.v1.ListInvitesRequest\x1a4.livekit.publicapi.workspaces.v1.ListInvitesResponse\x12r\n" + + "\tGetInvite\x121.livekit.publicapi.workspaces.v1.GetInviteRequest\x1a2.livekit.publicapi.workspaces.v1.GetInviteResponse\x12{\n" + + "\fDeleteInvite\x124.livekit.publicapi.workspaces.v1.DeleteInviteRequest\x1a5.livekit.publicapi.workspaces.v1.DeleteInviteResponse\x12{\n" + + "\fAnswerInvite\x124.livekit.publicapi.workspaces.v1.AnswerInviteRequest\x1a5.livekit.publicapi.workspaces.v1.AnswerInviteResponseb\x06proto3" + +var ( + file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescOnce sync.Once + file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescData []byte +) + +func file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescGZIP() []byte { + file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescOnce.Do(func() { + file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDesc), len(file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDesc))) + }) + return file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDescData +} + +var file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_livekit_publicapi_workspaces_v1_workspaces_proto_goTypes = []any{ + (*WorkspacePreferences)(nil), // 0: livekit.publicapi.workspaces.v1.WorkspacePreferences + (*Workspace)(nil), // 1: livekit.publicapi.workspaces.v1.Workspace + (*ListWorkspacesRequest)(nil), // 2: livekit.publicapi.workspaces.v1.ListWorkspacesRequest + (*ListWorkspacesResponse)(nil), // 3: livekit.publicapi.workspaces.v1.ListWorkspacesResponse + (*GetWorkspaceRequest)(nil), // 4: livekit.publicapi.workspaces.v1.GetWorkspaceRequest + (*GetWorkspaceResponse)(nil), // 5: livekit.publicapi.workspaces.v1.GetWorkspaceResponse + (*UpdateWorkspaceRequest)(nil), // 6: livekit.publicapi.workspaces.v1.UpdateWorkspaceRequest + (*UpdateWorkspaceResponse)(nil), // 7: livekit.publicapi.workspaces.v1.UpdateWorkspaceResponse + (*DeleteWorkspaceRequest)(nil), // 8: livekit.publicapi.workspaces.v1.DeleteWorkspaceRequest + (*DeleteWorkspaceResponse)(nil), // 9: livekit.publicapi.workspaces.v1.DeleteWorkspaceResponse + (*ListProjectsRequest)(nil), // 10: livekit.publicapi.workspaces.v1.ListProjectsRequest + (*GetProjectRequest)(nil), // 11: livekit.publicapi.workspaces.v1.GetProjectRequest + (*CreateProjectRequest)(nil), // 12: livekit.publicapi.workspaces.v1.CreateProjectRequest + (*UpdateProjectRequest)(nil), // 13: livekit.publicapi.workspaces.v1.UpdateProjectRequest + (*DeleteProjectRequest)(nil), // 14: livekit.publicapi.workspaces.v1.DeleteProjectRequest + (*WorkspaceMember)(nil), // 15: livekit.publicapi.workspaces.v1.WorkspaceMember + (*WorkspaceInvite)(nil), // 16: livekit.publicapi.workspaces.v1.WorkspaceInvite + (*ListMembersRequest)(nil), // 17: livekit.publicapi.workspaces.v1.ListMembersRequest + (*ListMembersResponse)(nil), // 18: livekit.publicapi.workspaces.v1.ListMembersResponse + (*GetMemberRequest)(nil), // 19: livekit.publicapi.workspaces.v1.GetMemberRequest + (*GetMemberResponse)(nil), // 20: livekit.publicapi.workspaces.v1.GetMemberResponse + (*UpdateMemberRequest)(nil), // 21: livekit.publicapi.workspaces.v1.UpdateMemberRequest + (*UpdateMemberResponse)(nil), // 22: livekit.publicapi.workspaces.v1.UpdateMemberResponse + (*DeleteMemberRequest)(nil), // 23: livekit.publicapi.workspaces.v1.DeleteMemberRequest + (*DeleteMemberResponse)(nil), // 24: livekit.publicapi.workspaces.v1.DeleteMemberResponse + (*CreateInviteRequest)(nil), // 25: livekit.publicapi.workspaces.v1.CreateInviteRequest + (*CreateInviteResponse)(nil), // 26: livekit.publicapi.workspaces.v1.CreateInviteResponse + (*ListInvitesRequest)(nil), // 27: livekit.publicapi.workspaces.v1.ListInvitesRequest + (*ListInvitesResponse)(nil), // 28: livekit.publicapi.workspaces.v1.ListInvitesResponse + (*GetInviteRequest)(nil), // 29: livekit.publicapi.workspaces.v1.GetInviteRequest + (*GetInviteResponse)(nil), // 30: livekit.publicapi.workspaces.v1.GetInviteResponse + (*DeleteInviteRequest)(nil), // 31: livekit.publicapi.workspaces.v1.DeleteInviteRequest + (*DeleteInviteResponse)(nil), // 32: livekit.publicapi.workspaces.v1.DeleteInviteResponse + (*AnswerInviteRequest)(nil), // 33: livekit.publicapi.workspaces.v1.AnswerInviteRequest + (*AnswerInviteResponse)(nil), // 34: livekit.publicapi.workspaces.v1.AnswerInviteResponse + (*timestamppb.Timestamp)(nil), // 35: google.protobuf.Timestamp + (*v1.PageRequest)(nil), // 36: livekit.publicapi.common.v1.PageRequest + (*v1.PageInfo)(nil), // 37: livekit.publicapi.common.v1.PageInfo + (*v11.CreateProjectMember)(nil), // 38: livekit.publicapi.projects.v1.CreateProjectMember + (*v11.UpdateProjectRequest)(nil), // 39: livekit.publicapi.projects.v1.UpdateProjectRequest + (*v11.ListProjectsResponse)(nil), // 40: livekit.publicapi.projects.v1.ListProjectsResponse + (*v11.GetProjectResponse)(nil), // 41: livekit.publicapi.projects.v1.GetProjectResponse + (*v11.CreateProjectResponse)(nil), // 42: livekit.publicapi.projects.v1.CreateProjectResponse + (*v11.UpdateProjectResponse)(nil), // 43: livekit.publicapi.projects.v1.UpdateProjectResponse + (*v11.DeleteProjectResponse)(nil), // 44: livekit.publicapi.projects.v1.DeleteProjectResponse +} +var file_livekit_publicapi_workspaces_v1_workspaces_proto_depIdxs = []int32{ + 35, // 0: livekit.publicapi.workspaces.v1.Workspace.created_at:type_name -> google.protobuf.Timestamp + 0, // 1: livekit.publicapi.workspaces.v1.Workspace.preferences:type_name -> livekit.publicapi.workspaces.v1.WorkspacePreferences + 36, // 2: livekit.publicapi.workspaces.v1.ListWorkspacesRequest.page:type_name -> livekit.publicapi.common.v1.PageRequest + 1, // 3: livekit.publicapi.workspaces.v1.ListWorkspacesResponse.items:type_name -> livekit.publicapi.workspaces.v1.Workspace + 37, // 4: livekit.publicapi.workspaces.v1.ListWorkspacesResponse.page_info:type_name -> livekit.publicapi.common.v1.PageInfo + 1, // 5: livekit.publicapi.workspaces.v1.GetWorkspaceResponse.workspace:type_name -> livekit.publicapi.workspaces.v1.Workspace + 1, // 6: livekit.publicapi.workspaces.v1.UpdateWorkspaceResponse.workspace:type_name -> livekit.publicapi.workspaces.v1.Workspace + 36, // 7: livekit.publicapi.workspaces.v1.ListProjectsRequest.page:type_name -> livekit.publicapi.common.v1.PageRequest + 38, // 8: livekit.publicapi.workspaces.v1.CreateProjectRequest.members:type_name -> livekit.publicapi.projects.v1.CreateProjectMember + 39, // 9: livekit.publicapi.workspaces.v1.UpdateProjectRequest.update:type_name -> livekit.publicapi.projects.v1.UpdateProjectRequest + 35, // 10: livekit.publicapi.workspaces.v1.WorkspaceInvite.expires_at:type_name -> google.protobuf.Timestamp + 15, // 11: livekit.publicapi.workspaces.v1.ListMembersResponse.items:type_name -> livekit.publicapi.workspaces.v1.WorkspaceMember + 15, // 12: livekit.publicapi.workspaces.v1.GetMemberResponse.member:type_name -> livekit.publicapi.workspaces.v1.WorkspaceMember + 15, // 13: livekit.publicapi.workspaces.v1.UpdateMemberResponse.member:type_name -> livekit.publicapi.workspaces.v1.WorkspaceMember + 16, // 14: livekit.publicapi.workspaces.v1.ListInvitesResponse.items:type_name -> livekit.publicapi.workspaces.v1.WorkspaceInvite + 16, // 15: livekit.publicapi.workspaces.v1.GetInviteResponse.invite:type_name -> livekit.publicapi.workspaces.v1.WorkspaceInvite + 15, // 16: livekit.publicapi.workspaces.v1.AnswerInviteResponse.member:type_name -> livekit.publicapi.workspaces.v1.WorkspaceMember + 2, // 17: livekit.publicapi.workspaces.v1.WorkspaceService.ListWorkspaces:input_type -> livekit.publicapi.workspaces.v1.ListWorkspacesRequest + 4, // 18: livekit.publicapi.workspaces.v1.WorkspaceService.GetWorkspace:input_type -> livekit.publicapi.workspaces.v1.GetWorkspaceRequest + 6, // 19: livekit.publicapi.workspaces.v1.WorkspaceService.UpdateWorkspace:input_type -> livekit.publicapi.workspaces.v1.UpdateWorkspaceRequest + 8, // 20: livekit.publicapi.workspaces.v1.WorkspaceService.DeleteWorkspace:input_type -> livekit.publicapi.workspaces.v1.DeleteWorkspaceRequest + 10, // 21: livekit.publicapi.workspaces.v1.WorkspaceService.ListProjects:input_type -> livekit.publicapi.workspaces.v1.ListProjectsRequest + 11, // 22: livekit.publicapi.workspaces.v1.WorkspaceService.GetProject:input_type -> livekit.publicapi.workspaces.v1.GetProjectRequest + 12, // 23: livekit.publicapi.workspaces.v1.WorkspaceService.CreateProject:input_type -> livekit.publicapi.workspaces.v1.CreateProjectRequest + 13, // 24: livekit.publicapi.workspaces.v1.WorkspaceService.UpdateProject:input_type -> livekit.publicapi.workspaces.v1.UpdateProjectRequest + 14, // 25: livekit.publicapi.workspaces.v1.WorkspaceService.DeleteProject:input_type -> livekit.publicapi.workspaces.v1.DeleteProjectRequest + 17, // 26: livekit.publicapi.workspaces.v1.WorkspaceService.ListMembers:input_type -> livekit.publicapi.workspaces.v1.ListMembersRequest + 19, // 27: livekit.publicapi.workspaces.v1.WorkspaceService.GetMember:input_type -> livekit.publicapi.workspaces.v1.GetMemberRequest + 21, // 28: livekit.publicapi.workspaces.v1.WorkspaceService.UpdateMember:input_type -> livekit.publicapi.workspaces.v1.UpdateMemberRequest + 23, // 29: livekit.publicapi.workspaces.v1.WorkspaceService.DeleteMember:input_type -> livekit.publicapi.workspaces.v1.DeleteMemberRequest + 25, // 30: livekit.publicapi.workspaces.v1.WorkspaceService.CreateInvite:input_type -> livekit.publicapi.workspaces.v1.CreateInviteRequest + 27, // 31: livekit.publicapi.workspaces.v1.WorkspaceService.ListInvites:input_type -> livekit.publicapi.workspaces.v1.ListInvitesRequest + 29, // 32: livekit.publicapi.workspaces.v1.WorkspaceService.GetInvite:input_type -> livekit.publicapi.workspaces.v1.GetInviteRequest + 31, // 33: livekit.publicapi.workspaces.v1.WorkspaceService.DeleteInvite:input_type -> livekit.publicapi.workspaces.v1.DeleteInviteRequest + 33, // 34: livekit.publicapi.workspaces.v1.WorkspaceService.AnswerInvite:input_type -> livekit.publicapi.workspaces.v1.AnswerInviteRequest + 3, // 35: livekit.publicapi.workspaces.v1.WorkspaceService.ListWorkspaces:output_type -> livekit.publicapi.workspaces.v1.ListWorkspacesResponse + 5, // 36: livekit.publicapi.workspaces.v1.WorkspaceService.GetWorkspace:output_type -> livekit.publicapi.workspaces.v1.GetWorkspaceResponse + 7, // 37: livekit.publicapi.workspaces.v1.WorkspaceService.UpdateWorkspace:output_type -> livekit.publicapi.workspaces.v1.UpdateWorkspaceResponse + 9, // 38: livekit.publicapi.workspaces.v1.WorkspaceService.DeleteWorkspace:output_type -> livekit.publicapi.workspaces.v1.DeleteWorkspaceResponse + 40, // 39: livekit.publicapi.workspaces.v1.WorkspaceService.ListProjects:output_type -> livekit.publicapi.projects.v1.ListProjectsResponse + 41, // 40: livekit.publicapi.workspaces.v1.WorkspaceService.GetProject:output_type -> livekit.publicapi.projects.v1.GetProjectResponse + 42, // 41: livekit.publicapi.workspaces.v1.WorkspaceService.CreateProject:output_type -> livekit.publicapi.projects.v1.CreateProjectResponse + 43, // 42: livekit.publicapi.workspaces.v1.WorkspaceService.UpdateProject:output_type -> livekit.publicapi.projects.v1.UpdateProjectResponse + 44, // 43: livekit.publicapi.workspaces.v1.WorkspaceService.DeleteProject:output_type -> livekit.publicapi.projects.v1.DeleteProjectResponse + 18, // 44: livekit.publicapi.workspaces.v1.WorkspaceService.ListMembers:output_type -> livekit.publicapi.workspaces.v1.ListMembersResponse + 20, // 45: livekit.publicapi.workspaces.v1.WorkspaceService.GetMember:output_type -> livekit.publicapi.workspaces.v1.GetMemberResponse + 22, // 46: livekit.publicapi.workspaces.v1.WorkspaceService.UpdateMember:output_type -> livekit.publicapi.workspaces.v1.UpdateMemberResponse + 24, // 47: livekit.publicapi.workspaces.v1.WorkspaceService.DeleteMember:output_type -> livekit.publicapi.workspaces.v1.DeleteMemberResponse + 26, // 48: livekit.publicapi.workspaces.v1.WorkspaceService.CreateInvite:output_type -> livekit.publicapi.workspaces.v1.CreateInviteResponse + 28, // 49: livekit.publicapi.workspaces.v1.WorkspaceService.ListInvites:output_type -> livekit.publicapi.workspaces.v1.ListInvitesResponse + 30, // 50: livekit.publicapi.workspaces.v1.WorkspaceService.GetInvite:output_type -> livekit.publicapi.workspaces.v1.GetInviteResponse + 32, // 51: livekit.publicapi.workspaces.v1.WorkspaceService.DeleteInvite:output_type -> livekit.publicapi.workspaces.v1.DeleteInviteResponse + 34, // 52: livekit.publicapi.workspaces.v1.WorkspaceService.AnswerInvite:output_type -> livekit.publicapi.workspaces.v1.AnswerInviteResponse + 35, // [35:53] is the sub-list for method output_type + 17, // [17:35] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_livekit_publicapi_workspaces_v1_workspaces_proto_init() } +func file_livekit_publicapi_workspaces_v1_workspaces_proto_init() { + if File_livekit_publicapi_workspaces_v1_workspaces_proto != nil { + return + } + file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes[6].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDesc), len(file_livekit_publicapi_workspaces_v1_workspaces_proto_rawDesc)), + NumEnums: 0, + NumMessages: 35, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_livekit_publicapi_workspaces_v1_workspaces_proto_goTypes, + DependencyIndexes: file_livekit_publicapi_workspaces_v1_workspaces_proto_depIdxs, + MessageInfos: file_livekit_publicapi_workspaces_v1_workspaces_proto_msgTypes, + }.Build() + File_livekit_publicapi_workspaces_v1_workspaces_proto = out.File + file_livekit_publicapi_workspaces_v1_workspaces_proto_goTypes = nil + file_livekit_publicapi_workspaces_v1_workspaces_proto_depIdxs = nil +} diff --git a/pkg/gen/livekit/publicapi/workspaces/v1/workspacesv1connect/workspaces.connect.go b/pkg/gen/livekit/publicapi/workspaces/v1/workspacesv1connect/workspaces.connect.go new file mode 100644 index 000000000..bc38c1e5e --- /dev/null +++ b/pkg/gen/livekit/publicapi/workspaces/v1/workspacesv1connect/workspaces.connect.go @@ -0,0 +1,612 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: livekit/publicapi/workspaces/v1/workspaces.proto + +package workspacesv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v11 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/projects/v1" + v1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/workspaces/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // WorkspaceServiceName is the fully-qualified name of the WorkspaceService service. + WorkspaceServiceName = "livekit.publicapi.workspaces.v1.WorkspaceService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // WorkspaceServiceListWorkspacesProcedure is the fully-qualified name of the WorkspaceService's + // ListWorkspaces RPC. + WorkspaceServiceListWorkspacesProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/ListWorkspaces" + // WorkspaceServiceGetWorkspaceProcedure is the fully-qualified name of the WorkspaceService's + // GetWorkspace RPC. + WorkspaceServiceGetWorkspaceProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/GetWorkspace" + // WorkspaceServiceUpdateWorkspaceProcedure is the fully-qualified name of the WorkspaceService's + // UpdateWorkspace RPC. + WorkspaceServiceUpdateWorkspaceProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/UpdateWorkspace" + // WorkspaceServiceDeleteWorkspaceProcedure is the fully-qualified name of the WorkspaceService's + // DeleteWorkspace RPC. + WorkspaceServiceDeleteWorkspaceProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/DeleteWorkspace" + // WorkspaceServiceListProjectsProcedure is the fully-qualified name of the WorkspaceService's + // ListProjects RPC. + WorkspaceServiceListProjectsProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/ListProjects" + // WorkspaceServiceGetProjectProcedure is the fully-qualified name of the WorkspaceService's + // GetProject RPC. + WorkspaceServiceGetProjectProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/GetProject" + // WorkspaceServiceCreateProjectProcedure is the fully-qualified name of the WorkspaceService's + // CreateProject RPC. + WorkspaceServiceCreateProjectProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/CreateProject" + // WorkspaceServiceUpdateProjectProcedure is the fully-qualified name of the WorkspaceService's + // UpdateProject RPC. + WorkspaceServiceUpdateProjectProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/UpdateProject" + // WorkspaceServiceDeleteProjectProcedure is the fully-qualified name of the WorkspaceService's + // DeleteProject RPC. + WorkspaceServiceDeleteProjectProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/DeleteProject" + // WorkspaceServiceListMembersProcedure is the fully-qualified name of the WorkspaceService's + // ListMembers RPC. + WorkspaceServiceListMembersProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/ListMembers" + // WorkspaceServiceGetMemberProcedure is the fully-qualified name of the WorkspaceService's + // GetMember RPC. + WorkspaceServiceGetMemberProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/GetMember" + // WorkspaceServiceUpdateMemberProcedure is the fully-qualified name of the WorkspaceService's + // UpdateMember RPC. + WorkspaceServiceUpdateMemberProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/UpdateMember" + // WorkspaceServiceDeleteMemberProcedure is the fully-qualified name of the WorkspaceService's + // DeleteMember RPC. + WorkspaceServiceDeleteMemberProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/DeleteMember" + // WorkspaceServiceCreateInviteProcedure is the fully-qualified name of the WorkspaceService's + // CreateInvite RPC. + WorkspaceServiceCreateInviteProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/CreateInvite" + // WorkspaceServiceListInvitesProcedure is the fully-qualified name of the WorkspaceService's + // ListInvites RPC. + WorkspaceServiceListInvitesProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/ListInvites" + // WorkspaceServiceGetInviteProcedure is the fully-qualified name of the WorkspaceService's + // GetInvite RPC. + WorkspaceServiceGetInviteProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/GetInvite" + // WorkspaceServiceDeleteInviteProcedure is the fully-qualified name of the WorkspaceService's + // DeleteInvite RPC. + WorkspaceServiceDeleteInviteProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/DeleteInvite" + // WorkspaceServiceAnswerInviteProcedure is the fully-qualified name of the WorkspaceService's + // AnswerInvite RPC. + WorkspaceServiceAnswerInviteProcedure = "/livekit.publicapi.workspaces.v1.WorkspaceService/AnswerInvite" +) + +// WorkspaceServiceClient is a client for the livekit.publicapi.workspaces.v1.WorkspaceService +// service. +type WorkspaceServiceClient interface { + ListWorkspaces(context.Context, *connect.Request[v1.ListWorkspacesRequest]) (*connect.Response[v1.ListWorkspacesResponse], error) + GetWorkspace(context.Context, *connect.Request[v1.GetWorkspaceRequest]) (*connect.Response[v1.GetWorkspaceResponse], error) + // rpc CreateWorkspace(CreateWorkspaceRequest) returns (CreateWorkspaceResponse); // TODO: Will we want to allow creation of workspaces? + UpdateWorkspace(context.Context, *connect.Request[v1.UpdateWorkspaceRequest]) (*connect.Response[v1.UpdateWorkspaceResponse], error) + DeleteWorkspace(context.Context, *connect.Request[v1.DeleteWorkspaceRequest]) (*connect.Response[v1.DeleteWorkspaceResponse], error) + // Project CRUD scoped to a workspace — responses owned by projects.v1. + ListProjects(context.Context, *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v11.ListProjectsResponse], error) + GetProject(context.Context, *connect.Request[v1.GetProjectRequest]) (*connect.Response[v11.GetProjectResponse], error) + CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v11.CreateProjectResponse], error) + UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v11.UpdateProjectResponse], error) + DeleteProject(context.Context, *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v11.DeleteProjectResponse], error) + // Members & invites (mirrors cloud WorkspaceService current flows). + ListMembers(context.Context, *connect.Request[v1.ListMembersRequest]) (*connect.Response[v1.ListMembersResponse], error) + GetMember(context.Context, *connect.Request[v1.GetMemberRequest]) (*connect.Response[v1.GetMemberResponse], error) + UpdateMember(context.Context, *connect.Request[v1.UpdateMemberRequest]) (*connect.Response[v1.UpdateMemberResponse], error) + DeleteMember(context.Context, *connect.Request[v1.DeleteMemberRequest]) (*connect.Response[v1.DeleteMemberResponse], error) + CreateInvite(context.Context, *connect.Request[v1.CreateInviteRequest]) (*connect.Response[v1.CreateInviteResponse], error) + ListInvites(context.Context, *connect.Request[v1.ListInvitesRequest]) (*connect.Response[v1.ListInvitesResponse], error) + GetInvite(context.Context, *connect.Request[v1.GetInviteRequest]) (*connect.Response[v1.GetInviteResponse], error) + DeleteInvite(context.Context, *connect.Request[v1.DeleteInviteRequest]) (*connect.Response[v1.DeleteInviteResponse], error) + AnswerInvite(context.Context, *connect.Request[v1.AnswerInviteRequest]) (*connect.Response[v1.AnswerInviteResponse], error) +} + +// NewWorkspaceServiceClient constructs a client for the +// livekit.publicapi.workspaces.v1.WorkspaceService service. By default, it uses the Connect +// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed +// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewWorkspaceServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) WorkspaceServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + workspaceServiceMethods := v1.File_livekit_publicapi_workspaces_v1_workspaces_proto.Services().ByName("WorkspaceService").Methods() + return &workspaceServiceClient{ + listWorkspaces: connect.NewClient[v1.ListWorkspacesRequest, v1.ListWorkspacesResponse]( + httpClient, + baseURL+WorkspaceServiceListWorkspacesProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("ListWorkspaces")), + connect.WithClientOptions(opts...), + ), + getWorkspace: connect.NewClient[v1.GetWorkspaceRequest, v1.GetWorkspaceResponse]( + httpClient, + baseURL+WorkspaceServiceGetWorkspaceProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("GetWorkspace")), + connect.WithClientOptions(opts...), + ), + updateWorkspace: connect.NewClient[v1.UpdateWorkspaceRequest, v1.UpdateWorkspaceResponse]( + httpClient, + baseURL+WorkspaceServiceUpdateWorkspaceProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("UpdateWorkspace")), + connect.WithClientOptions(opts...), + ), + deleteWorkspace: connect.NewClient[v1.DeleteWorkspaceRequest, v1.DeleteWorkspaceResponse]( + httpClient, + baseURL+WorkspaceServiceDeleteWorkspaceProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("DeleteWorkspace")), + connect.WithClientOptions(opts...), + ), + listProjects: connect.NewClient[v1.ListProjectsRequest, v11.ListProjectsResponse]( + httpClient, + baseURL+WorkspaceServiceListProjectsProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("ListProjects")), + connect.WithClientOptions(opts...), + ), + getProject: connect.NewClient[v1.GetProjectRequest, v11.GetProjectResponse]( + httpClient, + baseURL+WorkspaceServiceGetProjectProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("GetProject")), + connect.WithClientOptions(opts...), + ), + createProject: connect.NewClient[v1.CreateProjectRequest, v11.CreateProjectResponse]( + httpClient, + baseURL+WorkspaceServiceCreateProjectProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("CreateProject")), + connect.WithClientOptions(opts...), + ), + updateProject: connect.NewClient[v1.UpdateProjectRequest, v11.UpdateProjectResponse]( + httpClient, + baseURL+WorkspaceServiceUpdateProjectProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("UpdateProject")), + connect.WithClientOptions(opts...), + ), + deleteProject: connect.NewClient[v1.DeleteProjectRequest, v11.DeleteProjectResponse]( + httpClient, + baseURL+WorkspaceServiceDeleteProjectProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("DeleteProject")), + connect.WithClientOptions(opts...), + ), + listMembers: connect.NewClient[v1.ListMembersRequest, v1.ListMembersResponse]( + httpClient, + baseURL+WorkspaceServiceListMembersProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("ListMembers")), + connect.WithClientOptions(opts...), + ), + getMember: connect.NewClient[v1.GetMemberRequest, v1.GetMemberResponse]( + httpClient, + baseURL+WorkspaceServiceGetMemberProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("GetMember")), + connect.WithClientOptions(opts...), + ), + updateMember: connect.NewClient[v1.UpdateMemberRequest, v1.UpdateMemberResponse]( + httpClient, + baseURL+WorkspaceServiceUpdateMemberProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("UpdateMember")), + connect.WithClientOptions(opts...), + ), + deleteMember: connect.NewClient[v1.DeleteMemberRequest, v1.DeleteMemberResponse]( + httpClient, + baseURL+WorkspaceServiceDeleteMemberProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("DeleteMember")), + connect.WithClientOptions(opts...), + ), + createInvite: connect.NewClient[v1.CreateInviteRequest, v1.CreateInviteResponse]( + httpClient, + baseURL+WorkspaceServiceCreateInviteProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("CreateInvite")), + connect.WithClientOptions(opts...), + ), + listInvites: connect.NewClient[v1.ListInvitesRequest, v1.ListInvitesResponse]( + httpClient, + baseURL+WorkspaceServiceListInvitesProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("ListInvites")), + connect.WithClientOptions(opts...), + ), + getInvite: connect.NewClient[v1.GetInviteRequest, v1.GetInviteResponse]( + httpClient, + baseURL+WorkspaceServiceGetInviteProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("GetInvite")), + connect.WithClientOptions(opts...), + ), + deleteInvite: connect.NewClient[v1.DeleteInviteRequest, v1.DeleteInviteResponse]( + httpClient, + baseURL+WorkspaceServiceDeleteInviteProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("DeleteInvite")), + connect.WithClientOptions(opts...), + ), + answerInvite: connect.NewClient[v1.AnswerInviteRequest, v1.AnswerInviteResponse]( + httpClient, + baseURL+WorkspaceServiceAnswerInviteProcedure, + connect.WithSchema(workspaceServiceMethods.ByName("AnswerInvite")), + connect.WithClientOptions(opts...), + ), + } +} + +// workspaceServiceClient implements WorkspaceServiceClient. +type workspaceServiceClient struct { + listWorkspaces *connect.Client[v1.ListWorkspacesRequest, v1.ListWorkspacesResponse] + getWorkspace *connect.Client[v1.GetWorkspaceRequest, v1.GetWorkspaceResponse] + updateWorkspace *connect.Client[v1.UpdateWorkspaceRequest, v1.UpdateWorkspaceResponse] + deleteWorkspace *connect.Client[v1.DeleteWorkspaceRequest, v1.DeleteWorkspaceResponse] + listProjects *connect.Client[v1.ListProjectsRequest, v11.ListProjectsResponse] + getProject *connect.Client[v1.GetProjectRequest, v11.GetProjectResponse] + createProject *connect.Client[v1.CreateProjectRequest, v11.CreateProjectResponse] + updateProject *connect.Client[v1.UpdateProjectRequest, v11.UpdateProjectResponse] + deleteProject *connect.Client[v1.DeleteProjectRequest, v11.DeleteProjectResponse] + listMembers *connect.Client[v1.ListMembersRequest, v1.ListMembersResponse] + getMember *connect.Client[v1.GetMemberRequest, v1.GetMemberResponse] + updateMember *connect.Client[v1.UpdateMemberRequest, v1.UpdateMemberResponse] + deleteMember *connect.Client[v1.DeleteMemberRequest, v1.DeleteMemberResponse] + createInvite *connect.Client[v1.CreateInviteRequest, v1.CreateInviteResponse] + listInvites *connect.Client[v1.ListInvitesRequest, v1.ListInvitesResponse] + getInvite *connect.Client[v1.GetInviteRequest, v1.GetInviteResponse] + deleteInvite *connect.Client[v1.DeleteInviteRequest, v1.DeleteInviteResponse] + answerInvite *connect.Client[v1.AnswerInviteRequest, v1.AnswerInviteResponse] +} + +// ListWorkspaces calls livekit.publicapi.workspaces.v1.WorkspaceService.ListWorkspaces. +func (c *workspaceServiceClient) ListWorkspaces(ctx context.Context, req *connect.Request[v1.ListWorkspacesRequest]) (*connect.Response[v1.ListWorkspacesResponse], error) { + return c.listWorkspaces.CallUnary(ctx, req) +} + +// GetWorkspace calls livekit.publicapi.workspaces.v1.WorkspaceService.GetWorkspace. +func (c *workspaceServiceClient) GetWorkspace(ctx context.Context, req *connect.Request[v1.GetWorkspaceRequest]) (*connect.Response[v1.GetWorkspaceResponse], error) { + return c.getWorkspace.CallUnary(ctx, req) +} + +// UpdateWorkspace calls livekit.publicapi.workspaces.v1.WorkspaceService.UpdateWorkspace. +func (c *workspaceServiceClient) UpdateWorkspace(ctx context.Context, req *connect.Request[v1.UpdateWorkspaceRequest]) (*connect.Response[v1.UpdateWorkspaceResponse], error) { + return c.updateWorkspace.CallUnary(ctx, req) +} + +// DeleteWorkspace calls livekit.publicapi.workspaces.v1.WorkspaceService.DeleteWorkspace. +func (c *workspaceServiceClient) DeleteWorkspace(ctx context.Context, req *connect.Request[v1.DeleteWorkspaceRequest]) (*connect.Response[v1.DeleteWorkspaceResponse], error) { + return c.deleteWorkspace.CallUnary(ctx, req) +} + +// ListProjects calls livekit.publicapi.workspaces.v1.WorkspaceService.ListProjects. +func (c *workspaceServiceClient) ListProjects(ctx context.Context, req *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v11.ListProjectsResponse], error) { + return c.listProjects.CallUnary(ctx, req) +} + +// GetProject calls livekit.publicapi.workspaces.v1.WorkspaceService.GetProject. +func (c *workspaceServiceClient) GetProject(ctx context.Context, req *connect.Request[v1.GetProjectRequest]) (*connect.Response[v11.GetProjectResponse], error) { + return c.getProject.CallUnary(ctx, req) +} + +// CreateProject calls livekit.publicapi.workspaces.v1.WorkspaceService.CreateProject. +func (c *workspaceServiceClient) CreateProject(ctx context.Context, req *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v11.CreateProjectResponse], error) { + return c.createProject.CallUnary(ctx, req) +} + +// UpdateProject calls livekit.publicapi.workspaces.v1.WorkspaceService.UpdateProject. +func (c *workspaceServiceClient) UpdateProject(ctx context.Context, req *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v11.UpdateProjectResponse], error) { + return c.updateProject.CallUnary(ctx, req) +} + +// DeleteProject calls livekit.publicapi.workspaces.v1.WorkspaceService.DeleteProject. +func (c *workspaceServiceClient) DeleteProject(ctx context.Context, req *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v11.DeleteProjectResponse], error) { + return c.deleteProject.CallUnary(ctx, req) +} + +// ListMembers calls livekit.publicapi.workspaces.v1.WorkspaceService.ListMembers. +func (c *workspaceServiceClient) ListMembers(ctx context.Context, req *connect.Request[v1.ListMembersRequest]) (*connect.Response[v1.ListMembersResponse], error) { + return c.listMembers.CallUnary(ctx, req) +} + +// GetMember calls livekit.publicapi.workspaces.v1.WorkspaceService.GetMember. +func (c *workspaceServiceClient) GetMember(ctx context.Context, req *connect.Request[v1.GetMemberRequest]) (*connect.Response[v1.GetMemberResponse], error) { + return c.getMember.CallUnary(ctx, req) +} + +// UpdateMember calls livekit.publicapi.workspaces.v1.WorkspaceService.UpdateMember. +func (c *workspaceServiceClient) UpdateMember(ctx context.Context, req *connect.Request[v1.UpdateMemberRequest]) (*connect.Response[v1.UpdateMemberResponse], error) { + return c.updateMember.CallUnary(ctx, req) +} + +// DeleteMember calls livekit.publicapi.workspaces.v1.WorkspaceService.DeleteMember. +func (c *workspaceServiceClient) DeleteMember(ctx context.Context, req *connect.Request[v1.DeleteMemberRequest]) (*connect.Response[v1.DeleteMemberResponse], error) { + return c.deleteMember.CallUnary(ctx, req) +} + +// CreateInvite calls livekit.publicapi.workspaces.v1.WorkspaceService.CreateInvite. +func (c *workspaceServiceClient) CreateInvite(ctx context.Context, req *connect.Request[v1.CreateInviteRequest]) (*connect.Response[v1.CreateInviteResponse], error) { + return c.createInvite.CallUnary(ctx, req) +} + +// ListInvites calls livekit.publicapi.workspaces.v1.WorkspaceService.ListInvites. +func (c *workspaceServiceClient) ListInvites(ctx context.Context, req *connect.Request[v1.ListInvitesRequest]) (*connect.Response[v1.ListInvitesResponse], error) { + return c.listInvites.CallUnary(ctx, req) +} + +// GetInvite calls livekit.publicapi.workspaces.v1.WorkspaceService.GetInvite. +func (c *workspaceServiceClient) GetInvite(ctx context.Context, req *connect.Request[v1.GetInviteRequest]) (*connect.Response[v1.GetInviteResponse], error) { + return c.getInvite.CallUnary(ctx, req) +} + +// DeleteInvite calls livekit.publicapi.workspaces.v1.WorkspaceService.DeleteInvite. +func (c *workspaceServiceClient) DeleteInvite(ctx context.Context, req *connect.Request[v1.DeleteInviteRequest]) (*connect.Response[v1.DeleteInviteResponse], error) { + return c.deleteInvite.CallUnary(ctx, req) +} + +// AnswerInvite calls livekit.publicapi.workspaces.v1.WorkspaceService.AnswerInvite. +func (c *workspaceServiceClient) AnswerInvite(ctx context.Context, req *connect.Request[v1.AnswerInviteRequest]) (*connect.Response[v1.AnswerInviteResponse], error) { + return c.answerInvite.CallUnary(ctx, req) +} + +// WorkspaceServiceHandler is an implementation of the +// livekit.publicapi.workspaces.v1.WorkspaceService service. +type WorkspaceServiceHandler interface { + ListWorkspaces(context.Context, *connect.Request[v1.ListWorkspacesRequest]) (*connect.Response[v1.ListWorkspacesResponse], error) + GetWorkspace(context.Context, *connect.Request[v1.GetWorkspaceRequest]) (*connect.Response[v1.GetWorkspaceResponse], error) + // rpc CreateWorkspace(CreateWorkspaceRequest) returns (CreateWorkspaceResponse); // TODO: Will we want to allow creation of workspaces? + UpdateWorkspace(context.Context, *connect.Request[v1.UpdateWorkspaceRequest]) (*connect.Response[v1.UpdateWorkspaceResponse], error) + DeleteWorkspace(context.Context, *connect.Request[v1.DeleteWorkspaceRequest]) (*connect.Response[v1.DeleteWorkspaceResponse], error) + // Project CRUD scoped to a workspace — responses owned by projects.v1. + ListProjects(context.Context, *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v11.ListProjectsResponse], error) + GetProject(context.Context, *connect.Request[v1.GetProjectRequest]) (*connect.Response[v11.GetProjectResponse], error) + CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v11.CreateProjectResponse], error) + UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v11.UpdateProjectResponse], error) + DeleteProject(context.Context, *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v11.DeleteProjectResponse], error) + // Members & invites (mirrors cloud WorkspaceService current flows). + ListMembers(context.Context, *connect.Request[v1.ListMembersRequest]) (*connect.Response[v1.ListMembersResponse], error) + GetMember(context.Context, *connect.Request[v1.GetMemberRequest]) (*connect.Response[v1.GetMemberResponse], error) + UpdateMember(context.Context, *connect.Request[v1.UpdateMemberRequest]) (*connect.Response[v1.UpdateMemberResponse], error) + DeleteMember(context.Context, *connect.Request[v1.DeleteMemberRequest]) (*connect.Response[v1.DeleteMemberResponse], error) + CreateInvite(context.Context, *connect.Request[v1.CreateInviteRequest]) (*connect.Response[v1.CreateInviteResponse], error) + ListInvites(context.Context, *connect.Request[v1.ListInvitesRequest]) (*connect.Response[v1.ListInvitesResponse], error) + GetInvite(context.Context, *connect.Request[v1.GetInviteRequest]) (*connect.Response[v1.GetInviteResponse], error) + DeleteInvite(context.Context, *connect.Request[v1.DeleteInviteRequest]) (*connect.Response[v1.DeleteInviteResponse], error) + AnswerInvite(context.Context, *connect.Request[v1.AnswerInviteRequest]) (*connect.Response[v1.AnswerInviteResponse], error) +} + +// NewWorkspaceServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewWorkspaceServiceHandler(svc WorkspaceServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + workspaceServiceMethods := v1.File_livekit_publicapi_workspaces_v1_workspaces_proto.Services().ByName("WorkspaceService").Methods() + workspaceServiceListWorkspacesHandler := connect.NewUnaryHandler( + WorkspaceServiceListWorkspacesProcedure, + svc.ListWorkspaces, + connect.WithSchema(workspaceServiceMethods.ByName("ListWorkspaces")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceGetWorkspaceHandler := connect.NewUnaryHandler( + WorkspaceServiceGetWorkspaceProcedure, + svc.GetWorkspace, + connect.WithSchema(workspaceServiceMethods.ByName("GetWorkspace")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceUpdateWorkspaceHandler := connect.NewUnaryHandler( + WorkspaceServiceUpdateWorkspaceProcedure, + svc.UpdateWorkspace, + connect.WithSchema(workspaceServiceMethods.ByName("UpdateWorkspace")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceDeleteWorkspaceHandler := connect.NewUnaryHandler( + WorkspaceServiceDeleteWorkspaceProcedure, + svc.DeleteWorkspace, + connect.WithSchema(workspaceServiceMethods.ByName("DeleteWorkspace")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceListProjectsHandler := connect.NewUnaryHandler( + WorkspaceServiceListProjectsProcedure, + svc.ListProjects, + connect.WithSchema(workspaceServiceMethods.ByName("ListProjects")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceGetProjectHandler := connect.NewUnaryHandler( + WorkspaceServiceGetProjectProcedure, + svc.GetProject, + connect.WithSchema(workspaceServiceMethods.ByName("GetProject")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceCreateProjectHandler := connect.NewUnaryHandler( + WorkspaceServiceCreateProjectProcedure, + svc.CreateProject, + connect.WithSchema(workspaceServiceMethods.ByName("CreateProject")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceUpdateProjectHandler := connect.NewUnaryHandler( + WorkspaceServiceUpdateProjectProcedure, + svc.UpdateProject, + connect.WithSchema(workspaceServiceMethods.ByName("UpdateProject")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceDeleteProjectHandler := connect.NewUnaryHandler( + WorkspaceServiceDeleteProjectProcedure, + svc.DeleteProject, + connect.WithSchema(workspaceServiceMethods.ByName("DeleteProject")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceListMembersHandler := connect.NewUnaryHandler( + WorkspaceServiceListMembersProcedure, + svc.ListMembers, + connect.WithSchema(workspaceServiceMethods.ByName("ListMembers")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceGetMemberHandler := connect.NewUnaryHandler( + WorkspaceServiceGetMemberProcedure, + svc.GetMember, + connect.WithSchema(workspaceServiceMethods.ByName("GetMember")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceUpdateMemberHandler := connect.NewUnaryHandler( + WorkspaceServiceUpdateMemberProcedure, + svc.UpdateMember, + connect.WithSchema(workspaceServiceMethods.ByName("UpdateMember")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceDeleteMemberHandler := connect.NewUnaryHandler( + WorkspaceServiceDeleteMemberProcedure, + svc.DeleteMember, + connect.WithSchema(workspaceServiceMethods.ByName("DeleteMember")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceCreateInviteHandler := connect.NewUnaryHandler( + WorkspaceServiceCreateInviteProcedure, + svc.CreateInvite, + connect.WithSchema(workspaceServiceMethods.ByName("CreateInvite")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceListInvitesHandler := connect.NewUnaryHandler( + WorkspaceServiceListInvitesProcedure, + svc.ListInvites, + connect.WithSchema(workspaceServiceMethods.ByName("ListInvites")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceGetInviteHandler := connect.NewUnaryHandler( + WorkspaceServiceGetInviteProcedure, + svc.GetInvite, + connect.WithSchema(workspaceServiceMethods.ByName("GetInvite")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceDeleteInviteHandler := connect.NewUnaryHandler( + WorkspaceServiceDeleteInviteProcedure, + svc.DeleteInvite, + connect.WithSchema(workspaceServiceMethods.ByName("DeleteInvite")), + connect.WithHandlerOptions(opts...), + ) + workspaceServiceAnswerInviteHandler := connect.NewUnaryHandler( + WorkspaceServiceAnswerInviteProcedure, + svc.AnswerInvite, + connect.WithSchema(workspaceServiceMethods.ByName("AnswerInvite")), + connect.WithHandlerOptions(opts...), + ) + return "/livekit.publicapi.workspaces.v1.WorkspaceService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case WorkspaceServiceListWorkspacesProcedure: + workspaceServiceListWorkspacesHandler.ServeHTTP(w, r) + case WorkspaceServiceGetWorkspaceProcedure: + workspaceServiceGetWorkspaceHandler.ServeHTTP(w, r) + case WorkspaceServiceUpdateWorkspaceProcedure: + workspaceServiceUpdateWorkspaceHandler.ServeHTTP(w, r) + case WorkspaceServiceDeleteWorkspaceProcedure: + workspaceServiceDeleteWorkspaceHandler.ServeHTTP(w, r) + case WorkspaceServiceListProjectsProcedure: + workspaceServiceListProjectsHandler.ServeHTTP(w, r) + case WorkspaceServiceGetProjectProcedure: + workspaceServiceGetProjectHandler.ServeHTTP(w, r) + case WorkspaceServiceCreateProjectProcedure: + workspaceServiceCreateProjectHandler.ServeHTTP(w, r) + case WorkspaceServiceUpdateProjectProcedure: + workspaceServiceUpdateProjectHandler.ServeHTTP(w, r) + case WorkspaceServiceDeleteProjectProcedure: + workspaceServiceDeleteProjectHandler.ServeHTTP(w, r) + case WorkspaceServiceListMembersProcedure: + workspaceServiceListMembersHandler.ServeHTTP(w, r) + case WorkspaceServiceGetMemberProcedure: + workspaceServiceGetMemberHandler.ServeHTTP(w, r) + case WorkspaceServiceUpdateMemberProcedure: + workspaceServiceUpdateMemberHandler.ServeHTTP(w, r) + case WorkspaceServiceDeleteMemberProcedure: + workspaceServiceDeleteMemberHandler.ServeHTTP(w, r) + case WorkspaceServiceCreateInviteProcedure: + workspaceServiceCreateInviteHandler.ServeHTTP(w, r) + case WorkspaceServiceListInvitesProcedure: + workspaceServiceListInvitesHandler.ServeHTTP(w, r) + case WorkspaceServiceGetInviteProcedure: + workspaceServiceGetInviteHandler.ServeHTTP(w, r) + case WorkspaceServiceDeleteInviteProcedure: + workspaceServiceDeleteInviteHandler.ServeHTTP(w, r) + case WorkspaceServiceAnswerInviteProcedure: + workspaceServiceAnswerInviteHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedWorkspaceServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedWorkspaceServiceHandler struct{} + +func (UnimplementedWorkspaceServiceHandler) ListWorkspaces(context.Context, *connect.Request[v1.ListWorkspacesRequest]) (*connect.Response[v1.ListWorkspacesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.ListWorkspaces is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) GetWorkspace(context.Context, *connect.Request[v1.GetWorkspaceRequest]) (*connect.Response[v1.GetWorkspaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.GetWorkspace is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) UpdateWorkspace(context.Context, *connect.Request[v1.UpdateWorkspaceRequest]) (*connect.Response[v1.UpdateWorkspaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.UpdateWorkspace is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) DeleteWorkspace(context.Context, *connect.Request[v1.DeleteWorkspaceRequest]) (*connect.Response[v1.DeleteWorkspaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.DeleteWorkspace is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) ListProjects(context.Context, *connect.Request[v1.ListProjectsRequest]) (*connect.Response[v11.ListProjectsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.ListProjects is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) GetProject(context.Context, *connect.Request[v1.GetProjectRequest]) (*connect.Response[v11.GetProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.GetProject is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v11.CreateProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.CreateProject is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v11.UpdateProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.UpdateProject is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) DeleteProject(context.Context, *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v11.DeleteProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.DeleteProject is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) ListMembers(context.Context, *connect.Request[v1.ListMembersRequest]) (*connect.Response[v1.ListMembersResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.ListMembers is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) GetMember(context.Context, *connect.Request[v1.GetMemberRequest]) (*connect.Response[v1.GetMemberResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.GetMember is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) UpdateMember(context.Context, *connect.Request[v1.UpdateMemberRequest]) (*connect.Response[v1.UpdateMemberResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.UpdateMember is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) DeleteMember(context.Context, *connect.Request[v1.DeleteMemberRequest]) (*connect.Response[v1.DeleteMemberResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.DeleteMember is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) CreateInvite(context.Context, *connect.Request[v1.CreateInviteRequest]) (*connect.Response[v1.CreateInviteResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.CreateInvite is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) ListInvites(context.Context, *connect.Request[v1.ListInvitesRequest]) (*connect.Response[v1.ListInvitesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.ListInvites is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) GetInvite(context.Context, *connect.Request[v1.GetInviteRequest]) (*connect.Response[v1.GetInviteResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.GetInvite is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) DeleteInvite(context.Context, *connect.Request[v1.DeleteInviteRequest]) (*connect.Response[v1.DeleteInviteResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.DeleteInvite is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) AnswerInvite(context.Context, *connect.Request[v1.AnswerInviteRequest]) (*connect.Response[v1.AnswerInviteResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("livekit.publicapi.workspaces.v1.WorkspaceService.AnswerInvite is not implemented")) +} diff --git a/pkg/loadtester/agentloadtester.go b/pkg/loadtester/agentloadtester.go index 2abf6c8d7..9289650b6 100644 --- a/pkg/loadtester/agentloadtester.go +++ b/pkg/loadtester/agentloadtester.go @@ -342,8 +342,8 @@ func (t *AgentLoadTester) printStats() { index++ } - fmt.Println("\nTest Statistics:") - fmt.Println(table) + util.Result("\nTest Statistics:") + util.Result(table) } func newAccessToken(apiKey, apiSecret, roomName, pID string) (string, error) { diff --git a/pkg/loadtester/loadtest.go b/pkg/loadtester/loadtest.go index 8c86ac2e5..68e824563 100644 --- a/pkg/loadtester/loadtest.go +++ b/pkg/loadtester/loadtest.go @@ -144,8 +144,8 @@ func (t *LoadTest) Run(ctx context.Context) error { } if len(names) > 0 { - fmt.Println("\nTrack loading:") - fmt.Println(testerTable) + util.Result("\nTrack loading:") + util.Result(testerTable) } if len(summaries) == 0 { @@ -181,8 +181,8 @@ func (t *LoadTest) Run(ctx context.Context) error { ) summaryTable.Row("Total", fmt.Sprintf("%d/%d", s.tracks, s.expected), sBitrate, sDropped, strconv.FormatInt(s.errCount, 10)) } - fmt.Println("\nSubscriber summaries:") - fmt.Println(summaryTable) + util.Result("\nSubscriber summaries:") + util.Result(summaryTable) return nil } @@ -229,7 +229,7 @@ func (t *LoadTest) RunSuite(ctx context.Context) error { if caseParams.Duration == 0 { caseParams.Duration = 15 * time.Second } - fmt.Printf("\nRunning test: %d pub, %d sub, video: %s\n", c.publishers, c.subscribers, videoString) + util.Statusf("\nRunning test: %d pub, %d sub, video: %s", c.publishers, c.subscribers, videoString) stats, err := t.run(ctx, caseParams) if err != nil { @@ -265,8 +265,8 @@ func (t *LoadTest) RunSuite(ctx context.Context) error { } if showTrackStats { - fmt.Println("\nSuite results:") - fmt.Println(table) + util.Result("\nSuite results:") + util.Result(table) } return nil } @@ -291,7 +291,7 @@ func (t *LoadTest) run(ctx context.Context, params Params) (map[string]*testerSt if params.Subscribers > 0 { participantStrings = append(participantStrings, fmt.Sprintf("%d subscribers", params.Subscribers)) } - fmt.Printf("Starting load test with %s, room: %s\n", + util.Statusf("Starting load test with %s, room: %s", strings.Join(participantStrings, ", "), params.Room) var publishers, testers []*LoadTester @@ -325,7 +325,7 @@ func (t *LoadTest) run(ctx context.Context, params Params) (map[string]*testerSt group.Go(func() error { if err := tester.Start(); err != nil { - fmt.Println(fmt.Errorf("could not connect %s: %w", testerParams.name, err)) + util.Warnf("could not connect %s: %v", testerParams.name, err) errs.Store(testerParams.name, err) return nil } @@ -384,7 +384,7 @@ func (t *LoadTest) run(ctx context.Context, params Params) (map[string]*testerSt // a really long time duration = 1000 * time.Hour } - fmt.Printf("Finished connecting to room, waiting %s\n", duration.String()) + util.Statusf("Finished connecting to room, waiting %s", duration.String()) select { case <-ctx.Done(): diff --git a/pkg/loadtester/loadtester.go b/pkg/loadtester/loadtester.go index b9240e80e..22fd156dc 100644 --- a/pkg/loadtester/loadtester.go +++ b/pkg/loadtester/loadtester.go @@ -25,6 +25,7 @@ import ( "go.uber.org/atomic" provider2 "github.com/livekit/livekit-cli/v2/pkg/provider" + "github.com/livekit/livekit-cli/v2/pkg/util" "github.com/livekit/protocol/livekit" lksdk "github.com/livekit/server-sdk-go/v2" "github.com/livekit/server-sdk-go/v2/pkg/samplebuilder" @@ -108,7 +109,7 @@ func (t *LoadTester) Start() error { ParticipantCallback: lksdk.ParticipantCallback{ OnTrackSubscribed: t.onTrackSubscribed, OnTrackSubscriptionFailed: func(sid string, rp *lksdk.RemoteParticipant) { - fmt.Printf("track subscription failed, lp:%v, sid:%v, rp:%v/%v\n", identity, sid, rp.Identity(), rp.SID()) + util.Warnf("track subscription failed, lp:%v, sid:%v, rp:%v/%v", identity, sid, rp.Identity(), rp.SID()) }, OnTrackPublished: t.onTrackPublished, }, @@ -152,7 +153,7 @@ func (t *LoadTester) PublishAudioTrack(name string) (string, error) { return "", nil } - fmt.Println("publishing audio track -", t.room.LocalParticipant.Identity()) + util.Status("publishing audio track -", t.room.LocalParticipant.Identity()) audioLooper, err := provider2.CreateAudioLooper() if err != nil { return "", err @@ -179,7 +180,7 @@ func (t *LoadTester) PublishVideoTrack(name, resolution, codec string) (string, return "", nil } - fmt.Println("publishing video track -", t.room.LocalParticipant.Identity()) + util.Status("publishing video track -", t.room.LocalParticipant.Identity()) loopers, err := provider2.CreateVideoLoopers(resolution, codec, false) if err != nil { return "", err @@ -204,7 +205,7 @@ func (t *LoadTester) PublishVideoTrack(name, resolution, codec string) (string, func (t *LoadTester) PublishSimulcastTrack(name, resolution, codec string) (string, error) { var tracks []*lksdk.LocalTrack - fmt.Println("publishing simulcast video track -", t.room.LocalParticipant.Identity()) + util.Status("publishing simulcast video track -", t.room.LocalParticipant.Identity()) loopers, err := provider2.CreateVideoLoopers(resolution, codec, true) if err != nil { return "", err @@ -317,7 +318,7 @@ func (t *LoadTester) onTrackSubscribed(track *webrtc.TrackRemote, pub *lksdk.Rem kind: pub.Kind(), } t.stats.Store(track.ID(), s) - fmt.Println("subscribed to track", t.room.LocalParticipant.Identity(), pub.SID(), pub.Kind(), fmt.Sprintf("%d/%d", numSubscribed, numTotal)) + util.Status("subscribed to track", t.room.LocalParticipant.Identity(), pub.SID(), pub.Kind(), fmt.Sprintf("%d/%d", numSubscribed, numTotal)) // consume track go t.consumeTrack(track, pub, rp) @@ -379,7 +380,7 @@ func (t *LoadTester) consumeTrack(track *webrtc.TrackRemote, pub *lksdk.RemoteTr defer func() { if e := recover(); e != nil { - fmt.Println("caught panic in consumeTrack", e) + util.Warnf("caught panic in consumeTrack: %v", e) } }() diff --git a/pkg/public/client.go b/pkg/public/client.go index 47bd2c5db..69938f6c1 100644 --- a/pkg/public/client.go +++ b/pkg/public/client.go @@ -12,143 +12,147 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package public is the CLI's client for the user-authenticated LiveKit Public +// API. It wraps the Connect clients generated from the publicapi protobufs +// (pkg/gen, via the `generate` mage target) behind the small domain surface the +// CLI needs, so callers don't depend on the generated types directly. +// +// Transport: the generated clients speak the Connect protocol by default (works +// over HTTP/1.1 and HTTP/2). The server also accepts gRPC and gRPC-Web on the +// same endpoints; to force gRPC wire framing, pass connect.WithGRPC() through +// New's opts. package public import ( "context" - "encoding/json" - "errors" - "fmt" "net/http" - "strings" - "github.com/livekit/livekit-cli/v2/pkg/public/oapi" + "connectrpc.com/connect" + + commonv1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/common/v1" + projectsv1 "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/projects/v1" + "github.com/livekit/livekit-cli/v2/pkg/gen/livekit/publicapi/projects/v1/projectsv1connect" ) // DefaultBaseURL is the production base URL of the LiveKit Public API. Override -// it (e.g. to http://localhost:8000/v1) for local development. -const DefaultBaseURL = "https://api.livekit.cloud/v1" +// it (e.g. to http://localhost:8000) for local development. Connect appends the +// RPC path (e.g. /livekit.publicapi.projects.v1.ProjectService/ListProjects), so +// this is the host root, not a REST prefix. +const DefaultBaseURL = "https://api.livekit.cloud" -// Client is the CLI's client for the user-authenticated LiveKit Public API. It -// wraps the oapi-codegen-generated client (package oapi) and exposes the small -// set of domain types and operations the CLI needs, insulating callers from the -// generated surface (which is regenerated from the OpenAPI spec). +// Client is the CLI's user-authenticated Public API client. type Client struct { - gen *oapi.ClientWithResponses + projects projectsv1connect.ProjectServiceClient } // Project is a project the authenticated user can access. -// -// NOTE: the published spec does not yet describe the project endpoints (they -// are 501-only, with no success schema), so ListProjects/GetProject decode -// their responses by hand below rather than through generated types. This -// mirror carries only the id the server currently returns; extend it (and the -// decoding) as the endpoints — ideally the spec itself — grow. type Project struct { - ID string + ID string `json:"id"` + Name string `json:"name"` + Subdomain string `json:"subdomain,omitempty"` +} + +// projectFrom maps a generated Project message to the domain type. +func projectFrom(p *projectsv1.Project) Project { + return Project{ID: p.GetId(), Name: p.GetName(), Subdomain: p.GetSubdomain()} } // New builds a Client for the Public API at baseURL, authenticating every // request with the given user session token. If baseURL is empty, DefaultBaseURL -// is used. -func New(baseURL, token string, opts ...oapi.ClientOption) (*Client, error) { +// is used. Extra Connect client options (e.g. connect.WithGRPC()) may be passed. +func New(baseURL, token string, opts ...connect.ClientOption) (*Client, error) { if baseURL == "" { baseURL = DefaultBaseURL } - // Prepend the bearer-auth editor so callers' opts can still override it. - opts = append([]oapi.ClientOption{oapi.WithRequestEditorFn(bearerAuth(token))}, opts...) - gen, err := oapi.NewClientWithResponses(baseURL, opts...) - if err != nil { - return nil, err - } - return &Client{gen: gen}, nil + // Prepend the bearer-auth interceptor so callers' opts can still override + // transport behavior. + opts = append([]connect.ClientOption{connect.WithInterceptors(bearerAuth(token))}, opts...) + return &Client{ + projects: projectsv1connect.NewProjectServiceClient(http.DefaultClient, baseURL, opts...), + }, nil } -// bearerAuth returns a request editor that authorizes each request with the +// bearerAuth returns a Connect interceptor that authorizes each request with the // user session token. -func bearerAuth(token string) oapi.RequestEditorFn { - return func(_ context.Context, req *http.Request) error { - req.Header.Set("Authorization", "Bearer "+token) - return nil - } +func bearerAuth(token string) connect.Interceptor { + return connect.UnaryInterceptorFunc(func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) { + req.Header().Set("Authorization", "Bearer "+token) + return next(ctx, req) + } + }) } // ListProjects returns the projects the authenticated user can access. +// +// NOTE: this returns only the first page; wire up PageInfo/cursor paging when a +// command needs the full set. func (c *Client) ListProjects(ctx context.Context) ([]Project, error) { - resp, err := c.gen.ListProjectsWithResponse(ctx) + resp, err := c.projects.ListProjects(ctx, connect.NewRequest(&projectsv1.ListProjectsRequest{ + Page: &commonv1.PageRequest{ + PageSize: 100, + }, + })) if err != nil { return nil, err } - if resp.StatusCode() != http.StatusOK { - return nil, responseError(resp.StatusCode(), resp.Body) - } - // The spec has no schema for this endpoint yet, so decode the body directly. - var body []struct { - ID string `json:"id"` - } - if err := json.Unmarshal(resp.Body, &body); err != nil { - return nil, fmt.Errorf("decode projects: %w", err) - } - projects := make([]Project, len(body)) - for i, p := range body { - projects[i] = Project{ID: p.ID} + items := resp.Msg.GetItems() + projects := make([]Project, len(items)) + for i, p := range items { + projects[i] = projectFrom(p) } return projects, nil } // GetProject returns a single project by id. func (c *Client) GetProject(ctx context.Context, projectID string) (*Project, error) { - resp, err := c.gen.GetProjectWithResponse(ctx, projectID) + resp, err := c.projects.GetProject(ctx, connect.NewRequest(&projectsv1.GetProjectRequest{ProjectId: projectID})) if err != nil { return nil, err } - if resp.StatusCode() != http.StatusOK { - return nil, responseError(resp.StatusCode(), resp.Body) - } - var body struct { - ID string `json:"id"` - } - if err := json.Unmarshal(resp.Body, &body); err != nil { - return nil, fmt.Errorf("decode project: %w", err) - } - return &Project{ID: body.ID}, nil + p := projectFrom(resp.Msg.GetProject()) + return &p, nil } -// APIError is a structured error from the Public API. It carries the HTTP status -// and, when the body decoded as the spec's Error schema, its code and message. -// Callers can errors.As for it — notably via IsUnauthenticated. -type APIError struct { - Status int - Code string - Message string +// CreateProject creates a new project with the given name and returns it. +func (c *Client) CreateProject(ctx context.Context, name string) (*Project, error) { + resp, err := c.projects.CreateProject(ctx, connect.NewRequest(&projectsv1.CreateProjectRequest{Name: name})) + if err != nil { + return nil, err + } + p := projectFrom(resp.Msg.GetProject()) + return &p, nil } -func (e *APIError) Error() string { - if e.Code == "" { - return e.Message +// UpdateProject updates a project's name and returns the updated project. +func (c *Client) UpdateProject(ctx context.Context, projectID, name string) (*Project, error) { + resp, err := c.projects.UpdateProject(ctx, connect.NewRequest(&projectsv1.UpdateProjectRequest{ + ProjectId: projectID, + Name: &name, + })) + if err != nil { + return nil, err } - return fmt.Sprintf("%s: %s", e.Code, e.Message) + p := projectFrom(resp.Msg.GetProject()) + return &p, nil +} + +// DeleteProject deletes a project by id. +func (c *Client) DeleteProject(ctx context.Context, projectID string) error { + _, err := c.projects.DeleteProject(ctx, connect.NewRequest(&projectsv1.DeleteProjectRequest{ProjectId: projectID})) + return err } -// IsUnauthenticated reports whether err is an APIError signalling a missing or -// invalid session (HTTP 401), which the CLI surfaces as a prompt to re-run -// `lk cloud auth`. +// IsUnauthenticated reports whether err is a Connect error signalling a missing +// or invalid session (Unauthenticated), which the CLI surfaces as a prompt to +// re-run `lk cloud auth`. func IsUnauthenticated(err error) bool { - var apiErr *APIError - return errors.As(err, &apiErr) && (apiErr.Status == http.StatusUnauthorized || apiErr.Code == "unauthenticated") + return connect.CodeOf(err) == connect.CodeUnauthenticated } -// responseError builds an APIError from a non-2xx response. It prefers the -// spec's structured Error body ({error:{code,message}}) and falls back to the -// raw body when the server returned an unexpected shape or content type. -func responseError(status int, body []byte) error { - var e oapi.Error - if err := json.Unmarshal(body, &e); err == nil && e.Error.Code != "" { - return &APIError{Status: status, Code: e.Error.Code, Message: e.Error.Message} - } - msg := strings.TrimSpace(string(body)) - if msg == "" { - msg = http.StatusText(status) - } - return &APIError{Status: status, Message: fmt.Sprintf("unexpected response (HTTP %d): %s", status, msg)} +// IsPermissionDenied reports whether err is a Connect error signalling that the +// authenticated account/session lacks access to the target project or action +// (PermissionDenied) — distinct from being unauthenticated. +func IsPermissionDenied(err error) bool { + return connect.CodeOf(err) == connect.CodePermissionDenied } diff --git a/pkg/public/gen.go b/pkg/public/gen.go deleted file mode 100644 index b8bc096c8..000000000 --- a/pkg/public/gen.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2026 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package public is the CLI's client for the LiveKit Public API (the -// user-authenticated OpenAPI REST service), named to match public-api-server. -// The typed client under ./oapi is generated by oapi-codegen from an OpenAPI -// 3.1 spec — the same generator public-api-server uses for its server bindings -// (see ./oapi/generate.go and ./oapi/cfg.yaml). -// -// # Source of truth -// -// The authoritative spec is the published document served by the API itself, -// and no copy is kept in this repo. Regeneration fetches it directly (oapi-codegen -// loads http(s) URLs), defaulting to production; override for a local/staging -// server with LK_OPENAPI_SPEC_URL. -// -// The generate directive is gated behind the `oapigen` build tag so a plain -// `go generate ./...` never reaches the network — regenerate deliberately: -// -// go generate -tags oapigen ./pkg/public/... # prod -// LK_OPENAPI_SPEC_URL=http://localhost:8080/openapi.yaml go generate -tags oapigen ./pkg/public/... -// -// The committed artifact is the generated ./oapi/oapi.gen.go, which is what -// keeps ordinary `go build`/`go test` reproducible and offline — only -// regeneration needs the network. The gated directive and the fetch live in -// ./oapi (generate.go, generate.sh, cfg.yaml). -// -// NOTE (temporary): the published spec does not yet describe the project -// endpoints (listProjects/getProject are 501-only, no success schema), so no -// Project type is generated. The client wraps those two endpoints by hand -// (see Client.ListProjects / GetProject in client.go) until the spec declares -// their schemas, at which point the hand-decoding can be replaced with the -// generated types. -package public diff --git a/pkg/public/oapi/cfg.yaml b/pkg/public/oapi/cfg.yaml deleted file mode 100644 index afbe549f7..000000000 --- a/pkg/public/oapi/cfg.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# oapi-codegen configuration for the CLI's LiveKit Public API client. -# -# Generates Go models and a net/http client. The spec is fetched from its -# published URL at generate time (see generate.sh); no spec copy is kept in the -# repo. This mirrors public-api-server's oapi-codegen setup (pkg/api/v1/oapi) so -# the two sides share a generator and conventions — the CLI generates a `client` -# where the server generates a `std-http-server`. See ../gen.go. -package: oapi -output: oapi.gen.go -generate: - models: true - client: true -output-options: - # Keep the generated file readable and stable. - skip-prune: false diff --git a/pkg/public/oapi/generate.go b/pkg/public/oapi/generate.go deleted file mode 100644 index d73f97df2..000000000 --- a/pkg/public/oapi/generate.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2026 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build oapigen - -package oapi - -// This file carries only the code-generation directive for package oapi. It is -// gated behind the `oapigen` build tag so a plain `go generate ./...` never -// reaches out to fetch the spec; regenerate deliberately with: -// -// go generate -tags oapigen ./pkg/public/... -// -// See ../gen.go for the source of truth and generate.sh for the fetch itself. -//go:generate sh generate.sh diff --git a/pkg/public/oapi/generate.sh b/pkg/public/oapi/generate.sh deleted file mode 100644 index a639288e5..000000000 --- a/pkg/public/oapi/generate.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# Regenerates oapi.gen.go from the LiveKit Public API OpenAPI spec. -# -# The spec is fetched directly from its published URL by oapi-codegen (which -# loads http(s) URLs natively) — no local copy of the spec is kept in the repo. -# Defaults to production; override for a local/staging server. The directive is -# gated behind the `oapigen` build tag, so regenerate deliberately with: -# -# go generate -tags oapigen ./pkg/public/... -# LK_OPENAPI_SPEC_URL=http://localhost:8080/openapi.yaml go generate -tags oapigen ./pkg/public/... -# -# Invoked by the //go:generate directive in generate.go (runs in this directory, -# alongside cfg.yaml). -set -eu - -SPEC_URL="${LK_OPENAPI_SPEC_URL:-https://api.livekit.io/openapi.yaml}" -echo "oapi-codegen: generating client from ${SPEC_URL}" -exec go tool oapi-codegen -config cfg.yaml "${SPEC_URL}" diff --git a/pkg/public/oapi/oapi.gen.go b/pkg/public/oapi/oapi.gen.go deleted file mode 100644 index 23191a301..000000000 --- a/pkg/public/oapi/oapi.gen.go +++ /dev/null @@ -1,5639 +0,0 @@ -// Package oapi provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. -package oapi - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "net/url" - "strings" - "time" - - "github.com/oapi-codegen/runtime" - openapi_types "github.com/oapi-codegen/runtime/types" -) - -const ( - BearerAuthScopes bearerAuthContextKey = "bearerAuth.Scopes" -) - -// Defines values for EgressState. -const ( - EgressStateActive EgressState = "active" - EgressStateEnded EgressState = "ended" - EgressStateNever EgressState = "never" -) - -// Valid indicates whether the value is a known member of the EgressState enum. -func (e EgressState) Valid() bool { - switch e { - case EgressStateActive: - return true - case EgressStateEnded: - return true - case EgressStateNever: - return true - default: - return false - } -} - -// Defines values for EgressStatus. -const ( - EGRESSABORTED EgressStatus = "EGRESS_ABORTED" - EGRESSACTIVE EgressStatus = "EGRESS_ACTIVE" - EGRESSCOMPLETE EgressStatus = "EGRESS_COMPLETE" - EGRESSENDING EgressStatus = "EGRESS_ENDING" - EGRESSFAILED EgressStatus = "EGRESS_FAILED" - EGRESSLIMITREACHED EgressStatus = "EGRESS_LIMIT_REACHED" - EGRESSSTARTING EgressStatus = "EGRESS_STARTING" -) - -// Valid indicates whether the value is a known member of the EgressStatus enum. -func (e EgressStatus) Valid() bool { - switch e { - case EGRESSABORTED: - return true - case EGRESSACTIVE: - return true - case EGRESSCOMPLETE: - return true - case EGRESSENDING: - return true - case EGRESSFAILED: - return true - case EGRESSLIMITREACHED: - return true - case EGRESSSTARTING: - return true - default: - return false - } -} - -// Defines values for ExportDataset. -const ( - Egresses ExportDataset = "egresses" - Ingresses ExportDataset = "ingresses" - Sessions ExportDataset = "sessions" - SipCalls ExportDataset = "sip-calls" - Usage ExportDataset = "usage" -) - -// Valid indicates whether the value is a known member of the ExportDataset enum. -func (e ExportDataset) Valid() bool { - switch e { - case Egresses: - return true - case Ingresses: - return true - case Sessions: - return true - case SipCalls: - return true - case Usage: - return true - default: - return false - } -} - -// Defines values for ExportFormat. -const ( - Csv ExportFormat = "csv" - Jsonl ExportFormat = "jsonl" -) - -// Valid indicates whether the value is a known member of the ExportFormat enum. -func (e ExportFormat) Valid() bool { - switch e { - case Csv: - return true - case Jsonl: - return true - default: - return false - } -} - -// Defines values for ExportStatus. -const ( - Canceled ExportStatus = "canceled" - Completed ExportStatus = "completed" - Expired ExportStatus = "expired" - Failed ExportStatus = "failed" - Pending ExportStatus = "pending" - Running ExportStatus = "running" -) - -// Valid indicates whether the value is a known member of the ExportStatus enum. -func (e ExportStatus) Valid() bool { - switch e { - case Canceled: - return true - case Completed: - return true - case Expired: - return true - case Failed: - return true - case Pending: - return true - case Running: - return true - default: - return false - } -} - -// Defines values for Feature. -const ( - FeatureAgent Feature = "agent" - FeatureEgress Feature = "egress" - FeatureIngress Feature = "ingress" - FeatureSip Feature = "sip" - FeatureTranscription Feature = "transcription" -) - -// Valid indicates whether the value is a known member of the Feature enum. -func (e Feature) Valid() bool { - switch e { - case FeatureAgent: - return true - case FeatureEgress: - return true - case FeatureIngress: - return true - case FeatureSip: - return true - case FeatureTranscription: - return true - default: - return false - } -} - -// Defines values for IngressStatus. -const ( - ENDPOINTBUFFERING IngressStatus = "ENDPOINT_BUFFERING" - ENDPOINTCOMPLETE IngressStatus = "ENDPOINT_COMPLETE" - ENDPOINTERROR IngressStatus = "ENDPOINT_ERROR" - ENDPOINTINACTIVE IngressStatus = "ENDPOINT_INACTIVE" - ENDPOINTPUBLISHING IngressStatus = "ENDPOINT_PUBLISHING" -) - -// Valid indicates whether the value is a known member of the IngressStatus enum. -func (e IngressStatus) Valid() bool { - switch e { - case ENDPOINTBUFFERING: - return true - case ENDPOINTCOMPLETE: - return true - case ENDPOINTERROR: - return true - case ENDPOINTINACTIVE: - return true - case ENDPOINTPUBLISHING: - return true - default: - return false - } -} - -// Defines values for SessionStatus. -const ( - SessionStatusActive SessionStatus = "active" - SessionStatusClosed SessionStatus = "closed" -) - -// Valid indicates whether the value is a known member of the SessionStatus enum. -func (e SessionStatus) Valid() bool { - switch e { - case SessionStatusActive: - return true - case SessionStatusClosed: - return true - default: - return false - } -} - -// Defines values for SipCallStatus. -const ( - SCSACTIVE SipCallStatus = "SCS_ACTIVE" - SCSCALLINCOMING SipCallStatus = "SCS_CALL_INCOMING" - SCSDISCONNECTED SipCallStatus = "SCS_DISCONNECTED" - SCSERROR SipCallStatus = "SCS_ERROR" - SCSPARTICIPANTJOINED SipCallStatus = "SCS_PARTICIPANT_JOINED" -) - -// Valid indicates whether the value is a known member of the SipCallStatus enum. -func (e SipCallStatus) Valid() bool { - switch e { - case SCSACTIVE: - return true - case SCSCALLINCOMING: - return true - case SCSDISCONNECTED: - return true - case SCSERROR: - return true - case SCSPARTICIPANTJOINED: - return true - default: - return false - } -} - -// Defines values for SipDirection. -const ( - SipDirectionInbound SipDirection = "inbound" - SipDirectionOutbound SipDirection = "outbound" -) - -// Valid indicates whether the value is a known member of the SipDirection enum. -func (e SipDirection) Valid() bool { - switch e { - case SipDirectionInbound: - return true - case SipDirectionOutbound: - return true - default: - return false - } -} - -// Defines values for SipEventEventType. -const ( - SipEventEventTypeSIPCALLENDED SipEventEventType = "SIP_CALL_ENDED" - SipEventEventTypeSIPCALLINCOMING SipEventEventType = "SIP_CALL_INCOMING" - SipEventEventTypeSIPCALLSTARTED SipEventEventType = "SIP_CALL_STARTED" - SipEventEventTypeSIPPARTICIPANTCREATED SipEventEventType = "SIP_PARTICIPANT_CREATED" - SipEventEventTypeSIPTRANSFERCOMPLETE SipEventEventType = "SIP_TRANSFER_COMPLETE" - SipEventEventTypeSIPTRANSFERREQUESTED SipEventEventType = "SIP_TRANSFER_REQUESTED" -) - -// Valid indicates whether the value is a known member of the SipEventEventType enum. -func (e SipEventEventType) Valid() bool { - switch e { - case SipEventEventTypeSIPCALLENDED: - return true - case SipEventEventTypeSIPCALLINCOMING: - return true - case SipEventEventTypeSIPCALLSTARTED: - return true - case SipEventEventTypeSIPPARTICIPANTCREATED: - return true - case SipEventEventTypeSIPTRANSFERCOMPLETE: - return true - case SipEventEventTypeSIPTRANSFERREQUESTED: - return true - default: - return false - } -} - -// Defines values for TimeseriesResponseInterval. -const ( - TimeseriesResponseIntervalDay TimeseriesResponseInterval = "day" - TimeseriesResponseIntervalHour TimeseriesResponseInterval = "hour" - TimeseriesResponseIntervalMinute TimeseriesResponseInterval = "minute" -) - -// Valid indicates whether the value is a known member of the TimeseriesResponseInterval enum. -func (e TimeseriesResponseInterval) Valid() bool { - switch e { - case TimeseriesResponseIntervalDay: - return true - case TimeseriesResponseIntervalHour: - return true - case TimeseriesResponseIntervalMinute: - return true - default: - return false - } -} - -// Defines values for Interval. -const ( - IntervalDay Interval = "day" - IntervalHour Interval = "hour" - IntervalMinute Interval = "minute" -) - -// Valid indicates whether the value is a known member of the Interval enum. -func (e Interval) Valid() bool { - switch e { - case IntervalDay: - return true - case IntervalHour: - return true - case IntervalMinute: - return true - default: - return false - } -} - -// Defines values for Order. -const ( - OrderAsc Order = "asc" - OrderDesc Order = "desc" -) - -// Valid indicates whether the value is a known member of the Order enum. -func (e Order) Valid() bool { - switch e { - case OrderAsc: - return true - case OrderDesc: - return true - default: - return false - } -} - -// Defines values for ListProjectEgressesParamsOrder. -const ( - ListProjectEgressesParamsOrderAsc ListProjectEgressesParamsOrder = "asc" - ListProjectEgressesParamsOrderDesc ListProjectEgressesParamsOrder = "desc" -) - -// Valid indicates whether the value is a known member of the ListProjectEgressesParamsOrder enum. -func (e ListProjectEgressesParamsOrder) Valid() bool { - switch e { - case ListProjectEgressesParamsOrderAsc: - return true - case ListProjectEgressesParamsOrderDesc: - return true - default: - return false - } -} - -// Defines values for ListProjectIngressesParamsOrder. -const ( - ListProjectIngressesParamsOrderAsc ListProjectIngressesParamsOrder = "asc" - ListProjectIngressesParamsOrderDesc ListProjectIngressesParamsOrder = "desc" -) - -// Valid indicates whether the value is a known member of the ListProjectIngressesParamsOrder enum. -func (e ListProjectIngressesParamsOrder) Valid() bool { - switch e { - case ListProjectIngressesParamsOrderAsc: - return true - case ListProjectIngressesParamsOrderDesc: - return true - default: - return false - } -} - -// Defines values for ListProjectSessionsParamsOrder. -const ( - ListProjectSessionsParamsOrderAsc ListProjectSessionsParamsOrder = "asc" - ListProjectSessionsParamsOrderDesc ListProjectSessionsParamsOrder = "desc" -) - -// Valid indicates whether the value is a known member of the ListProjectSessionsParamsOrder enum. -func (e ListProjectSessionsParamsOrder) Valid() bool { - switch e { - case ListProjectSessionsParamsOrderAsc: - return true - case ListProjectSessionsParamsOrderDesc: - return true - default: - return false - } -} - -// Defines values for ListProjectSessionsParamsSort. -const ( - EndedAt ListProjectSessionsParamsSort = "endedAt" - StartedAt ListProjectSessionsParamsSort = "startedAt" -) - -// Valid indicates whether the value is a known member of the ListProjectSessionsParamsSort enum. -func (e ListProjectSessionsParamsSort) Valid() bool { - switch e { - case EndedAt: - return true - case StartedAt: - return true - default: - return false - } -} - -// Defines values for ListProjectSessionsParamsStatus. -const ( - Active ListProjectSessionsParamsStatus = "active" - Closed ListProjectSessionsParamsStatus = "closed" -) - -// Valid indicates whether the value is a known member of the ListProjectSessionsParamsStatus enum. -func (e ListProjectSessionsParamsStatus) Valid() bool { - switch e { - case Active: - return true - case Closed: - return true - default: - return false - } -} - -// Defines values for ListProjectSipCallsParamsOrder. -const ( - ListProjectSipCallsParamsOrderAsc ListProjectSipCallsParamsOrder = "asc" - ListProjectSipCallsParamsOrderDesc ListProjectSipCallsParamsOrder = "desc" -) - -// Valid indicates whether the value is a known member of the ListProjectSipCallsParamsOrder enum. -func (e ListProjectSipCallsParamsOrder) Valid() bool { - switch e { - case ListProjectSipCallsParamsOrderAsc: - return true - case ListProjectSipCallsParamsOrderDesc: - return true - default: - return false - } -} - -// Defines values for ListProjectSipCallsParamsDirection. -const ( - ListProjectSipCallsParamsDirectionInbound ListProjectSipCallsParamsDirection = "inbound" - ListProjectSipCallsParamsDirectionOutbound ListProjectSipCallsParamsDirection = "outbound" -) - -// Valid indicates whether the value is a known member of the ListProjectSipCallsParamsDirection enum. -func (e ListProjectSipCallsParamsDirection) Valid() bool { - switch e { - case ListProjectSipCallsParamsDirectionInbound: - return true - case ListProjectSipCallsParamsDirectionOutbound: - return true - default: - return false - } -} - -// Defines values for ListSipCallEventsParamsOrder. -const ( - ListSipCallEventsParamsOrderAsc ListSipCallEventsParamsOrder = "asc" - ListSipCallEventsParamsOrderDesc ListSipCallEventsParamsOrder = "desc" -) - -// Valid indicates whether the value is a known member of the ListSipCallEventsParamsOrder enum. -func (e ListSipCallEventsParamsOrder) Valid() bool { - switch e { - case ListSipCallEventsParamsOrderAsc: - return true - case ListSipCallEventsParamsOrderDesc: - return true - default: - return false - } -} - -// Defines values for ListSipCallEventsParamsEventType. -const ( - ListSipCallEventsParamsEventTypeSIPCALLENDED ListSipCallEventsParamsEventType = "SIP_CALL_ENDED" - ListSipCallEventsParamsEventTypeSIPCALLINCOMING ListSipCallEventsParamsEventType = "SIP_CALL_INCOMING" - ListSipCallEventsParamsEventTypeSIPCALLSTARTED ListSipCallEventsParamsEventType = "SIP_CALL_STARTED" - ListSipCallEventsParamsEventTypeSIPPARTICIPANTCREATED ListSipCallEventsParamsEventType = "SIP_PARTICIPANT_CREATED" - ListSipCallEventsParamsEventTypeSIPTRANSFERCOMPLETE ListSipCallEventsParamsEventType = "SIP_TRANSFER_COMPLETE" - ListSipCallEventsParamsEventTypeSIPTRANSFERREQUESTED ListSipCallEventsParamsEventType = "SIP_TRANSFER_REQUESTED" -) - -// Valid indicates whether the value is a known member of the ListSipCallEventsParamsEventType enum. -func (e ListSipCallEventsParamsEventType) Valid() bool { - switch e { - case ListSipCallEventsParamsEventTypeSIPCALLENDED: - return true - case ListSipCallEventsParamsEventTypeSIPCALLINCOMING: - return true - case ListSipCallEventsParamsEventTypeSIPCALLSTARTED: - return true - case ListSipCallEventsParamsEventTypeSIPPARTICIPANTCREATED: - return true - case ListSipCallEventsParamsEventTypeSIPTRANSFERCOMPLETE: - return true - case ListSipCallEventsParamsEventTypeSIPTRANSFERREQUESTED: - return true - default: - return false - } -} - -// Defines values for QueryProjectTimeseriesParamsMetric. -const ( - ActiveParticipants QueryProjectTimeseriesParamsMetric = "activeParticipants" - BandwidthIn QueryProjectTimeseriesParamsMetric = "bandwidthIn" - BandwidthOut QueryProjectTimeseriesParamsMetric = "bandwidthOut" - ConnectionQuality QueryProjectTimeseriesParamsMetric = "connectionQuality" - ConnectionSuccessRate QueryProjectTimeseriesParamsMetric = "connectionSuccessRate" - ParticipantMinutes QueryProjectTimeseriesParamsMetric = "participantMinutes" - PublishBitrate QueryProjectTimeseriesParamsMetric = "publishBitrate" - PublishFramerate QueryProjectTimeseriesParamsMetric = "publishFramerate" - SubscribeBitrate QueryProjectTimeseriesParamsMetric = "subscribeBitrate" - SubscribeFramerate QueryProjectTimeseriesParamsMetric = "subscribeFramerate" -) - -// Valid indicates whether the value is a known member of the QueryProjectTimeseriesParamsMetric enum. -func (e QueryProjectTimeseriesParamsMetric) Valid() bool { - switch e { - case ActiveParticipants: - return true - case BandwidthIn: - return true - case BandwidthOut: - return true - case ConnectionQuality: - return true - case ConnectionSuccessRate: - return true - case ParticipantMinutes: - return true - case PublishBitrate: - return true - case PublishFramerate: - return true - case SubscribeBitrate: - return true - case SubscribeFramerate: - return true - default: - return false - } -} - -// Defines values for QueryProjectTimeseriesParamsInterval. -const ( - Day QueryProjectTimeseriesParamsInterval = "day" - Hour QueryProjectTimeseriesParamsInterval = "hour" - Minute QueryProjectTimeseriesParamsInterval = "minute" -) - -// Valid indicates whether the value is a known member of the QueryProjectTimeseriesParamsInterval enum. -func (e QueryProjectTimeseriesParamsInterval) Valid() bool { - switch e { - case Day: - return true - case Hour: - return true - case Minute: - return true - default: - return false - } -} - -// Defines values for QueryProjectTimeseriesParamsGroupBy. -const ( - RoomName QueryProjectTimeseriesParamsGroupBy = "roomName" - SessionId QueryProjectTimeseriesParamsGroupBy = "sessionId" -) - -// Valid indicates whether the value is a known member of the QueryProjectTimeseriesParamsGroupBy enum. -func (e QueryProjectTimeseriesParamsGroupBy) Valid() bool { - switch e { - case RoomName: - return true - case SessionId: - return true - default: - return false - } -} - -// ConnectionCounts Per-session connection counters. -type ConnectionCounts struct { - Attempts *int64 `json:"attempts,omitempty"` - Success *int64 `json:"success,omitempty"` -} - -// DailyUsage defines model for DailyUsage. -type DailyUsage struct { - ConnectionSeconds *string `json:"connectionSeconds,omitempty"` - Date *openapi_types.Date `json:"date,omitempty"` - DownstreamBytes *string `json:"downstreamBytes,omitempty"` - EgressAudioSeconds *string `json:"egressAudioSeconds,omitempty"` - EgressVideoSeconds *string `json:"egressVideoSeconds,omitempty"` - IngressAudioSeconds *string `json:"ingressAudioSeconds,omitempty"` - IngressVideoSeconds *string `json:"ingressVideoSeconds,omitempty"` - SipSeconds *string `json:"sipSeconds,omitempty"` -} - -// Egress defines model for Egress. -type Egress struct { - // Duration Duration in seconds. - Duration *string `json:"duration,omitempty"` - EgressId *string `json:"egressId,omitempty"` - EndedAt *time.Time `json:"endedAt,omitempty"` - StartedAt *time.Time `json:"startedAt,omitempty"` - - // Status Egress lifecycle status (mirrors `livekit.EgressStatus`). - Status *EgressStatus `json:"status,omitempty"` - Tags *[]string `json:"tags,omitempty"` - - // Type Request type (`web`, `track`, `track_composite`, `room_composite`, `participant`). - Type *string `json:"type,omitempty"` -} - -// EgressDetail Exactly one of `web`, `track`, `trackComposite`, `roomComposite`, or `participant` is set, matching the egress request type. The nested request bodies are passed through verbatim from the original request. -type EgressDetail struct { - Duration *string `json:"duration,omitempty"` - EgressId *string `json:"egressId,omitempty"` - EndedAt *time.Time `json:"endedAt,omitempty"` - Error *string `json:"error,omitempty"` - FileResults *[]map[string]interface{} `json:"fileResults,omitempty"` - ImageResults *[]map[string]interface{} `json:"imageResults,omitempty"` - Participant *map[string]interface{} `json:"participant,omitempty"` - RoomComposite *map[string]interface{} `json:"roomComposite,omitempty"` - RoomId *string `json:"roomId,omitempty"` - SegmentResults *[]EgressSegmentResult `json:"segmentResults,omitempty"` - StartedAt *time.Time `json:"startedAt,omitempty"` - - // Status Egress lifecycle status (mirrors `livekit.EgressStatus`). - Status *EgressStatus `json:"status,omitempty"` - StreamResults *[]map[string]interface{} `json:"streamResults,omitempty"` - Track *map[string]interface{} `json:"track,omitempty"` - TrackComposite *map[string]interface{} `json:"trackComposite,omitempty"` - Type *string `json:"type,omitempty"` - Web *map[string]interface{} `json:"web,omitempty"` -} - -// EgressList defines model for EgressList. -type EgressList struct { - Items []Egress `json:"items"` - - // PageInfo Cursor pagination metadata. - PageInfo PageInfo `json:"pageInfo"` -} - -// EgressSegmentResult defines model for EgressSegmentResult. -type EgressSegmentResult struct { - Duration *string `json:"duration,omitempty"` - EndedAt *string `json:"endedAt,omitempty"` - LivePlaylistLocation *string `json:"livePlaylistLocation,omitempty"` - LivePlaylistName *string `json:"livePlaylistName,omitempty"` - PlaylistLocation *string `json:"playlistLocation,omitempty"` - PlaylistName *string `json:"playlistName,omitempty"` - SegmentCount *string `json:"segmentCount,omitempty"` - Size *string `json:"size,omitempty"` - StartedAt *string `json:"startedAt,omitempty"` -} - -// EgressState defines model for EgressState. -type EgressState string - -// EgressStatus Egress lifecycle status (mirrors `livekit.EgressStatus`). -type EgressStatus string - -// Error defines model for Error. -type Error struct { - Error struct { - Code string `json:"code"` - Message string `json:"message"` - } `json:"error"` -} - -// Export defines model for Export. -type Export struct { - CompletedAt *time.Time `json:"completedAt,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Datasets []ExportDataset `json:"datasets"` - - // DownloadUrl Signed URL to download the artifact. Present when `status` is `completed`. - DownloadUrl *string `json:"downloadUrl,omitempty"` - EndTime *time.Time `json:"endTime,omitempty"` - - // Error Failure detail. Present when `status` is `failed`. - Error *string `json:"error,omitempty"` - - // ExpiresAt When the artifact and its `downloadUrl` expire. - ExpiresAt *time.Time `json:"expiresAt,omitempty"` - FileSizeBytes *string `json:"fileSizeBytes,omitempty"` - Format *ExportFormat `json:"format,omitempty"` - Id string `json:"id"` - ProjectId *string `json:"projectId,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - RowCount *string `json:"rowCount,omitempty"` - StartTime *time.Time `json:"startTime,omitempty"` - Status ExportStatus `json:"status"` -} - -// ExportCreateRequest Describes an export. The project scope is taken from the request path. Optionally narrow to a single record with `resourceId` (with a single dataset). -type ExportCreateRequest struct { - // Datasets Datasets to include. A single dataset yields one file in the chosen `format`; multiple datasets yield a zip archive with one file each. - Datasets []ExportDataset `json:"datasets"` - - // EndTime Exclusive upper bound, RFC3339. - EndTime time.Time `json:"endTime"` - Format *ExportFormat `json:"format,omitempty"` - - // ResourceId Optional. Restrict the export to a single record (e.g. one session or egress id). Requires exactly one dataset. - ResourceId *string `json:"resourceId,omitempty"` - - // StartTime Inclusive lower bound, RFC3339. - StartTime time.Time `json:"startTime"` -} - -// ExportDataset An exportable analytics dataset (values match the URL path segments). -type ExportDataset string - -// ExportFormat defines model for ExportFormat. -type ExportFormat string - -// ExportList defines model for ExportList. -type ExportList struct { - Items []Export `json:"items"` - - // PageInfo Cursor pagination metadata. - PageInfo PageInfo `json:"pageInfo"` -} - -// ExportStatus defines model for ExportStatus. -type ExportStatus string - -// Feature A capability exercised within a session. -type Feature string - -// Ingress defines model for Ingress. -type Ingress struct { - // Duration Duration in seconds. - Duration *string `json:"duration,omitempty"` - EndedAt *time.Time `json:"endedAt,omitempty"` - IngressId *string `json:"ingressId,omitempty"` - StartedAt *time.Time `json:"startedAt,omitempty"` - - // Status Ingress endpoint status (mirrors `livekit.IngressState.Status`). - Status *IngressStatus `json:"status,omitempty"` - Tags *[]string `json:"tags,omitempty"` -} - -// IngressDetail defines model for IngressDetail. -type IngressDetail struct { - IngressId *string `json:"ingressId,omitempty"` - Sessions *[]IngressSession `json:"sessions,omitempty"` -} - -// IngressList defines model for IngressList. -type IngressList struct { - Items []Ingress `json:"items"` - - // PageInfo Cursor pagination metadata. - PageInfo PageInfo `json:"pageInfo"` -} - -// IngressSession defines model for IngressSession. -type IngressSession struct { - // Duration Duration in seconds. - Duration *string `json:"duration,omitempty"` - EndedAt *time.Time `json:"endedAt,omitempty"` - Error *string `json:"error,omitempty"` - RoomId *string `json:"roomId,omitempty"` - RoomName *string `json:"roomName,omitempty"` - StartedAt *time.Time `json:"startedAt,omitempty"` - Type *string `json:"type,omitempty"` -} - -// IngressStatus Ingress endpoint status (mirrors `livekit.IngressState.Status`). -type IngressStatus string - -// PageInfo Cursor pagination metadata. -type PageInfo struct { - HasMore bool `json:"hasMore"` - - // NextCursor Pass as `cursor` to fetch the next page. Absent on the last page. - NextCursor *string `json:"nextCursor,omitempty"` -} - -// ParticipantInfo defines model for ParticipantInfo. -type ParticipantInfo struct { - Browser *string `json:"browser,omitempty"` - - // ConnectionTimeMs Client connect time in milliseconds. - ConnectionTimeMs *int `json:"connectionTimeMs,omitempty"` - - // ConnectionType Network connection type (e.g. `WIFI`). - ConnectionType *string `json:"connectionType,omitempty"` - DeviceModel *string `json:"deviceModel,omitempty"` - IsActive *bool `json:"isActive,omitempty"` - JoinedAt *time.Time `json:"joinedAt,omitempty"` - LeftAt *time.Time `json:"leftAt,omitempty"` - - // Location Country name. - Location *string `json:"location,omitempty"` - Os *string `json:"os,omitempty"` - ParticipantIdentity *string `json:"participantIdentity,omitempty"` - ParticipantName *string `json:"participantName,omitempty"` - PublishedSources *PublishedSources `json:"publishedSources,omitempty"` - Region *string `json:"region,omitempty"` - RoomId *string `json:"roomId,omitempty"` - SdkVersion *string `json:"sdkVersion,omitempty"` - Sessions *[]ParticipantSession `json:"sessions,omitempty"` -} - -// ParticipantSession defines model for ParticipantSession. -type ParticipantSession struct { - JoinedAt *time.Time `json:"joinedAt,omitempty"` - LeftAt *time.Time `json:"leftAt,omitempty"` - ParticipantId *string `json:"participantId,omitempty"` -} - -// PublishedSources defines model for PublishedSources. -type PublishedSources struct { - CameraTrack *bool `json:"cameraTrack,omitempty"` - MicrophoneTrack *bool `json:"microphoneTrack,omitempty"` - ScreenShareAudio *bool `json:"screenShareAudio,omitempty"` - ScreenShareTrack *bool `json:"screenShareTrack,omitempty"` -} - -// Session defines model for Session. -type Session struct { - // BandwidthIn Bytes received (downstream) over the session. - BandwidthIn *string `json:"bandwidthIn,omitempty"` - - // BandwidthOut Bytes sent (upstream) over the session. - BandwidthOut *string `json:"bandwidthOut,omitempty"` - - // ConnectionCounts Per-session connection counters. - ConnectionCounts *ConnectionCounts `json:"connectionCounts,omitempty"` - - // ConnectionMinutes Total participant connection minutes. - ConnectionMinutes *string `json:"connectionMinutes,omitempty"` - Egress *EgressState `json:"egress,omitempty"` - EndedAt *time.Time `json:"endedAt,omitempty"` - - // Features Capabilities exercised during the session (used by the `feature`/`excludeFeature` filters). - Features *[]Feature `json:"features,omitempty"` - LastActive *time.Time `json:"lastActive,omitempty"` - - // NumActiveParticipants Participants currently connected (0 once the session is closed). - NumActiveParticipants *int `json:"numActiveParticipants,omitempty"` - - // NumParticipants Total participants that joined the session. - NumParticipants *int `json:"numParticipants,omitempty"` - RoomName *string `json:"roomName,omitempty"` - SessionId *string `json:"sessionId,omitempty"` - StartedAt *time.Time `json:"startedAt,omitempty"` - Status *SessionStatus `json:"status,omitempty"` - - // Tags User-defined tags on the session (used by the `tag`/`excludeTag` filters). - Tags *[]string `json:"tags,omitempty"` -} - -// SessionDetail Detail for a single session. A superset of `Session`: same field names, plus `roomId` and the per-participant breakdown. -type SessionDetail struct { - // BandwidthIn Bytes received (downstream) over the session. - BandwidthIn *string `json:"bandwidthIn,omitempty"` - - // BandwidthOut Bytes sent (upstream) over the session. - BandwidthOut *string `json:"bandwidthOut,omitempty"` - ConnectionMinutes *string `json:"connectionMinutes,omitempty"` - EndedAt *time.Time `json:"endedAt,omitempty"` - Features *[]Feature `json:"features,omitempty"` - - // NumParticipants Total participants that joined the session. - NumParticipants *int `json:"numParticipants,omitempty"` - Participants *[]ParticipantInfo `json:"participants,omitempty"` - RoomId *string `json:"roomId,omitempty"` - RoomName *string `json:"roomName,omitempty"` - SessionId *string `json:"sessionId,omitempty"` - StartedAt *time.Time `json:"startedAt,omitempty"` - Status *SessionStatus `json:"status,omitempty"` - Tags *[]string `json:"tags,omitempty"` -} - -// SessionList defines model for SessionList. -type SessionList struct { - Items []Session `json:"items"` - - // PageInfo Cursor pagination metadata. - PageInfo PageInfo `json:"pageInfo"` -} - -// SessionStatus defines model for SessionStatus. -type SessionStatus string - -// SipAttributes defines model for SipAttributes. -type SipAttributes struct { - CallIdFull *string `json:"callIdFull,omitempty"` - Codec *string `json:"codec,omitempty"` -} - -// SipCall defines model for SipCall. -type SipCall struct { - CallId *string `json:"callId,omitempty"` - Direction *SipDirection `json:"direction,omitempty"` - - // Duration Duration in seconds. - Duration *string `json:"duration,omitempty"` - EndedAt *time.Time `json:"endedAt,omitempty"` - Error *string `json:"error,omitempty"` - RoomId *string `json:"roomId,omitempty"` - RoomName *string `json:"roomName,omitempty"` - StartedAt *time.Time `json:"startedAt,omitempty"` - - // Status SIP call status (mirrors `livekit.SIPCallStatus`). - Status *SipCallStatus `json:"status,omitempty"` - Tags *[]string `json:"tags,omitempty"` - UpdatedAt *time.Time `json:"updatedAt,omitempty"` -} - -// SipCallDetail defines model for SipCallDetail. -type SipCallDetail struct { - Attributes *SipAttributes `json:"attributes,omitempty"` - CallId *string `json:"callId,omitempty"` - Callee *string `json:"callee,omitempty"` - CalleeHost *string `json:"calleeHost,omitempty"` - Caller *string `json:"caller,omitempty"` - CallerHost *string `json:"callerHost,omitempty"` - Direction *SipDirection `json:"direction,omitempty"` - DispatchId *string `json:"dispatchId,omitempty"` - - // Duration Duration in seconds. - Duration *string `json:"duration,omitempty"` - EndedAt *time.Time `json:"endedAt,omitempty"` - Error *string `json:"error,omitempty"` - Provider *string `json:"provider,omitempty"` - Region *string `json:"region,omitempty"` - - // Response SIP response code. - Response *int `json:"response,omitempty"` - RoomId *string `json:"roomId,omitempty"` - RoomName *string `json:"roomName,omitempty"` - StartedAt *time.Time `json:"startedAt,omitempty"` - - // Status SIP call status (mirrors `livekit.SIPCallStatus`). - Status *SipCallStatus `json:"status,omitempty"` - Transport *string `json:"transport,omitempty"` - TrunkId *string `json:"trunkId,omitempty"` - UpdatedAt *time.Time `json:"updatedAt,omitempty"` -} - -// SipCallList defines model for SipCallList. -type SipCallList struct { - Items []SipCall `json:"items"` - - // PageInfo Cursor pagination metadata. - PageInfo PageInfo `json:"pageInfo"` -} - -// SipCallStatus SIP call status (mirrors `livekit.SIPCallStatus`). -type SipCallStatus string - -// SipDirection defines model for SipDirection. -type SipDirection string - -// SipEvent defines model for SipEvent. -type SipEvent struct { - // CallInfo Shape is `livekit.SIPCallInfo`. - CallInfo *map[string]interface{} `json:"callInfo,omitempty"` - EventType *SipEventEventType `json:"eventType,omitempty"` - Timestamp *time.Time `json:"timestamp,omitempty"` -} - -// SipEventEventType defines model for SipEvent.EventType. -type SipEventEventType string - -// SipEventList defines model for SipEventList. -type SipEventList struct { - CallId string `json:"callId"` - Items []SipEvent `json:"items"` - - // PageInfo Cursor pagination metadata. - PageInfo PageInfo `json:"pageInfo"` -} - -// TimeseriesPoint defines model for TimeseriesPoint. -type TimeseriesPoint struct { - Timestamp time.Time `json:"timestamp"` - Value float64 `json:"value"` -} - -// TimeseriesResponse defines model for TimeseriesResponse. -type TimeseriesResponse struct { - Interval TimeseriesResponseInterval `json:"interval"` - Series []TimeseriesSeries `json:"series"` -} - -// TimeseriesResponseInterval defines model for TimeseriesResponse.Interval. -type TimeseriesResponseInterval string - -// TimeseriesSeries defines model for TimeseriesSeries. -type TimeseriesSeries struct { - // Group Dimension values for this series. Present only when `groupBy` is set. - Group *map[string]string `json:"group,omitempty"` - Metric string `json:"metric"` - Points []TimeseriesPoint `json:"points"` -} - -// UsageResponse defines model for UsageResponse. -type UsageResponse struct { - Items []DailyUsage `json:"items"` -} - -// Cursor defines model for Cursor. -type Cursor = string - -// EndTime defines model for EndTime. -type EndTime = time.Time - -// ExcludeFeatures defines model for ExcludeFeatures. -type ExcludeFeatures = []Feature - -// ExcludeTags defines model for ExcludeTags. -type ExcludeTags = []string - -// ExportStatusFilter defines model for ExportStatusFilter. -type ExportStatusFilter = []ExportStatus - -// IncludeFeatures defines model for IncludeFeatures. -type IncludeFeatures = []Feature - -// IncludeTags defines model for IncludeTags. -type IncludeTags = []string - -// Interval defines model for Interval. -type Interval string - -// Limit defines model for Limit. -type Limit = int - -// Metric defines model for Metric. -type Metric = []string - -// Order defines model for Order. -type Order string - -// ProjectId defines model for ProjectId. -type ProjectId = string - -// StartTime defines model for StartTime. -type StartTime = time.Time - -// BadRequest defines model for BadRequest. -type BadRequest = Error - -// Forbidden defines model for Forbidden. -type Forbidden = Error - -// NotFound defines model for NotFound. -type NotFound = Error - -// NotImplemented defines model for NotImplemented. -type NotImplemented = Error - -// TooManyRequests defines model for TooManyRequests. -type TooManyRequests = Error - -// Unauthorized defines model for Unauthorized. -type Unauthorized = Error - -// bearerAuthContextKey is the context key for bearerAuth security scheme -type bearerAuthContextKey string - -// ListProjectEgressesParams defines parameters for ListProjectEgresses. -type ListProjectEgressesParams struct { - // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. - StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` - - // EndTime Exclusive upper bound, RFC3339. Defaults to now. - EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` - - // Limit Maximum number of items to return. - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. - Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` - - // Order Sort order. - Order *ListProjectEgressesParamsOrder `form:"order,omitempty" json:"order,omitempty"` - - // Tag Include only records carrying at least one of these tags (OR semantics). Repeat the parameter to pass multiple. - Tag *IncludeTags `form:"tag,omitempty" json:"tag,omitempty"` - - // ExcludeTag Exclude records carrying any of these tags (OR semantics). Repeat the parameter to pass multiple. Combine with `tag` to require some tags while excluding others. - ExcludeTag *ExcludeTags `form:"excludeTag,omitempty" json:"excludeTag,omitempty"` -} - -// ListProjectEgressesParamsOrder defines parameters for ListProjectEgresses. -type ListProjectEgressesParamsOrder string - -// ListProjectExportsParams defines parameters for ListProjectExports. -type ListProjectExportsParams struct { - // Limit Maximum number of items to return. - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. - Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` - - // Status Filter export jobs by status. Repeat the parameter to match multiple. - Status *ExportStatusFilter `form:"status,omitempty" json:"status,omitempty"` -} - -// ListProjectIngressesParams defines parameters for ListProjectIngresses. -type ListProjectIngressesParams struct { - // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. - StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` - - // EndTime Exclusive upper bound, RFC3339. Defaults to now. - EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` - - // Limit Maximum number of items to return. - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. - Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` - - // Order Sort order. - Order *ListProjectIngressesParamsOrder `form:"order,omitempty" json:"order,omitempty"` - - // Tag Include only records carrying at least one of these tags (OR semantics). Repeat the parameter to pass multiple. - Tag *IncludeTags `form:"tag,omitempty" json:"tag,omitempty"` - - // ExcludeTag Exclude records carrying any of these tags (OR semantics). Repeat the parameter to pass multiple. Combine with `tag` to require some tags while excluding others. - ExcludeTag *ExcludeTags `form:"excludeTag,omitempty" json:"excludeTag,omitempty"` -} - -// ListProjectIngressesParamsOrder defines parameters for ListProjectIngresses. -type ListProjectIngressesParamsOrder string - -// ListProjectSessionsParams defines parameters for ListProjectSessions. -type ListProjectSessionsParams struct { - // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. - StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` - - // EndTime Exclusive upper bound, RFC3339. Defaults to now. - EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` - - // Limit Maximum number of items to return. - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. - Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` - - // Order Sort order. - Order *ListProjectSessionsParamsOrder `form:"order,omitempty" json:"order,omitempty"` - - // Sort Field to sort by. - Sort *ListProjectSessionsParamsSort `form:"sort,omitempty" json:"sort,omitempty"` - - // Status Filter by session status. Repeat the parameter to match multiple. - Status *[]ListProjectSessionsParamsStatus `form:"status,omitempty" json:"status,omitempty"` - - // RoomName Exact room name match. - RoomName *string `form:"roomName,omitempty" json:"roomName,omitempty"` - - // RoomId Exact room (session) id match. - RoomId *string `form:"roomId,omitempty" json:"roomId,omitempty"` - - // Feature Include only records that exercised at least one of these features (OR semantics). Repeat the parameter to pass multiple. - Feature *IncludeFeatures `form:"feature,omitempty" json:"feature,omitempty"` - - // ExcludeFeature Exclude records that exercised any of these features (OR semantics). Repeat the parameter to pass multiple. Example: `excludeFeature=egress&excludeFeature=sip` lists every session that did not use egress or SIP. - ExcludeFeature *ExcludeFeatures `form:"excludeFeature,omitempty" json:"excludeFeature,omitempty"` - - // Tag Include only records carrying at least one of these tags (OR semantics). Repeat the parameter to pass multiple. - Tag *IncludeTags `form:"tag,omitempty" json:"tag,omitempty"` - - // ExcludeTag Exclude records carrying any of these tags (OR semantics). Repeat the parameter to pass multiple. Combine with `tag` to require some tags while excluding others. - ExcludeTag *ExcludeTags `form:"excludeTag,omitempty" json:"excludeTag,omitempty"` -} - -// ListProjectSessionsParamsOrder defines parameters for ListProjectSessions. -type ListProjectSessionsParamsOrder string - -// ListProjectSessionsParamsSort defines parameters for ListProjectSessions. -type ListProjectSessionsParamsSort string - -// ListProjectSessionsParamsStatus defines parameters for ListProjectSessions. -type ListProjectSessionsParamsStatus string - -// ListProjectSipCallsParams defines parameters for ListProjectSipCalls. -type ListProjectSipCallsParams struct { - // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. - StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` - - // EndTime Exclusive upper bound, RFC3339. Defaults to now. - EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` - - // Limit Maximum number of items to return. - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. - Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` - - // Order Sort order. - Order *ListProjectSipCallsParamsOrder `form:"order,omitempty" json:"order,omitempty"` - - // Direction Filter by call direction. Repeatable. - Direction *[]ListProjectSipCallsParamsDirection `form:"direction,omitempty" json:"direction,omitempty"` - RoomName *string `form:"roomName,omitempty" json:"roomName,omitempty"` - - // Tag Include only records carrying at least one of these tags (OR semantics). Repeat the parameter to pass multiple. - Tag *IncludeTags `form:"tag,omitempty" json:"tag,omitempty"` - - // ExcludeTag Exclude records carrying any of these tags (OR semantics). Repeat the parameter to pass multiple. Combine with `tag` to require some tags while excluding others. - ExcludeTag *ExcludeTags `form:"excludeTag,omitempty" json:"excludeTag,omitempty"` -} - -// ListProjectSipCallsParamsOrder defines parameters for ListProjectSipCalls. -type ListProjectSipCallsParamsOrder string - -// ListProjectSipCallsParamsDirection defines parameters for ListProjectSipCalls. -type ListProjectSipCallsParamsDirection string - -// ListSipCallEventsParams defines parameters for ListSipCallEvents. -type ListSipCallEventsParams struct { - // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. - StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` - - // EndTime Exclusive upper bound, RFC3339. Defaults to now. - EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` - - // Limit Maximum number of items to return. - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Cursor Opaque pagination token from a previous response's `pageInfo.nextCursor`. Omit to fetch the first page. - Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` - - // Order Sort order. - Order *ListSipCallEventsParamsOrder `form:"order,omitempty" json:"order,omitempty"` - - // EventType Filter by event type. Repeat the parameter to match multiple. - EventType *[]ListSipCallEventsParamsEventType `form:"eventType,omitempty" json:"eventType,omitempty"` -} - -// ListSipCallEventsParamsOrder defines parameters for ListSipCallEvents. -type ListSipCallEventsParamsOrder string - -// ListSipCallEventsParamsEventType defines parameters for ListSipCallEvents. -type ListSipCallEventsParamsEventType string - -// QueryProjectTimeseriesParams defines parameters for QueryProjectTimeseries. -type QueryProjectTimeseriesParams struct { - // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. - StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` - - // EndTime Exclusive upper bound, RFC3339. Defaults to now. - EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` - - // Metric One or more metrics to return. Repeat the parameter for multiple. - Metric Metric `form:"metric" json:"metric"` - - // Interval Bucket granularity. - Interval *QueryProjectTimeseriesParamsInterval `form:"interval,omitempty" json:"interval,omitempty"` - - // GroupBy Optional dimension to split each metric by. - GroupBy *QueryProjectTimeseriesParamsGroupBy `form:"groupBy,omitempty" json:"groupBy,omitempty"` - - // SessionId Restrict the series to a single room session. - SessionId *string `form:"sessionId,omitempty" json:"sessionId,omitempty"` -} - -// QueryProjectTimeseriesParamsMetric defines parameters for QueryProjectTimeseries. -type QueryProjectTimeseriesParamsMetric string - -// QueryProjectTimeseriesParamsInterval defines parameters for QueryProjectTimeseries. -type QueryProjectTimeseriesParamsInterval string - -// QueryProjectTimeseriesParamsGroupBy defines parameters for QueryProjectTimeseries. -type QueryProjectTimeseriesParamsGroupBy string - -// GetProjectUsageParams defines parameters for GetProjectUsage. -type GetProjectUsageParams struct { - // StartTime Inclusive lower bound, RFC3339 (e.g. `2026-07-01T00:00:00Z`). Defaults to 24h before `endTime`. - StartTime *StartTime `form:"startTime,omitempty" json:"startTime,omitempty"` - - // EndTime Exclusive upper bound, RFC3339. Defaults to now. - EndTime *EndTime `form:"endTime,omitempty" json:"endTime,omitempty"` -} - -// CreateProjectExportJSONRequestBody defines body for CreateProjectExport for application/json ContentType. -type CreateProjectExportJSONRequestBody = ExportCreateRequest - -// RequestEditorFn is the function signature for the RequestEditor callback function -type RequestEditorFn func(ctx context.Context, req *http.Request) error - -// Doer performs HTTP requests. -// -// The standard http.Client implements this interface. -type HttpRequestDoer interface { - Do(req *http.Request) (*http.Response, error) -} - -// Client which conforms to the OpenAPI3 specification for this service. -type Client struct { - // The endpoint of the server conforming to this interface, with scheme, - // https://api.deepmap.com for example. This can contain a path relative - // to the server, such as https://api.deepmap.com/dev-test, and all the - // paths in the swagger spec will be appended to the server. - Server string - - // Doer for performing requests, typically a *http.Client with any - // customized settings, such as certificate chains. - Client HttpRequestDoer - - // A list of callbacks for modifying requests which are generated before sending over - // the network. - RequestEditors []RequestEditorFn -} - -// ClientOption allows setting custom parameters during construction -type ClientOption func(*Client) error - -// Creates a new Client, with reasonable defaults -func NewClient(server string, opts ...ClientOption) (*Client, error) { - // create a client with sane default values - client := Client{ - Server: server, - } - // mutate client and add all optional params - for _, o := range opts { - if err := o(&client); err != nil { - return nil, err - } - } - // ensure the server URL always has a trailing slash - if !strings.HasSuffix(client.Server, "/") { - client.Server += "/" - } - // create httpClient, if not already present - if client.Client == nil { - client.Client = &http.Client{} - } - return &client, nil -} - -// WithHTTPClient allows overriding the default Doer, which is -// automatically created using http.Client. This is useful for tests. -func WithHTTPClient(doer HttpRequestDoer) ClientOption { - return func(c *Client) error { - c.Client = doer - return nil - } -} - -// WithRequestEditorFn allows setting up a callback function, which will be -// called right before sending the request. This can be used to mutate the request. -func WithRequestEditorFn(fn RequestEditorFn) ClientOption { - return func(c *Client) error { - c.RequestEditors = append(c.RequestEditors, fn) - return nil - } -} - -// The interface specification for the client above. -type ClientInterface interface { - // DeleteExport request - DeleteExport(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetExport request - GetExport(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListProjectEgresses request - ListProjectEgresses(ctx context.Context, projectId ProjectId, params *ListProjectEgressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetEgress request - GetEgress(ctx context.Context, projectId ProjectId, egressId string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListProjectExports request - ListProjectExports(ctx context.Context, projectId ProjectId, params *ListProjectExportsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateProjectExportWithBody request with any body - CreateProjectExportWithBody(ctx context.Context, projectId ProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateProjectExport(ctx context.Context, projectId ProjectId, body CreateProjectExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListProjectIngresses request - ListProjectIngresses(ctx context.Context, projectId ProjectId, params *ListProjectIngressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetIngress request - GetIngress(ctx context.Context, projectId ProjectId, ingressId string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListProjectSessions request - ListProjectSessions(ctx context.Context, projectId ProjectId, params *ListProjectSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSession request - GetSession(ctx context.Context, projectId ProjectId, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListProjectSipCalls request - ListProjectSipCalls(ctx context.Context, projectId ProjectId, params *ListProjectSipCallsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSipCall request - GetSipCall(ctx context.Context, projectId ProjectId, callId string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListSipCallEvents request - ListSipCallEvents(ctx context.Context, projectId ProjectId, callId string, params *ListSipCallEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // QueryProjectTimeseries request - QueryProjectTimeseries(ctx context.Context, projectId ProjectId, params *QueryProjectTimeseriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetProjectUsage request - GetProjectUsage(ctx context.Context, projectId ProjectId, params *GetProjectUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListProjects request - ListProjects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateProject request - CreateProject(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteProject request - DeleteProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetProject request - GetProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateProject request - UpdateProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListUsers request - ListUsers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetCurrentUser request - GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetUser request - GetUser(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListWorkspaces request - ListWorkspaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetWorkspace request - GetWorkspace(ctx context.Context, workspaceId string, reqEditors ...RequestEditorFn) (*http.Response, error) -} - -func (c *Client) DeleteExport(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteExportRequest(c.Server, exportId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetExport(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetExportRequest(c.Server, exportId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListProjectEgresses(ctx context.Context, projectId ProjectId, params *ListProjectEgressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListProjectEgressesRequest(c.Server, projectId, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetEgress(ctx context.Context, projectId ProjectId, egressId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetEgressRequest(c.Server, projectId, egressId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListProjectExports(ctx context.Context, projectId ProjectId, params *ListProjectExportsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListProjectExportsRequest(c.Server, projectId, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateProjectExportWithBody(ctx context.Context, projectId ProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateProjectExportRequestWithBody(c.Server, projectId, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateProjectExport(ctx context.Context, projectId ProjectId, body CreateProjectExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateProjectExportRequest(c.Server, projectId, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListProjectIngresses(ctx context.Context, projectId ProjectId, params *ListProjectIngressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListProjectIngressesRequest(c.Server, projectId, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetIngress(ctx context.Context, projectId ProjectId, ingressId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetIngressRequest(c.Server, projectId, ingressId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListProjectSessions(ctx context.Context, projectId ProjectId, params *ListProjectSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListProjectSessionsRequest(c.Server, projectId, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetSession(ctx context.Context, projectId ProjectId, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSessionRequest(c.Server, projectId, sessionId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListProjectSipCalls(ctx context.Context, projectId ProjectId, params *ListProjectSipCallsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListProjectSipCallsRequest(c.Server, projectId, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetSipCall(ctx context.Context, projectId ProjectId, callId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSipCallRequest(c.Server, projectId, callId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListSipCallEvents(ctx context.Context, projectId ProjectId, callId string, params *ListSipCallEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSipCallEventsRequest(c.Server, projectId, callId, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) QueryProjectTimeseries(ctx context.Context, projectId ProjectId, params *QueryProjectTimeseriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewQueryProjectTimeseriesRequest(c.Server, projectId, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetProjectUsage(ctx context.Context, projectId ProjectId, params *GetProjectUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetProjectUsageRequest(c.Server, projectId, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListProjects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListProjectsRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateProject(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateProjectRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteProjectRequest(c.Server, projectId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetProjectRequest(c.Server, projectId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) UpdateProject(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateProjectRequest(c.Server, projectId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListUsers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListUsersRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrentUserRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetUser(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetUserRequest(c.Server, userId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListWorkspaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListWorkspacesRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetWorkspace(ctx context.Context, workspaceId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetWorkspaceRequest(c.Server, workspaceId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -// NewDeleteExportRequest generates requests for DeleteExport -func NewDeleteExportRequest(server string, exportId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "exportId", exportId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/exports/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetExportRequest generates requests for GetExport -func NewGetExportRequest(server string, exportId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "exportId", exportId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/exports/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListProjectEgressesRequest generates requests for ListProjectEgresses -func NewListProjectEgressesRequest(server string, projectId ProjectId, params *ListProjectEgressesParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/egresses", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.StartTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.EndTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Cursor != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Tag != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tag", *params.Tag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.ExcludeTag != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeTag", *params.ExcludeTag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetEgressRequest generates requests for GetEgress -func NewGetEgressRequest(server string, projectId ProjectId, egressId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithOptions("simple", false, "egressId", egressId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/egresses/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListProjectExportsRequest generates requests for ListProjectExports -func NewListProjectExportsRequest(server string, projectId ProjectId, params *ListProjectExportsParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/exports", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Cursor != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Status != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateProjectExportRequest calls the generic CreateProjectExport builder with application/json body -func NewCreateProjectExportRequest(server string, projectId ProjectId, body CreateProjectExportJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateProjectExportRequestWithBody(server, projectId, "application/json", bodyReader) -} - -// NewCreateProjectExportRequestWithBody generates requests for CreateProjectExport with any type of body -func NewCreateProjectExportRequestWithBody(server string, projectId ProjectId, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/exports", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListProjectIngressesRequest generates requests for ListProjectIngresses -func NewListProjectIngressesRequest(server string, projectId ProjectId, params *ListProjectIngressesParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/ingresses", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.StartTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.EndTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Cursor != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Tag != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tag", *params.Tag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.ExcludeTag != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeTag", *params.ExcludeTag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetIngressRequest generates requests for GetIngress -func NewGetIngressRequest(server string, projectId ProjectId, ingressId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithOptions("simple", false, "ingressId", ingressId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/ingresses/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListProjectSessionsRequest generates requests for ListProjectSessions -func NewListProjectSessionsRequest(server string, projectId ProjectId, params *ListProjectSessionsParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/sessions", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.StartTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.EndTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Cursor != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Sort != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sort", *params.Sort, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Status != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.RoomName != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "roomName", *params.RoomName, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.RoomId != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "roomId", *params.RoomId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Feature != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "feature", *params.Feature, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.ExcludeFeature != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeFeature", *params.ExcludeFeature, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Tag != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tag", *params.Tag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.ExcludeTag != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeTag", *params.ExcludeTag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetSessionRequest generates requests for GetSession -func NewGetSessionRequest(server string, projectId ProjectId, sessionId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithOptions("simple", false, "sessionId", sessionId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/sessions/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListProjectSipCallsRequest generates requests for ListProjectSipCalls -func NewListProjectSipCallsRequest(server string, projectId ProjectId, params *ListProjectSipCallsParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/sip-calls", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.StartTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.EndTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Cursor != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Direction != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "direction", *params.Direction, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.RoomName != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "roomName", *params.RoomName, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Tag != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tag", *params.Tag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.ExcludeTag != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "excludeTag", *params.ExcludeTag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetSipCallRequest generates requests for GetSipCall -func NewGetSipCallRequest(server string, projectId ProjectId, callId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithOptions("simple", false, "callId", callId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/sip-calls/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListSipCallEventsRequest generates requests for ListSipCallEvents -func NewListSipCallEventsRequest(server string, projectId ProjectId, callId string, params *ListSipCallEventsParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithOptions("simple", false, "callId", callId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/sip-calls/%s/events", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.StartTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.EndTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Cursor != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "order", *params.Order, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.EventType != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "eventType", *params.EventType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewQueryProjectTimeseriesRequest generates requests for QueryProjectTimeseries -func NewQueryProjectTimeseriesRequest(server string, projectId ProjectId, params *QueryProjectTimeseriesParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/timeseries", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.StartTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.EndTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Metric != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "metric", params.Metric, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Interval != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "interval", *params.Interval, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.GroupBy != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "groupBy", *params.GroupBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.SessionId != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sessionId", *params.SessionId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetProjectUsageRequest generates requests for GetProjectUsage -func NewGetProjectUsageRequest(server string, projectId ProjectId, params *GetProjectUsageParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/analytics/projects/%s/usage", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.StartTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "startTime", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.EndTime != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endTime", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListProjectsRequest generates requests for ListProjects -func NewListProjectsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/projects") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateProjectRequest generates requests for CreateProject -func NewCreateProjectRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/projects") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteProjectRequest generates requests for DeleteProject -func NewDeleteProjectRequest(server string, projectId ProjectId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/projects/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetProjectRequest generates requests for GetProject -func NewGetProjectRequest(server string, projectId ProjectId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/projects/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewUpdateProjectRequest generates requests for UpdateProject -func NewUpdateProjectRequest(server string, projectId ProjectId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectId", projectId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/projects/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPatch, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListUsersRequest generates requests for ListUsers -func NewListUsersRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/users") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetCurrentUserRequest generates requests for GetCurrentUser -func NewGetCurrentUserRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/users/me") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetUserRequest generates requests for GetUser -func NewGetUserRequest(server string, userId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/users/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListWorkspacesRequest generates requests for ListWorkspaces -func NewListWorkspacesRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/workspaces") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetWorkspaceRequest generates requests for GetWorkspace -func NewGetWorkspaceRequest(server string, workspaceId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "workspaceId", workspaceId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/workspaces/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} - -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} - -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) - if err != nil { - return nil, err - } - return &ClientWithResponses{client}, nil -} - -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil - } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // DeleteExportWithResponse request - DeleteExportWithResponse(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*DeleteExportResponse, error) - - // GetExportWithResponse request - GetExportWithResponse(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*GetExportResponse, error) - - // ListProjectEgressesWithResponse request - ListProjectEgressesWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectEgressesParams, reqEditors ...RequestEditorFn) (*ListProjectEgressesResponse, error) - - // GetEgressWithResponse request - GetEgressWithResponse(ctx context.Context, projectId ProjectId, egressId string, reqEditors ...RequestEditorFn) (*GetEgressResponse, error) - - // ListProjectExportsWithResponse request - ListProjectExportsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectExportsParams, reqEditors ...RequestEditorFn) (*ListProjectExportsResponse, error) - - // CreateProjectExportWithBodyWithResponse request with any body - CreateProjectExportWithBodyWithResponse(ctx context.Context, projectId ProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectExportResponse, error) - - CreateProjectExportWithResponse(ctx context.Context, projectId ProjectId, body CreateProjectExportJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectExportResponse, error) - - // ListProjectIngressesWithResponse request - ListProjectIngressesWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectIngressesParams, reqEditors ...RequestEditorFn) (*ListProjectIngressesResponse, error) - - // GetIngressWithResponse request - GetIngressWithResponse(ctx context.Context, projectId ProjectId, ingressId string, reqEditors ...RequestEditorFn) (*GetIngressResponse, error) - - // ListProjectSessionsWithResponse request - ListProjectSessionsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectSessionsParams, reqEditors ...RequestEditorFn) (*ListProjectSessionsResponse, error) - - // GetSessionWithResponse request - GetSessionWithResponse(ctx context.Context, projectId ProjectId, sessionId string, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) - - // ListProjectSipCallsWithResponse request - ListProjectSipCallsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectSipCallsParams, reqEditors ...RequestEditorFn) (*ListProjectSipCallsResponse, error) - - // GetSipCallWithResponse request - GetSipCallWithResponse(ctx context.Context, projectId ProjectId, callId string, reqEditors ...RequestEditorFn) (*GetSipCallResponse, error) - - // ListSipCallEventsWithResponse request - ListSipCallEventsWithResponse(ctx context.Context, projectId ProjectId, callId string, params *ListSipCallEventsParams, reqEditors ...RequestEditorFn) (*ListSipCallEventsResponse, error) - - // QueryProjectTimeseriesWithResponse request - QueryProjectTimeseriesWithResponse(ctx context.Context, projectId ProjectId, params *QueryProjectTimeseriesParams, reqEditors ...RequestEditorFn) (*QueryProjectTimeseriesResponse, error) - - // GetProjectUsageWithResponse request - GetProjectUsageWithResponse(ctx context.Context, projectId ProjectId, params *GetProjectUsageParams, reqEditors ...RequestEditorFn) (*GetProjectUsageResponse, error) - - // ListProjectsWithResponse request - ListProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListProjectsResponse, error) - - // CreateProjectWithResponse request - CreateProjectWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) - - // DeleteProjectWithResponse request - DeleteProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*DeleteProjectResponse, error) - - // GetProjectWithResponse request - GetProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*GetProjectResponse, error) - - // UpdateProjectWithResponse request - UpdateProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*UpdateProjectResponse, error) - - // ListUsersWithResponse request - ListUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) - - // GetCurrentUserWithResponse request - GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) - - // GetUserWithResponse request - GetUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserResponse, error) - - // ListWorkspacesWithResponse request - ListWorkspacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListWorkspacesResponse, error) - - // GetWorkspaceWithResponse request - GetWorkspaceWithResponse(ctx context.Context, workspaceId string, reqEditors ...RequestEditorFn) (*GetWorkspaceResponse, error) -} - -type DeleteExportResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *Unauthorized - JSON403 *Forbidden - JSON404 *NotFound - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r DeleteExportResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteExportResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteExportResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetExportResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Export - JSON401 *Unauthorized - JSON403 *Forbidden - JSON404 *NotFound - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r GetExportResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetExportResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetExportResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListProjectEgressesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *EgressList - JSON400 *BadRequest - JSON401 *Unauthorized - JSON403 *Forbidden - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r ListProjectEgressesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListProjectEgressesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListProjectEgressesResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetEgressResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *EgressDetail - JSON401 *Unauthorized - JSON403 *Forbidden - JSON404 *NotFound - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r GetEgressResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetEgressResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetEgressResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListProjectExportsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ExportList - JSON400 *BadRequest - JSON401 *Unauthorized - JSON403 *Forbidden - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r ListProjectExportsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListProjectExportsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListProjectExportsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type CreateProjectExportResponse struct { - Body []byte - HTTPResponse *http.Response - JSON202 *Export - JSON400 *BadRequest - JSON401 *Unauthorized - JSON403 *Forbidden - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r CreateProjectExportResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateProjectExportResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CreateProjectExportResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListProjectIngressesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *IngressList - JSON400 *BadRequest - JSON401 *Unauthorized - JSON403 *Forbidden - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r ListProjectIngressesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListProjectIngressesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListProjectIngressesResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetIngressResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *IngressDetail - JSON401 *Unauthorized - JSON403 *Forbidden - JSON404 *NotFound - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r GetIngressResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetIngressResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetIngressResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListProjectSessionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SessionList - JSON400 *BadRequest - JSON401 *Unauthorized - JSON403 *Forbidden - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r ListProjectSessionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListProjectSessionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListProjectSessionsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetSessionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SessionDetail - JSON401 *Unauthorized - JSON403 *Forbidden - JSON404 *NotFound - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r GetSessionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSessionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetSessionResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListProjectSipCallsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SipCallList - JSON400 *BadRequest - JSON401 *Unauthorized - JSON403 *Forbidden - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r ListProjectSipCallsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListProjectSipCallsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListProjectSipCallsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetSipCallResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SipCallDetail - JSON401 *Unauthorized - JSON403 *Forbidden - JSON404 *NotFound - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r GetSipCallResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSipCallResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetSipCallResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListSipCallEventsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SipEventList - JSON400 *BadRequest - JSON401 *Unauthorized - JSON403 *Forbidden - JSON404 *NotFound - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r ListSipCallEventsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListSipCallEventsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListSipCallEventsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type QueryProjectTimeseriesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *TimeseriesResponse - JSON400 *BadRequest - JSON401 *Unauthorized - JSON403 *Forbidden - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r QueryProjectTimeseriesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r QueryProjectTimeseriesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r QueryProjectTimeseriesResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetProjectUsageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UsageResponse - JSON400 *BadRequest - JSON401 *Unauthorized - JSON403 *Forbidden - JSON429 *TooManyRequests -} - -// Status returns HTTPResponse.Status -func (r GetProjectUsageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetProjectUsageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetProjectUsageResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListProjectsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r ListProjectsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListProjectsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListProjectsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type CreateProjectResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r CreateProjectResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateProjectResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CreateProjectResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type DeleteProjectResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r DeleteProjectResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteProjectResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteProjectResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetProjectResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r GetProjectResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetProjectResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetProjectResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type UpdateProjectResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r UpdateProjectResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateProjectResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpdateProjectResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListUsersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r ListUsersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListUsersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListUsersResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetCurrentUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r GetCurrentUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetCurrentUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r GetUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListWorkspacesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r ListWorkspacesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListWorkspacesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListWorkspacesResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetWorkspaceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON501 *NotImplemented -} - -// Status returns HTTPResponse.Status -func (r GetWorkspaceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetWorkspaceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetWorkspaceResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -// DeleteExportWithResponse request returning *DeleteExportResponse -func (c *ClientWithResponses) DeleteExportWithResponse(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*DeleteExportResponse, error) { - rsp, err := c.DeleteExport(ctx, exportId, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteExportResponse(rsp) -} - -// GetExportWithResponse request returning *GetExportResponse -func (c *ClientWithResponses) GetExportWithResponse(ctx context.Context, exportId string, reqEditors ...RequestEditorFn) (*GetExportResponse, error) { - rsp, err := c.GetExport(ctx, exportId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetExportResponse(rsp) -} - -// ListProjectEgressesWithResponse request returning *ListProjectEgressesResponse -func (c *ClientWithResponses) ListProjectEgressesWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectEgressesParams, reqEditors ...RequestEditorFn) (*ListProjectEgressesResponse, error) { - rsp, err := c.ListProjectEgresses(ctx, projectId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListProjectEgressesResponse(rsp) -} - -// GetEgressWithResponse request returning *GetEgressResponse -func (c *ClientWithResponses) GetEgressWithResponse(ctx context.Context, projectId ProjectId, egressId string, reqEditors ...RequestEditorFn) (*GetEgressResponse, error) { - rsp, err := c.GetEgress(ctx, projectId, egressId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetEgressResponse(rsp) -} - -// ListProjectExportsWithResponse request returning *ListProjectExportsResponse -func (c *ClientWithResponses) ListProjectExportsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectExportsParams, reqEditors ...RequestEditorFn) (*ListProjectExportsResponse, error) { - rsp, err := c.ListProjectExports(ctx, projectId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListProjectExportsResponse(rsp) -} - -// CreateProjectExportWithBodyWithResponse request with arbitrary body returning *CreateProjectExportResponse -func (c *ClientWithResponses) CreateProjectExportWithBodyWithResponse(ctx context.Context, projectId ProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectExportResponse, error) { - rsp, err := c.CreateProjectExportWithBody(ctx, projectId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateProjectExportResponse(rsp) -} - -func (c *ClientWithResponses) CreateProjectExportWithResponse(ctx context.Context, projectId ProjectId, body CreateProjectExportJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectExportResponse, error) { - rsp, err := c.CreateProjectExport(ctx, projectId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateProjectExportResponse(rsp) -} - -// ListProjectIngressesWithResponse request returning *ListProjectIngressesResponse -func (c *ClientWithResponses) ListProjectIngressesWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectIngressesParams, reqEditors ...RequestEditorFn) (*ListProjectIngressesResponse, error) { - rsp, err := c.ListProjectIngresses(ctx, projectId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListProjectIngressesResponse(rsp) -} - -// GetIngressWithResponse request returning *GetIngressResponse -func (c *ClientWithResponses) GetIngressWithResponse(ctx context.Context, projectId ProjectId, ingressId string, reqEditors ...RequestEditorFn) (*GetIngressResponse, error) { - rsp, err := c.GetIngress(ctx, projectId, ingressId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetIngressResponse(rsp) -} - -// ListProjectSessionsWithResponse request returning *ListProjectSessionsResponse -func (c *ClientWithResponses) ListProjectSessionsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectSessionsParams, reqEditors ...RequestEditorFn) (*ListProjectSessionsResponse, error) { - rsp, err := c.ListProjectSessions(ctx, projectId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListProjectSessionsResponse(rsp) -} - -// GetSessionWithResponse request returning *GetSessionResponse -func (c *ClientWithResponses) GetSessionWithResponse(ctx context.Context, projectId ProjectId, sessionId string, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) { - rsp, err := c.GetSession(ctx, projectId, sessionId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSessionResponse(rsp) -} - -// ListProjectSipCallsWithResponse request returning *ListProjectSipCallsResponse -func (c *ClientWithResponses) ListProjectSipCallsWithResponse(ctx context.Context, projectId ProjectId, params *ListProjectSipCallsParams, reqEditors ...RequestEditorFn) (*ListProjectSipCallsResponse, error) { - rsp, err := c.ListProjectSipCalls(ctx, projectId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListProjectSipCallsResponse(rsp) -} - -// GetSipCallWithResponse request returning *GetSipCallResponse -func (c *ClientWithResponses) GetSipCallWithResponse(ctx context.Context, projectId ProjectId, callId string, reqEditors ...RequestEditorFn) (*GetSipCallResponse, error) { - rsp, err := c.GetSipCall(ctx, projectId, callId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSipCallResponse(rsp) -} - -// ListSipCallEventsWithResponse request returning *ListSipCallEventsResponse -func (c *ClientWithResponses) ListSipCallEventsWithResponse(ctx context.Context, projectId ProjectId, callId string, params *ListSipCallEventsParams, reqEditors ...RequestEditorFn) (*ListSipCallEventsResponse, error) { - rsp, err := c.ListSipCallEvents(ctx, projectId, callId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListSipCallEventsResponse(rsp) -} - -// QueryProjectTimeseriesWithResponse request returning *QueryProjectTimeseriesResponse -func (c *ClientWithResponses) QueryProjectTimeseriesWithResponse(ctx context.Context, projectId ProjectId, params *QueryProjectTimeseriesParams, reqEditors ...RequestEditorFn) (*QueryProjectTimeseriesResponse, error) { - rsp, err := c.QueryProjectTimeseries(ctx, projectId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseQueryProjectTimeseriesResponse(rsp) -} - -// GetProjectUsageWithResponse request returning *GetProjectUsageResponse -func (c *ClientWithResponses) GetProjectUsageWithResponse(ctx context.Context, projectId ProjectId, params *GetProjectUsageParams, reqEditors ...RequestEditorFn) (*GetProjectUsageResponse, error) { - rsp, err := c.GetProjectUsage(ctx, projectId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetProjectUsageResponse(rsp) -} - -// ListProjectsWithResponse request returning *ListProjectsResponse -func (c *ClientWithResponses) ListProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListProjectsResponse, error) { - rsp, err := c.ListProjects(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseListProjectsResponse(rsp) -} - -// CreateProjectWithResponse request returning *CreateProjectResponse -func (c *ClientWithResponses) CreateProjectWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { - rsp, err := c.CreateProject(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateProjectResponse(rsp) -} - -// DeleteProjectWithResponse request returning *DeleteProjectResponse -func (c *ClientWithResponses) DeleteProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*DeleteProjectResponse, error) { - rsp, err := c.DeleteProject(ctx, projectId, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteProjectResponse(rsp) -} - -// GetProjectWithResponse request returning *GetProjectResponse -func (c *ClientWithResponses) GetProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*GetProjectResponse, error) { - rsp, err := c.GetProject(ctx, projectId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetProjectResponse(rsp) -} - -// UpdateProjectWithResponse request returning *UpdateProjectResponse -func (c *ClientWithResponses) UpdateProjectWithResponse(ctx context.Context, projectId ProjectId, reqEditors ...RequestEditorFn) (*UpdateProjectResponse, error) { - rsp, err := c.UpdateProject(ctx, projectId, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateProjectResponse(rsp) -} - -// ListUsersWithResponse request returning *ListUsersResponse -func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) { - rsp, err := c.ListUsers(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseListUsersResponse(rsp) -} - -// GetCurrentUserWithResponse request returning *GetCurrentUserResponse -func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { - rsp, err := c.GetCurrentUser(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCurrentUserResponse(rsp) -} - -// GetUserWithResponse request returning *GetUserResponse -func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserResponse, error) { - rsp, err := c.GetUser(ctx, userId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetUserResponse(rsp) -} - -// ListWorkspacesWithResponse request returning *ListWorkspacesResponse -func (c *ClientWithResponses) ListWorkspacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListWorkspacesResponse, error) { - rsp, err := c.ListWorkspaces(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseListWorkspacesResponse(rsp) -} - -// GetWorkspaceWithResponse request returning *GetWorkspaceResponse -func (c *ClientWithResponses) GetWorkspaceWithResponse(ctx context.Context, workspaceId string, reqEditors ...RequestEditorFn) (*GetWorkspaceResponse, error) { - rsp, err := c.GetWorkspace(ctx, workspaceId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetWorkspaceResponse(rsp) -} - -// ParseDeleteExportResponse parses an HTTP response from a DeleteExportWithResponse call -func ParseDeleteExportResponse(rsp *http.Response) (*DeleteExportResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteExportResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetExportResponse parses an HTTP response from a GetExportWithResponse call -func ParseGetExportResponse(rsp *http.Response) (*GetExportResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetExportResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Export - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseListProjectEgressesResponse parses an HTTP response from a ListProjectEgressesWithResponse call -func ParseListProjectEgressesResponse(rsp *http.Response) (*ListProjectEgressesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListProjectEgressesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest EgressList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetEgressResponse parses an HTTP response from a GetEgressWithResponse call -func ParseGetEgressResponse(rsp *http.Response) (*GetEgressResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetEgressResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest EgressDetail - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseListProjectExportsResponse parses an HTTP response from a ListProjectExportsWithResponse call -func ParseListProjectExportsResponse(rsp *http.Response) (*ListProjectExportsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListProjectExportsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ExportList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseCreateProjectExportResponse parses an HTTP response from a CreateProjectExportWithResponse call -func ParseCreateProjectExportResponse(rsp *http.Response) (*CreateProjectExportResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateProjectExportResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest Export - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON202 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseListProjectIngressesResponse parses an HTTP response from a ListProjectIngressesWithResponse call -func ParseListProjectIngressesResponse(rsp *http.Response) (*ListProjectIngressesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListProjectIngressesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest IngressList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetIngressResponse parses an HTTP response from a GetIngressWithResponse call -func ParseGetIngressResponse(rsp *http.Response) (*GetIngressResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetIngressResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest IngressDetail - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseListProjectSessionsResponse parses an HTTP response from a ListProjectSessionsWithResponse call -func ParseListProjectSessionsResponse(rsp *http.Response) (*ListProjectSessionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListProjectSessionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SessionList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetSessionResponse parses an HTTP response from a GetSessionWithResponse call -func ParseGetSessionResponse(rsp *http.Response) (*GetSessionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSessionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SessionDetail - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseListProjectSipCallsResponse parses an HTTP response from a ListProjectSipCallsWithResponse call -func ParseListProjectSipCallsResponse(rsp *http.Response) (*ListProjectSipCallsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListProjectSipCallsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SipCallList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetSipCallResponse parses an HTTP response from a GetSipCallWithResponse call -func ParseGetSipCallResponse(rsp *http.Response) (*GetSipCallResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSipCallResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SipCallDetail - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseListSipCallEventsResponse parses an HTTP response from a ListSipCallEventsWithResponse call -func ParseListSipCallEventsResponse(rsp *http.Response) (*ListSipCallEventsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListSipCallEventsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SipEventList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseQueryProjectTimeseriesResponse parses an HTTP response from a QueryProjectTimeseriesWithResponse call -func ParseQueryProjectTimeseriesResponse(rsp *http.Response) (*QueryProjectTimeseriesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &QueryProjectTimeseriesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest TimeseriesResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetProjectUsageResponse parses an HTTP response from a GetProjectUsageWithResponse call -func ParseGetProjectUsageResponse(rsp *http.Response) (*GetProjectUsageResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetProjectUsageResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest UsageResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest Unauthorized - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseListProjectsResponse parses an HTTP response from a ListProjectsWithResponse call -func ParseListProjectsResponse(rsp *http.Response) (*ListProjectsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListProjectsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} - -// ParseCreateProjectResponse parses an HTTP response from a CreateProjectWithResponse call -func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateProjectResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} - -// ParseDeleteProjectResponse parses an HTTP response from a DeleteProjectWithResponse call -func ParseDeleteProjectResponse(rsp *http.Response) (*DeleteProjectResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteProjectResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} - -// ParseGetProjectResponse parses an HTTP response from a GetProjectWithResponse call -func ParseGetProjectResponse(rsp *http.Response) (*GetProjectResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetProjectResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} - -// ParseUpdateProjectResponse parses an HTTP response from a UpdateProjectWithResponse call -func ParseUpdateProjectResponse(rsp *http.Response) (*UpdateProjectResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateProjectResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} - -// ParseListUsersResponse parses an HTTP response from a ListUsersWithResponse call -func ParseListUsersResponse(rsp *http.Response) (*ListUsersResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListUsersResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} - -// ParseGetCurrentUserResponse parses an HTTP response from a GetCurrentUserWithResponse call -func ParseGetCurrentUserResponse(rsp *http.Response) (*GetCurrentUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetCurrentUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} - -// ParseGetUserResponse parses an HTTP response from a GetUserWithResponse call -func ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} - -// ParseListWorkspacesResponse parses an HTTP response from a ListWorkspacesWithResponse call -func ParseListWorkspacesResponse(rsp *http.Response) (*ListWorkspacesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListWorkspacesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} - -// ParseGetWorkspaceResponse parses an HTTP response from a GetWorkspaceWithResponse call -func ParseGetWorkspaceResponse(rsp *http.Response) (*GetWorkspaceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetWorkspaceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 501: - var dest NotImplemented - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON501 = &dest - - } - - return response, nil -} diff --git a/pkg/util/printer.go b/pkg/util/printer.go index 58cb14bfc..71d8823f9 100644 --- a/pkg/util/printer.go +++ b/pkg/util/printer.go @@ -30,6 +30,33 @@ import ( "github.com/mattn/go-isatty" ) +// Default is the process-wide Printer, set once from the root command via +// SetDefault. It lets lower-level packages that can't reach the command's +// Printer (config, agentfs, …) route output through the same streams and gating +// using the package-level Status/Statusf/Warnf/Result helpers below. It is nil +// until SetDefault runs; every helper (and every Printer method) is nil-safe, so +// pre-init or in tests they are no-ops. +var Default *Printer + +// SetDefault registers the process-wide Printer. +func SetDefault(p *Printer) { Default = p } + +// Status writes an informational breadcrumb to the default Printer (stderr, +// suppressed by --quiet). +func Status(a ...any) { Default.Status(a...) } + +// Statusf is Printf-style Status on the default Printer. +func Statusf(format string, a ...any) { Default.Statusf(format, a...) } + +// Warnf writes a warning to the default Printer (stderr, never suppressed). +func Warnf(format string, a ...any) { Default.Warnf(format, a...) } + +// Result writes primary output to the default Printer (stdout, always printed). +func Result(a ...any) { Default.Result(a...) } + +// Resultf is Printf-style Result on the default Printer. +func Resultf(format string, a ...any) { Default.Resultf(format, a...) } + // Printer is a single sink for human-facing CLI output. One instance per process // is initialized from the root command and reused everywhere, so all status, // warning, and result lines share consistent streams and gating. diff --git a/pkg/util/strings.go b/pkg/util/strings.go index b1339b14f..e6e07dd00 100644 --- a/pkg/util/strings.go +++ b/pkg/util/strings.go @@ -82,10 +82,31 @@ func URLSafeName(projectURL string) (string, error) { if err != nil { return "", errors.New("invalid URL") } - subdomain := strings.Split(parsed.Hostname(), ".")[0] + subdomain, _, _ := strings.Cut(parsed.Hostname(), ".") lastHyphen := strings.LastIndex(subdomain, "-") if lastHyphen == -1 { return subdomain, nil } return subdomain[:lastHyphen], nil } + +// Slugify converts s into a lowercase, URL-safe alias: runs of characters that +// aren't ASCII letters or digits collapse to a single hyphen, and leading and +// trailing hyphens are trimmed. Input with no usable characters yields "". +func Slugify(s string) string { + var b strings.Builder + pendingHyphen := false + for _, r := range strings.ToLower(s) { + switch { + case (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9'): + if pendingHyphen && b.Len() > 0 { + b.WriteByte('-') + } + pendingHyphen = false + b.WriteRune(r) + default: + pendingHyphen = true + } + } + return b.String() +} diff --git a/protobufs/livekit/publicapi/analytics/v1/analytics.proto b/protobufs/livekit/publicapi/analytics/v1/analytics.proto new file mode 100644 index 000000000..f23ae349b --- /dev/null +++ b/protobufs/livekit/publicapi/analytics/v1/analytics.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; + +package livekit.publicapi.analytics.v1; + +import "google/protobuf/timestamp.proto"; +import "livekit/publicapi/common/v1/common.proto"; + +// SessionStatus is the lifecycle state of a session. +enum SessionStatus { + SESSION_STATUS_UNSPECIFIED = 0; + SESSION_STATUS_ACTIVE = 1; + SESSION_STATUS_CLOSED = 2; +} + +// Session is one analytics session row. A representative subset of the former +// REST `Session` schema — the full field set can be filled in incrementally. +message Session { + string session_id = 1; + string room_name = 2; + SessionStatus status = 3; + google.protobuf.Timestamp started_at = 4; + google.protobuf.Timestamp ended_at = 5; + int64 bandwidth_in = 6; + int64 bandwidth_out = 7; + int32 num_participants = 8; + repeated string tags = 9; +} + +message ListProjectSessionsRequest { + string project_id = 1; + livekit.publicapi.common.v1.PageRequest page = 2; +} + +message ListProjectSessionsResponse { + repeated Session items = 1; + livekit.publicapi.common.v1.PageInfo page_info = 2; +} + +message GetSessionRequest { + string project_id = 1; + string session_id = 2; +} + +message GetSessionResponse { + Session session = 1; +} + +// AnalyticsService is the (always project-scoped) analytics domain. Only the +// sessions endpoints are modelled here as a sample; egresses/ingresses/sip/usage +// /timeseries/exports follow the same pattern. +service AnalyticsService { + rpc ListProjectSessions(ListProjectSessionsRequest) returns (ListProjectSessionsResponse); + rpc GetSession(GetSessionRequest) returns (GetSessionResponse); +} diff --git a/protobufs/livekit/publicapi/common/v1/common.proto b/protobufs/livekit/publicapi/common/v1/common.proto new file mode 100644 index 000000000..1007ad2b5 --- /dev/null +++ b/protobufs/livekit/publicapi/common/v1/common.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package livekit.publicapi.common.v1; + +// Error mirrors the JSON error envelope the REST surface used to return. Connect +// carries its own structured error model (code + message + details), so most +// handlers should prefer returning a *connect.Error; this message exists for +// endpoints that want to embed a structured error inside a normal response. +message Error { + message Detail { + string code = 1; + string message = 2; + } + Detail error = 1; +} + +// PageInfo is the cursor-pagination metadata shared by every list response. +message PageInfo { + // Pass as `cursor` on the next request to fetch the following page. Empty on + // the last page. + string next_cursor = 1; + bool has_more = 2; +} + +// PageRequest is the shared cursor-pagination request fragment. Embed it in a +// list request. +message PageRequest { + // Opaque cursor returned by a prior page (PageInfo.next_cursor). Empty starts + // from the beginning. + string cursor = 1; + // Maximum items to return; 0 lets the server pick a default. + int32 page_size = 2; +} diff --git a/protobufs/livekit/publicapi/projects/v1/projects.proto b/protobufs/livekit/publicapi/projects/v1/projects.proto new file mode 100644 index 000000000..af7a4e16e --- /dev/null +++ b/protobufs/livekit/publicapi/projects/v1/projects.proto @@ -0,0 +1,306 @@ +syntax = "proto3"; + +package livekit.publicapi.projects.v1; + +import "google/protobuf/timestamp.proto"; +import "livekit/publicapi/common/v1/common.proto"; +import "livekit_models.proto"; +import "livekit_room.proto"; +import "pii.proto"; + +// Webhook is a project webhook destination (mirrors backend-common Webhook). +message Webhook { + string id = 1; + string name = 2; + string url = 3; + string signing_key = 4; + livekit.FilterParams filter_params = 5; +} + +// ProjectPreferences holds per-project UI/feature settings (mirrors +// backend-common ProjectPreferences). +message ProjectPreferences { + bool hide_onboarding = 1; + bool discoverable_by_domain = 2; + bool joinable_by_domain = 3; + bool hide_sample_app_gallery = 4; + bool disable_token_endpoint = 5; + string token_endpoint_key = 6; + bool sfu_allow_pause = 7; + bool enable_egress_backup_storage = 8; + map feature_flags = 9; + bool enable_egress_auto_retry = 10; + bool hipaa_compliant = 11; + map room_configurations = 12; +} + +// Project is a LiveKit Cloud project (owned by cloud-api-server). +// Field set mirrors backend-common model.Project (most config fields); +// members/domains are separate list resources and are not embedded here. +message Project { + string id = 1; + string name = 2; + string workspace_id = 3; + google.protobuf.Timestamp created_at = 4; + repeated Webhook webhooks = 5; + string creator_id = 6; + string subdomain = 7; + bool enable_analytics = 8; + string analytics_access_key = 9; + bool enable_auto_create = 10; + bool enable_remote_unmute = 11; + bool enable_enhanced_noise_cancellation = 12; + bool enable_hosted_agents = 13; + ProjectPreferences preferences = 14; + repeated string enabled_codecs = 15; + repeated string pinned_regions = 16; + string egress_cluster_id = 17; + bool enable_safe_mode = 18; + bool enable_user_data_recording = 19; + bool enable_user_data_training = 20; + string user_data_region = 21; + int32 user_data_lifetime_days = 22; + bool enable_sip_custom_domain = 23; + bool require_explicit_dispatch = 24; + bool is_private = 25; + bool enable_pii_redaction = 26; + // Categories to redact when enable_pii_redaction is on. Empty on read means + // the stored set (or defaults applied at enable time) — never "redact nothing". + // Same taxonomy as cloud-api UpdateProject (cloud_protocol.PIIRedactionCategory). + repeated cloud_protocol.PIIRedactionCategory pii_redaction_categories = 27; + bool enable_inference_region_restriction = 28; +} + +message ListProjectsRequest { + livekit.publicapi.common.v1.PageRequest page = 1; + // Mutually exclusive: only one of workspace_id or member_id can be set + // if workspace_id is set, list projects for the workspace + string workspace_id = 2; + // if member_id is set, list projects for the member + string member_id = 3; +} + +message ListProjectsResponse { + repeated Project items = 1; + livekit.publicapi.common.v1.PageInfo page_info = 2; +} + +message GetProjectRequest { + string project_id = 1; +} + +message GetProjectResponse { + Project project = 1; +} + +// TODO: Add more parts that allow for a full project creation, not just the name +message CreateProjectMember { + string user_id = 1; + // Matches cloud_protocol.ProjectMemberRole: INVITED=0, READ=1, WRITE=2, ADMIN=3. + int32 role = 2; +} + +message CreateProjectRequest { + string workspace_id = 1; // optional; when empty a new workspace is created + string name = 2; + string subdomain = 3; // optional; generated from name when empty + bool is_private = 4; + repeated CreateProjectMember members = 5; // private projects only +} + +message CreateProjectResponse { + Project project = 1; +} + +// UpdateProjectRequest patches a project. Unset optional fields are left +// unchanged (proto3 optional). Mirrors cloud-api UpdateProject for local mode; +// webhooks are separate RPCs (not included here). +message UpdateProjectRequest { + string project_id = 1; + + optional string name = 2; + optional string subdomain = 3; + optional string custom_domain = 4; + optional bool enable_analytics = 5; + optional bool enable_auto_create = 6; + optional bool enable_remote_unmute = 7; + repeated string enabled_codecs = 8; + optional string egress_cluster_id = 9; // LK-admin only + optional bool enable_hosted_agents = 10; // LK-admin only + optional bool enable_user_data_recording = 11; + optional string user_data_region = 12; + optional bool require_explicit_dispatch = 13; + optional bool is_private = 14; + // Used when becoming private: explicit member set (actor kept as ADMIN). + repeated CreateProjectMember members = 15; + optional bool enable_pii_redaction = 16; + // Non-empty list replaces the stored set (validated via Canonical). + // Empty is ignored (cannot clear). When enabling with nothing stored, + // defaults are applied server-side — same as cloud-api UpdateProject. + repeated cloud_protocol.PIIRedactionCategory pii_redaction_categories = 17; + optional bool enable_inference_region_restriction = 18; + + // Preferences (flat, matching cloud-api UpdateProjectRequest). + optional bool hide_onboarding = 19; + optional bool discoverable_by_domain = 20; + optional bool joinable_by_domain = 21; + optional bool hide_sample_app_gallery = 22; + optional bool disable_token_endpoint = 23; + optional string token_endpoint_key = 24; + optional bool sfu_allow_pause = 25; + optional bool enable_egress_backup_storage = 26; + optional bool enable_egress_auto_retry = 27; + map feature_flags = 28; + + // RoomConfiguration management (stored on project preferences). + repeated livekit.RoomConfiguration room_configs_to_upsert = 29; + repeated string room_configs_to_delete = 30; +} + +message UpdateProjectResponse { + Project project = 1; +} + +message DeleteProjectRequest { + string project_id = 1; +} + +message DeleteProjectResponse {} + +// ProjectMember is a user's membership on a project. +message ProjectMember { + string project_id = 1; + string user_id = 2; + string email = 3; + // Matches cloud_protocol.ProjectMemberRole: INVITED=0, READ=1, WRITE=2, ADMIN=3. + int32 role = 4; +} + +// ProjectInvite is a pending email invite to a project (token-based, cloud InviteMember2). +message ProjectInvite { + string project_id = 1; + string email = 2; + int32 role = 3; + string invite_token = 4; + google.protobuf.Timestamp expires_at = 5; +} + +message ListMembersRequest { + string project_id = 1; +} + +message ListMembersResponse { + repeated ProjectMember items = 1; +} + +message GetMemberRequest { + string project_id = 1; + string user_id = 2; +} + +message GetMemberResponse { + ProjectMember member = 1; +} + +message UpdateMemberRequest { + string project_id = 1; + string user_id = 2; + int32 role = 3; +} + +message UpdateMemberResponse { + ProjectMember member = 1; +} + +message RemoveMemberRequest { + string project_id = 1; + string user_id = 2; +} + +message RemoveMemberResponse {} + +// InviteMember creates or refreshes a token invite (cloud InviteMember2). +message InviteMemberRequest { + string project_id = 1; + string email = 2; + int32 role = 3; +} + +message InviteMemberResponse { + string project_id = 1; + string invite_token = 2; +} + +message ListInvitesRequest { + string project_id = 1; +} + +message ListInvitesResponse { + repeated ProjectInvite items = 1; +} + +message GetInviteRequest { + string invite_token = 1; +} + +message GetInviteResponse { + ProjectInvite invite = 1; +} + +message UpdateInviteRequest { + string project_id = 1; + string email = 2; + int32 role = 3; +} + +message UpdateInviteResponse { + ProjectInvite invite = 1; +} + +message DeleteInviteRequest { + string project_id = 1; + string email = 2; +} + +message DeleteInviteResponse {} + +message AnswerInvitationRequest { + string invite_token = 1; + bool accept = 2; +} + +message AnswerInvitationResponse { + ProjectMember member = 1; // set when accept=true +} + +message AddWorkspaceMembersToProjectRequest { + string project_id = 1; + repeated string user_ids = 2; + int32 role = 3; +} + +message AddWorkspaceMembersToProjectResponse { + repeated ProjectMember items = 1; +} + +// ProjectService is the projects domain of the public API. +service ProjectService { + rpc ListProjects(ListProjectsRequest) returns (ListProjectsResponse); + rpc GetProject(GetProjectRequest) returns (GetProjectResponse); + rpc CreateProject(CreateProjectRequest) returns (CreateProjectResponse); + rpc UpdateProject(UpdateProjectRequest) returns (UpdateProjectResponse); + rpc DeleteProject(DeleteProjectRequest) returns (DeleteProjectResponse); + + // Members & invites (token-based; mirrors cloud ProjectService current flows). + rpc ListMembers(ListMembersRequest) returns (ListMembersResponse); + rpc GetMember(GetMemberRequest) returns (GetMemberResponse); + rpc UpdateMember(UpdateMemberRequest) returns (UpdateMemberResponse); + rpc RemoveMember(RemoveMemberRequest) returns (RemoveMemberResponse); + rpc InviteMember(InviteMemberRequest) returns (InviteMemberResponse); + rpc ListInvites(ListInvitesRequest) returns (ListInvitesResponse); + rpc GetInvite(GetInviteRequest) returns (GetInviteResponse); + rpc UpdateInvite(UpdateInviteRequest) returns (UpdateInviteResponse); + rpc DeleteInvite(DeleteInviteRequest) returns (DeleteInviteResponse); + rpc AnswerInvitation(AnswerInvitationRequest) returns (AnswerInvitationResponse); + rpc AddWorkspaceMembersToProject(AddWorkspaceMembersToProjectRequest) returns (AddWorkspaceMembersToProjectResponse); +} diff --git a/protobufs/livekit/publicapi/simulations/v1/simulations.proto b/protobufs/livekit/publicapi/simulations/v1/simulations.proto new file mode 100644 index 000000000..f75e7cd96 --- /dev/null +++ b/protobufs/livekit/publicapi/simulations/v1/simulations.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package livekit.publicapi.simulations.v1; + +// The agent-simulation messages are owned by LiveKit's shared protobufs and are +// imported rather than redefined here. Only the public RPCs/service live in this +// repo. See github.com/livekit/protocol/blob/main/protobufs/livekit_agent_simulation.proto +// (wired via the buf.build/livekit/protocol dep in protobufs/buf.yaml). +import "livekit_agent_simulation.proto"; + +// SimulationService is the agent-simulation domain of the public API. It reuses +// the request/response messages from livekit.AgentSimulation; only the surface +// (service + RPCs) is defined here. +service SimulationService { + rpc CreateSimulationRun(livekit.SimulationRun.Create.Request) returns (livekit.SimulationRun.Create.Response); + rpc GetSimulationRun(livekit.SimulationRun.Get.Request) returns (livekit.SimulationRun.Get.Response); + rpc ListSimulationRuns(livekit.SimulationRun.List.Request) returns (livekit.SimulationRun.List.Response); + rpc CancelSimulationRun(livekit.SimulationRun.Cancel.Request) returns (livekit.SimulationRun.Cancel.Response); +} diff --git a/protobufs/livekit/publicapi/users/v1/users.proto b/protobufs/livekit/publicapi/users/v1/users.proto new file mode 100644 index 000000000..218b3cce9 --- /dev/null +++ b/protobufs/livekit/publicapi/users/v1/users.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package livekit.publicapi.users.v1; + +import "google/protobuf/timestamp.proto"; +import "livekit/publicapi/common/v1/common.proto"; + +// User is a LiveKit Cloud user (owned by cloud-api-server). +message User { + string id = 1; + string email = 2; + google.protobuf.Timestamp created_at = 3; +} + +message ListUsersRequest { + livekit.publicapi.common.v1.PageRequest page = 1; + + // At least one of project_id or workspace_id is required. + // If both are set, project_id must belong to workspace_id; members are + // the project's members. + string project_id = 2; + string workspace_id = 3; +} + +message ListUsersResponse { + repeated User items = 1; + livekit.publicapi.common.v1.PageInfo page_info = 2; +} + +message GetUserRequest { + string user_id = 1; +} + +message GetUserResponse { + User user = 1; +} + +message GetCurrentUserRequest {} + +message GetCurrentUserResponse { + User user = 1; +} + +// UserService is the users domain of the public API. +service UserService { + rpc ListUsers(ListUsersRequest) returns (ListUsersResponse); + rpc GetUser(GetUserRequest) returns (GetUserResponse); + rpc GetCurrentUser(GetCurrentUserRequest) returns (GetCurrentUserResponse); +} diff --git a/protobufs/livekit/publicapi/workspaces/v1/workspaces.proto b/protobufs/livekit/publicapi/workspaces/v1/workspaces.proto new file mode 100644 index 000000000..6d8502bb2 --- /dev/null +++ b/protobufs/livekit/publicapi/workspaces/v1/workspaces.proto @@ -0,0 +1,229 @@ +syntax = "proto3"; + +package livekit.publicapi.workspaces.v1; + +import "google/protobuf/timestamp.proto"; +import "livekit/publicapi/common/v1/common.proto"; +import "livekit/publicapi/projects/v1/projects.proto"; + +// WorkspacePreferences holds per-workspace settings (mirrors backend-common +// WorkspacePreferences). +message WorkspacePreferences { + bool hipaa_compliant = 1; +} + +// Workspace is a LiveKit Cloud workspace (owned by cloud-api-server). +// Field set mirrors backend-common model.Workspace.ToProto(); members/invites +// are separate list resources and are not embedded here. +message Workspace { + string id = 1; + string name = 2; + string creator_id = 3; + string organization_id = 4; + google.protobuf.Timestamp created_at = 5; + WorkspacePreferences preferences = 6; +} + +message ListWorkspacesRequest { + livekit.publicapi.common.v1.PageRequest page = 1; +} + +message ListWorkspacesResponse { + repeated Workspace items = 1; + livekit.publicapi.common.v1.PageInfo page_info = 2; +} + +message GetWorkspaceRequest { + string workspace_id = 1; +} + +message GetWorkspaceResponse { + Workspace workspace = 1; +} + +// message CreateWorkspaceRequest { +// string name = 1; +// // Optional organization association. +// string organization_id = 2; +// // Optional. When set, initializes the workspace from an existing project +// // (cloud admin-only today; kept for grpc passthrough parity). +// optional string from_project_id = 3; +// optional WorkspacePreferences preferences = 4; +// } + +// message CreateWorkspaceResponse { +// Workspace workspace = 1; +// } + +// Mirrors cloud-api WorkspaceService.UpdateWorkspace, which only accepts a +// name: workspace preferences (hipaa_compliant) cascade to every project in the +// workspace and are LK-admin-only there (AdminService.UpdateWorkspace), so they +// are deliberately not settable on this path. +message UpdateWorkspaceRequest { + string workspace_id = 1; + optional string name = 2; +} + +message UpdateWorkspaceResponse { + Workspace workspace = 1; +} + +message DeleteWorkspaceRequest { + string workspace_id = 1; +} + +message DeleteWorkspaceResponse {} + +// Workspace-scoped project RPCs: requests are owned here (required +// workspace_id); responses reuse projects.v1. +message ListProjectsRequest { + string workspace_id = 1; + livekit.publicapi.common.v1.PageRequest page = 2; +} + +message GetProjectRequest { + string workspace_id = 1; + string project_id = 2; +} + +message CreateProjectRequest { + string workspace_id = 1; + string name = 2; + string subdomain = 3; // optional; generated from name when empty + bool is_private = 4; + repeated livekit.publicapi.projects.v1.CreateProjectMember members = 5; +} + +message UpdateProjectRequest { + string workspace_id = 1; + // Nested projects.v1 update; the handler applies this request's workspace_id + // as the store constraint. + livekit.publicapi.projects.v1.UpdateProjectRequest update = 2; +} + +message DeleteProjectRequest { + string workspace_id = 1; + string project_id = 2; +} + +// WorkspaceMember is a user's membership on a workspace. +message WorkspaceMember { + string workspace_id = 1; + string user_id = 2; + string email = 3; + // Matches cloud_protocol.ProjectMemberRole: INVITED=0, READ=1, WRITE=2, ADMIN=3. + int32 role = 4; +} + +// WorkspaceInvite is a pending email invite to a workspace. +message WorkspaceInvite { + string workspace_id = 1; + string email = 2; + int32 role = 3; + string invite_token = 4; + google.protobuf.Timestamp expires_at = 5; +} + +message ListMembersRequest { + string workspace_id = 1; +} + +message ListMembersResponse { + repeated WorkspaceMember items = 1; +} + +message GetMemberRequest { + string workspace_id = 1; + string user_id = 2; +} + +message GetMemberResponse { + WorkspaceMember member = 1; +} + +message UpdateMemberRequest { + string workspace_id = 1; + string user_id = 2; + int32 role = 3; +} + +message UpdateMemberResponse { + WorkspaceMember member = 1; +} + +message DeleteMemberRequest { + string workspace_id = 1; + string user_id = 2; +} + +message DeleteMemberResponse {} + +message CreateInviteRequest { + string workspace_id = 1; + string email = 2; + int32 role = 3; +} + +message CreateInviteResponse { + string workspace_id = 1; + string invite_token = 2; +} + +message ListInvitesRequest { + string workspace_id = 1; +} + +message ListInvitesResponse { + repeated WorkspaceInvite items = 1; +} + +message GetInviteRequest { + string invite_token = 1; +} + +message GetInviteResponse { + WorkspaceInvite invite = 1; +} + +message DeleteInviteRequest { + string workspace_id = 1; + string email = 2; +} + +message DeleteInviteResponse {} + +message AnswerInviteRequest { + string invite_token = 1; + bool accept = 2; +} + +message AnswerInviteResponse { + WorkspaceMember member = 1; // set when accept=true +} + +// WorkspaceService is the workspaces domain of the public API. +service WorkspaceService { + rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse); + rpc GetWorkspace(GetWorkspaceRequest) returns (GetWorkspaceResponse); + // rpc CreateWorkspace(CreateWorkspaceRequest) returns (CreateWorkspaceResponse); // TODO: Will we want to allow creation of workspaces? + rpc UpdateWorkspace(UpdateWorkspaceRequest) returns (UpdateWorkspaceResponse); + rpc DeleteWorkspace(DeleteWorkspaceRequest) returns (DeleteWorkspaceResponse); + + // Project CRUD scoped to a workspace — responses owned by projects.v1. + rpc ListProjects(ListProjectsRequest) returns (livekit.publicapi.projects.v1.ListProjectsResponse); + rpc GetProject(GetProjectRequest) returns (livekit.publicapi.projects.v1.GetProjectResponse); + rpc CreateProject(CreateProjectRequest) returns (livekit.publicapi.projects.v1.CreateProjectResponse); + rpc UpdateProject(UpdateProjectRequest) returns (livekit.publicapi.projects.v1.UpdateProjectResponse); + rpc DeleteProject(DeleteProjectRequest) returns (livekit.publicapi.projects.v1.DeleteProjectResponse); + + // Members & invites (mirrors cloud WorkspaceService current flows). + rpc ListMembers(ListMembersRequest) returns (ListMembersResponse); + rpc GetMember(GetMemberRequest) returns (GetMemberResponse); + rpc UpdateMember(UpdateMemberRequest) returns (UpdateMemberResponse); + rpc DeleteMember(DeleteMemberRequest) returns (DeleteMemberResponse); + rpc CreateInvite(CreateInviteRequest) returns (CreateInviteResponse); + rpc ListInvites(ListInvitesRequest) returns (ListInvitesResponse); + rpc GetInvite(GetInviteRequest) returns (GetInviteResponse); + rpc DeleteInvite(DeleteInviteRequest) returns (DeleteInviteResponse); + rpc AnswerInvite(AnswerInviteRequest) returns (AnswerInviteResponse); +}