MCPcopy Create free account
hub / github.com/auth0/auth0-cli / invitationPickerOptions

Method invitationPickerOptions

internal/cli/organizations.go:830–848  ·  view source on GitHub ↗
(ctx context.Context, orgID string)

Source from the content-addressed store, hash-verified

828}
829
830func (c *cli) invitationPickerOptions(ctx context.Context, orgID string) (pickerOptions, error) {
831 orgInvitations, err := c.api.Organization.Invitations(ctx, url.PathEscape(orgID))
832 if err != nil {
833 return nil, err
834 }
835
836 var opts pickerOptions
837 for _, inv := range orgInvitations.OrganizationInvitations {
838 id := inv.GetID()
839 label := fmt.Sprintf("%s %s", inv.Invitee.GetEmail(), ansi.Faint("("+id+")"))
840 opts = append(opts, pickerOption{value: id, label: label})
841 }
842
843 if len(opts) == 0 {
844 return nil, errors.New("there are currently no invitations to choose from")
845 }
846
847 return opts, nil
848}
849
850func formatOrganizationDetailsPath(id string) string {
851 if len(id) == 0 {

Calls 2

FaintFunction · 0.92
InvitationsMethod · 0.65

Tested by 1