Skip to content

Conversation

@nishadmusthafa
Copy link
Contributor

No description provided.

@nishadmusthafa nishadmusthafa requested review from a team and rektdeckard October 12, 2025 17:25
Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg, just a couple of nits

return nil
}

return listAndPrint(ctx, cmd, func(ctx context.Context, req *livekit.SearchPhoneNumbersRequest) (*livekit.SearchPhoneNumbersResponse, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this is a bit hard to read. any chance to break it out?

var (
PhoneNumberCommands = []*cli.Command{
{
Name: "phonenumber",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just use number for short? wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that works well for the cli. Want to call out that the apis use phonenumber though.

Copy link
Member

@rektdeckard rektdeckard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Minor comments on naming

Comment on lines 48 to 56
&cli.IntFlag{
Name: "limit",
Usage: "Maximum number of results (default: 50)",
Value: 50,
},
&cli.StringFlag{
Name: "page-token",
Usage: "Token for pagination (empty for first page)",
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the best solution for now, but we were discussing either running implicit (behind the scenes) pagination (example here: #694) or doing a TUI pager that would abstract away having to find and pass an explicit page-token.

As it stands, will I need to format my results as --json to see the page token in order to be able to fetch the next page?

Copy link
Member

@rektdeckard rektdeckard Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mention it here because we can be pretty sure that at least a few of our customers will have hundreds of numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I haven't implemented pagination fully in the backend. I'm going to remove this param for now, fix it in the backend and then create another PR for pagination.

on the approach for pagination, for the implicit pagination, would we run into memory issues if we load large lists ? I guess I'd like to understand concerns against the page-token approach.

Usage: "Use phone number ID for direct lookup",
},
&cli.StringFlag{
Name: "phonenumber",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: number is simpler

Action: purchasePhoneNumbers,
Flags: []cli.Flag{
&cli.StringSliceFlag{
Name: "phonenumbers",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: numbers is nicer, and how we refer to them in other SIP contexts

Usage: "Use phone number IDs for direct lookup",
},
&cli.StringSliceFlag{
Name: "phonenumbers",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@nishadmusthafa nishadmusthafa merged commit f1503d9 into main Oct 14, 2025
9 checks passed
@nishadmusthafa nishadmusthafa deleted the phone-number-api branch October 14, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants