Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ece5872
chore(public): regenerate the client with TelephonyService
Topherhindman Nov 12, 2026
06182a0
feat(public): TelephonyService in the Public API client
Topherhindman Nov 12, 2026
0d8e7b6
feat(sip): the sip commands use the Public API under --user-auth
Topherhindman Nov 12, 2026
f468424
feat(number): the number commands use the Public API under --user-auth
Topherhindman Nov 12, 2026
8656e6f
fix(sip): participant create --wait rings at most 75s under --user-auth
Topherhindman Nov 17, 2026
e903e8e
fix(sip): deleting a trunk that doesn't exist says so
Topherhindman Nov 17, 2026
6d47db4
feat(sip): get an inbound trunk, an outbound trunk or a dispatch rule…
Topherhindman Nov 17, 2026
c8bc73b
feat(number): get and update print the number's name
Topherhindman Nov 18, 2026
f1dfc9d
fix(number): purchase and release say "1 phone number", not "1 phone …
Topherhindman Nov 18, 2026
a89ef09
fix(sip): deleting a dispatch rule says it was deleted, as deleting a…
Topherhindman Nov 18, 2026
5a59e3a
docs(sip): --trunks takes phone number IDs, and a rule without them c…
Topherhindman Nov 18, 2026
4e3913e
fix(number): search calls the API once
Topherhindman Nov 18, 2026
ba73e7e
fix(sip): participant create --agent-name dispatches to the call's pr…
Topherhindman Nov 18, 2026
813ea48
fix(number): list calls the API once with an API key
Topherhindman Nov 18, 2026
e5902b2
fix(config): a project ID wins over another project's name or alias
Topherhindman Nov 18, 2026
5b04572
fix(config): a workspace ID wins over another workspace's name or alias
Topherhindman Nov 18, 2026
8c415f1
refactor(number): use cmp.Or for the phone number's path ID
Topherhindman Nov 18, 2026
274ae6d
refactor(sip): one generic getOne replaces the three get-by-ID helpers
Topherhindman Nov 18, 2026
19f2f4d
fix(number): list's next-page hint names the whole command, as other …
Topherhindman Nov 18, 2026
169c9b4
fix(sip): under --user-auth, a list by trunk or rule IDs gets those IDs
Topherhindman Nov 18, 2026
d4a3f98
docs(number): --status says the list defaults to active and offline n…
Topherhindman Nov 18, 2026
0732511
fix(public): a trunk or rule list that reports a next page is an error
Topherhindman Nov 18, 2026
512bbda
fix(util): RenderPage prints proto items as protojson
Topherhindman Nov 18, 2026
7a1f3d4
fix(number): under --user-auth, list prints a page as other cursor li…
Topherhindman Nov 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
238 changes: 152 additions & 86 deletions cmd/lk/phone_number.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

"github.com/urfave/cli/v3"

"github.com/livekit/livekit-cli/v2/pkg/public"
"github.com/livekit/livekit-cli/v2/pkg/util"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
Expand Down Expand Up @@ -67,7 +68,7 @@ var (
},
&cli.StringFlag{
Name: "sip-dispatch-rule-id",
Usage: "SIP dispatch rule ID to apply to all purchased numbers",
Usage: "SIP dispatch rule ID to apply to all purchased numbers. The rule must list its trunks or phone numbers; a rule that lists none already applies to every number",
},
jsonFlag,
},
Expand All @@ -87,9 +88,15 @@ var (
Usage: "Offset for pagination (default: 0)",
Value: 0,
},
// user-auth only: the Public API pages by cursor.
userAuthOnlyFlag(&cli.StringFlag{
Name: "cursor",
Usage: "Page `CURSOR` that a previous page printed (requires --user-auth)",
Hidden: true,
}),
&cli.StringSliceFlag{
Name: "status",
Usage: "Filter by status(es) (active, pending, released, offline). Multiple values can be specified.",
Usage: "Filter by status(es) (active, pending, released, offline; default: active and offline). Multiple values can be specified.",
},
&cli.StringFlag{
Name: "sip-dispatch-rule-id",
Expand Down Expand Up @@ -130,7 +137,11 @@ var (
},
&cli.StringFlag{
Name: "sip-dispatch-rule-id",
Usage: "SIP dispatch rule ID to assign to the phone number",
Usage: "SIP dispatch rule ID to assign to the phone number. The rule must list its trunks or phone numbers; a rule that lists none already applies to every number",
},
&cli.StringFlag{
Name: "name",
Usage: "Sets a new `NAME` for the phone number",
},
jsonFlag,
},
Expand All @@ -157,7 +168,21 @@ var (
}
)

func createPhoneNumberClient(ctx context.Context, cmd *cli.Command) (*lksdk.PhoneNumberClient, error) {
// createPhoneNumberClient returns the phone number API: server-sdk-go's
// client with an API key, or the Public API under --user-auth.
func createPhoneNumberClient(ctx context.Context, cmd *cli.Command) (phoneNumberAPI, error) {
if userAuthEnabled(cmd) {
client, projectID, err := telephonyProject(ctx, cmd)
if err != nil {
return nil, err
}
return &publicPhoneNumbers{client: client, projectID: projectID}, nil
}
return createPhoneNumberSDKClient(ctx, cmd)
}

// createPhoneNumberSDKClient returns server-sdk-go's phone number client.
func createPhoneNumberSDKClient(ctx context.Context, cmd *cli.Command) (*lksdk.PhoneNumberClient, error) {
_, err := requireProjectForSDK(ctx, cmd)
if err != nil {
return nil, err
Expand Down Expand Up @@ -185,21 +210,6 @@ func searchPhoneNumbers(ctx context.Context, cmd *cli.Command) error {
req.Limit = &limit
}

resp, err := client.SearchPhoneNumbers(ctx, req)
if err != nil {
return err
}

if cmd.Bool("json") {
util.PrintJSON(resp)
return nil
}

// Define the search function
searchFunc := func(ctx context.Context, req *livekit.SearchPhoneNumbersRequest) (*livekit.SearchPhoneNumbersResponse, error) {
return client.SearchPhoneNumbers(ctx, req)
}

// Define the column headers
headers := []string{
"E164", "Country", "Area Code", "Type", "Locality", "Region", "Capabilities",
Expand All @@ -218,7 +228,7 @@ func searchPhoneNumbers(ctx context.Context, cmd *cli.Command) error {
}
}

return listAndPrint(ctx, cmd, searchFunc, req, headers, rowFormatter)
return listAndPrint(ctx, cmd, client.SearchPhoneNumbers, req, headers, rowFormatter)
}

func purchasePhoneNumbers(ctx context.Context, cmd *cli.Command) error {
Expand Down Expand Up @@ -251,7 +261,7 @@ func purchasePhoneNumbers(ctx context.Context, cmd *cli.Command) error {
return nil
}

out.Resultf("Successfully purchased %d phone numbers:\n", len(resp.PhoneNumbers))
out.Resultf("Successfully purchased %s:\n", phoneNumbersCount(len(resp.PhoneNumbers)))
for _, phoneNumber := range resp.PhoneNumbers {
ruleInfo := ""
if len(phoneNumber.SipDispatchRuleIds) > 0 {
Expand All @@ -263,8 +273,21 @@ func purchasePhoneNumbers(ctx context.Context, cmd *cli.Command) error {
return nil
}

// phoneNumberListModeFlags: the API-key list pages by --offset, and the
// Public API by --cursor.
var phoneNumberListModeFlags = authModeFlags{
legacyOnly: []string{"offset"},
userAuthOnly: []string{"cursor"},
}

func listPhoneNumbers(ctx context.Context, cmd *cli.Command) error {
client, err := createPhoneNumberClient(ctx, cmd)
if err := phoneNumberListModeFlags.validate(cmd); err != nil {
return err
}
if userAuthEnabled(cmd) {
return cloudListPhoneNumbers(ctx, cmd)
}
client, err := createPhoneNumberSDKClient(ctx, cmd)
if err != nil {
return err
}
Expand All @@ -281,82 +304,111 @@ func listPhoneNumbers(ctx context.Context, cmd *cli.Command) error {
}
req.PageToken = pageToken

if statuses := cmd.StringSlice("status"); len(statuses) > 0 {
var phoneNumberStatuses []livekit.PhoneNumberStatus
for _, status := range statuses {
statusValue, ok := livekit.PhoneNumberStatus_value["PHONE_NUMBER_STATUS_"+strings.ToUpper(status)]
if !ok {
return fmt.Errorf("invalid status: %s", status)
}
phoneNumberStatuses = append(phoneNumberStatuses, livekit.PhoneNumberStatus(statusValue))
}
req.Statuses = phoneNumberStatuses
statuses, err := phoneNumberStatuses(cmd.StringSlice("status"))
if err != nil {
return err
}
req.Statuses = statuses
if val := cmd.String("sip-dispatch-rule-id"); val != "" {
req.SipDispatchRuleId = &val
}

resp, err := client.ListPhoneNumbers(ctx, req)
return listAndPrint(ctx, cmd, func(ctx context.Context, req *livekit.ListPhoneNumbersRequest) (*livekit.ListPhoneNumbersResponse, error) {
resp, err := client.ListPhoneNumbers(ctx, req)
if err != nil || cmd.Bool("json") {
return resp, err
}

out.Resultf("Total phone numbers: %d", resp.TotalCount)
if resp.OfflineCount > 0 {
out.Resultf(" (%d offline)", resp.OfflineCount)
}
out.Resultf("\n")

// Show pagination info
if offset > 0 {
out.Resultf("Showing results from offset %d\n", offset)
}
if resp.NextPageToken != nil {
nextOffset, _, err := livekit.DecodeTokenPagination(resp.NextPageToken)
if err == nil {
out.Resultf("More results available. Use --offset %d to see the next page.\n", nextOffset)
}
}
return resp, nil
}, req, phoneNumberListHeaders, phoneNumberListRow)
}

// cloudListPhoneNumbers prints one page of the project's phone numbers from
// the Public API, newest first, with the command for the next page. --limit
// is the page size, as without --user-auth.
func cloudListPhoneNumbers(ctx context.Context, cmd *cli.Command) error {
statuses, err := phoneNumberStatuses(cmd.StringSlice("status"))
if err != nil {
return err
}

if cmd.Bool("json") {
util.PrintJSON(resp)
return nil
client, projectID, err := telephonyProject(ctx, cmd)
if err != nil {
return err
}

out.Resultf("Total phone numbers: %d", resp.TotalCount)
if resp.OfflineCount > 0 {
out.Resultf(" (%d offline)", resp.OfflineCount)
numbers, next, err := client.ListPhoneNumbers(ctx, projectID, public.PhoneNumberListOptions{
Statuses: statuses,
SipDispatchRuleID: cmd.String("sip-dispatch-rule-id"),
PageSize: int32(cmd.Int("limit")),
Cursor: cmd.String("cursor"),
})
if err != nil {
return cloudAPIError(err)
}
out.Resultf("\n")
return util.RenderPage(out, cmd.Bool("json"), numbers, next, "No phone numbers found.", phoneNumberListHeaders, phoneNumberListRow)
}

// Show pagination info
if offset > 0 {
out.Resultf("Showing results from offset %d\n", offset)
}
if resp.NextPageToken != nil {
nextOffset, _, err := livekit.DecodeTokenPagination(resp.NextPageToken)
if err == nil {
out.Resultf("More results available. Use --offset %d to see the next page.\n", nextOffset)
// phoneNumberStatuses parses --status values, such as active.
func phoneNumberStatuses(names []string) ([]livekit.PhoneNumberStatus, error) {
var statuses []livekit.PhoneNumberStatus
for _, status := range names {
statusValue, ok := livekit.PhoneNumberStatus_value["PHONE_NUMBER_STATUS_"+strings.ToUpper(status)]
if !ok {
return nil, fmt.Errorf("invalid status: %s", status)
}
statuses = append(statuses, livekit.PhoneNumberStatus(statusValue))
}
return statuses, nil
}

return listAndPrint(ctx, cmd, func(ctx context.Context, req *livekit.ListPhoneNumbersRequest) (*livekit.ListPhoneNumbersResponse, error) {
return client.ListPhoneNumbers(ctx, req)
}, req, []string{
"ID", "E164", "Country", "Area Code", "Type", "Locality", "Region", "Capabilities", "Status", "Inbound", "Outbound", "SIP Dispatch Rules",
}, func(item *livekit.PhoneNumber) []string {
dispatchRulesStr := ""
if len(item.SipDispatchRuleIds) > 0 {
dispatchRulesStr = strings.Join(item.SipDispatchRuleIds, ", ")
} else {
dispatchRulesStr = "-"
}
statusIn := ""
if st := item.InboundStatus; st != livekit.PhoneNumberInboundStatus_PHONE_NUMBER_IN_STATUS_UNSPECIFIED {
statusIn = strings.TrimPrefix(st.String(), "PHONE_NUMBER_IN_STATUS_")
}
statusOut := ""
if st := item.OutboundStatus; st != livekit.PhoneNumberOutboundStatus_PHONE_NUMBER_OUT_STATUS_UNSPECIFIED {
statusOut = strings.TrimPrefix(st.String(), "PHONE_NUMBER_OUT_STATUS_")
}
return []string{
item.Id,
item.E164Format,
item.CountryCode,
item.AreaCode,
strings.TrimPrefix(item.NumberType.String(), "PHONE_NUMBER_TYPE_"),
item.Locality,
item.Region,
strings.Join(item.Capabilities, ","),
strings.TrimPrefix(item.Status.String(), "PHONE_NUMBER_STATUS_"),
statusIn,
statusOut,
dispatchRulesStr,
}
})
var phoneNumberListHeaders = []string{
"ID", "E164", "Country", "Area Code", "Type", "Locality", "Region", "Capabilities", "Status", "Inbound", "Outbound", "SIP Dispatch Rules",
}

func phoneNumberListRow(item *livekit.PhoneNumber) []string {
dispatchRulesStr := ""
if len(item.SipDispatchRuleIds) > 0 {
dispatchRulesStr = strings.Join(item.SipDispatchRuleIds, ", ")
} else {
dispatchRulesStr = "-"
}
statusIn := ""
if st := item.InboundStatus; st != livekit.PhoneNumberInboundStatus_PHONE_NUMBER_IN_STATUS_UNSPECIFIED {
statusIn = strings.TrimPrefix(st.String(), "PHONE_NUMBER_IN_STATUS_")
}
statusOut := ""
if st := item.OutboundStatus; st != livekit.PhoneNumberOutboundStatus_PHONE_NUMBER_OUT_STATUS_UNSPECIFIED {
statusOut = strings.TrimPrefix(st.String(), "PHONE_NUMBER_OUT_STATUS_")
}
return []string{
item.Id,
item.E164Format,
item.CountryCode,
item.AreaCode,
strings.TrimPrefix(item.NumberType.String(), "PHONE_NUMBER_TYPE_"),
item.Locality,
item.Region,
strings.Join(item.Capabilities, ","),
strings.TrimPrefix(item.Status.String(), "PHONE_NUMBER_STATUS_"),
statusIn,
statusOut,
dispatchRulesStr,
}
}

func getPhoneNumber(ctx context.Context, cmd *cli.Command) error {
Expand Down Expand Up @@ -403,6 +455,7 @@ func getPhoneNumber(ctx context.Context, cmd *cli.Command) error {
out.Resultf("Phone Number Details:\n")
out.Resultf(" ID: %s\n", item.Id)
out.Resultf(" E164 Format: %s\n", item.E164Format)
out.Resultf(" Name: %s\n", item.Name)
out.Resultf(" Country: %s\n", item.CountryCode)
out.Resultf(" Area Code: %s\n", item.AreaCode)
out.Resultf(" Type: %s\n", strings.TrimPrefix(item.NumberType.String(), "PHONE_NUMBER_TYPE_"))
Expand Down Expand Up @@ -445,6 +498,10 @@ func updatePhoneNumber(ctx context.Context, cmd *cli.Command) error {
if dispatchRuleID != "" {
req.SipDispatchRuleId = &dispatchRuleID
}
if cmd.IsSet("name") {
name := cmd.String("name")
req.Name = &name
}

resp, err := client.UpdatePhoneNumber(ctx, req)
if err != nil {
Expand All @@ -467,6 +524,7 @@ func updatePhoneNumber(ctx context.Context, cmd *cli.Command) error {
out.Resultf("Successfully updated phone number:\n")
out.Resultf(" ID: %s\n", item.Id)
out.Resultf(" E164 Format: %s\n", item.E164Format)
out.Resultf(" Name: %s\n", item.Name)
out.Resultf(" Status: %s\n", strings.TrimPrefix(item.Status.String(), "PHONE_NUMBER_STATUS_"))
out.Resultf(" SIP Dispatch Rules: %s\n", dispatchRulesStr)

Expand Down Expand Up @@ -502,10 +560,18 @@ func releasePhoneNumbers(ctx context.Context, cmd *cli.Command) error {
}

if len(ids) > 0 {
out.Resultf("Successfully released %d phone numbers by ID: %s\n", len(ids), strings.Join(ids, ", "))
out.Resultf("Successfully released %s by ID: %s\n", phoneNumbersCount(len(ids)), strings.Join(ids, ", "))
} else {
out.Resultf("Successfully released %d phone numbers: %s\n", len(phoneNumbers), strings.Join(phoneNumbers, ", "))
out.Resultf("Successfully released %s: %s\n", phoneNumbersCount(len(phoneNumbers)), strings.Join(phoneNumbers, ", "))
}

return nil
}

// phoneNumbersCount is n with the noun, such as "1 phone number".
func phoneNumbersCount(n int) string {
if n == 1 {
return "1 phone number"
}
return fmt.Sprintf("%d phone numbers", n)
}
24 changes: 24 additions & 0 deletions cmd/lk/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ var publicAPIRoutes = []struct {
{http.MethodDelete, regexp.MustCompile(`^/v0/projects/[^/]+/keys/[^/]+$`), func() any { return new(oapi.LivekitPublicapiProjectsV1DeleteKeyResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/members$`), func() any { return new(oapi.LivekitPublicapiProjectsV1ListMembersResponse) }},
{http.MethodDelete, regexp.MustCompile(`^/v0/projects/[^/]+/members/[^/]+$`), func() any { return new(oapi.LivekitPublicapiProjectsV1RemoveMemberResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/workspaces/[^/]+$`), func() any { return new(oapi.LivekitPublicapiWorkspacesV1GetWorkspaceResponse) }},
{http.MethodDelete, regexp.MustCompile(`^/v0/workspaces/[^/]+/members/[^/]+$`), func() any { return new(oapi.LivekitPublicapiWorkspacesV1DeleteMemberResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sessions$`), func() any { return new(oapi.LivekitPublicapiAnalyticsV1SessionsListResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sessions/[^/]+$`), func() any { return new(oapi.LivekitPublicapiAnalyticsV1SessionsGetResponse) }},
Expand All @@ -334,6 +335,29 @@ var publicAPIRoutes = []struct {
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sessions/[^/]+/logs$`), func() any { return new(oapi.LivekitPublicapiObservabilityV1LogsGetResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sessions/[^/]+/traces$`), func() any { return new(oapi.LivekitPublicapiObservabilityV1TracesGetResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sessions/[^/]+/metrics$`), func() any { return new(oapi.LivekitPublicapiObservabilityV1MetricsGetResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sip/inbound-trunks$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1InboundTrunksListResponse) }},
{http.MethodPost, regexp.MustCompile(`^/v0/projects/[^/]+/sip/inbound-trunks$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1InboundTrunksCreateResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sip/inbound-trunks/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1InboundTrunksGetResponse) }},
{http.MethodPatch, regexp.MustCompile(`^/v0/projects/[^/]+/sip/inbound-trunks/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1InboundTrunksUpdateResponse) }},
{http.MethodDelete, regexp.MustCompile(`^/v0/projects/[^/]+/sip/inbound-trunks/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1InboundTrunksDeleteResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sip/outbound-trunks$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1OutboundTrunksListResponse) }},
{http.MethodPost, regexp.MustCompile(`^/v0/projects/[^/]+/sip/outbound-trunks$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1OutboundTrunksCreateResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sip/outbound-trunks/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1OutboundTrunksGetResponse) }},
{http.MethodPatch, regexp.MustCompile(`^/v0/projects/[^/]+/sip/outbound-trunks/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1OutboundTrunksUpdateResponse) }},
{http.MethodDelete, regexp.MustCompile(`^/v0/projects/[^/]+/sip/outbound-trunks/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1OutboundTrunksDeleteResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sip/dispatch-rules$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1DispatchRulesListResponse) }},
{http.MethodPost, regexp.MustCompile(`^/v0/projects/[^/]+/sip/dispatch-rules$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1DispatchRulesCreateResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/sip/dispatch-rules/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1DispatchRulesGetResponse) }},
{http.MethodPatch, regexp.MustCompile(`^/v0/projects/[^/]+/sip/dispatch-rules/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1DispatchRulesUpdateResponse) }},
{http.MethodDelete, regexp.MustCompile(`^/v0/projects/[^/]+/sip/dispatch-rules/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1DispatchRulesDeleteResponse) }},
{http.MethodPost, regexp.MustCompile(`^/v0/projects/[^/]+/sip/participants$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1SIPParticipantsCreateResponse) }},
{http.MethodPost, regexp.MustCompile(`^/v0/projects/[^/]+/sip/participants:transfer$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1SIPParticipantsTransferResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/phone-numbers:search$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1PhoneNumbersSearchResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/phone-numbers$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1PhoneNumbersListResponse) }},
{http.MethodPost, regexp.MustCompile(`^/v0/projects/[^/]+/phone-numbers$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1PhoneNumbersPurchaseResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/projects/[^/]+/phone-numbers/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1PhoneNumbersGetResponse) }},
{http.MethodPatch, regexp.MustCompile(`^/v0/projects/[^/]+/phone-numbers/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1PhoneNumbersUpdateResponse) }},
{http.MethodDelete, regexp.MustCompile(`^/v0/projects/[^/]+/phone-numbers/[^/]+$`), func() any { return new(oapi.LivekitPublicapiTelephonyV1PhoneNumbersReleaseResponse) }},
{http.MethodGet, regexp.MustCompile(`^/v0/users/me$`), func() any { return new(oapi.LivekitPublicapiUsersV1GetCurrentUserResponse) }},
{http.MethodDelete, regexp.MustCompile(`^/v0/users/me/session-token$`), func() any { return new(oapi.LivekitPublicapiUsersV1SessionTokenRevokeResponse) }},
}
Expand Down
Loading
Loading