Skip to content

Add entities:info command #1

@usiegj00

Description

@usiegj00

Request

Add an entities:info command that takes either a UUID or a name and prints the full entity record. Mirror the existing -j JSON flag pattern used by entities.

Desired behavior

$ rightdocuments entities:info 5ecbafbe-229c-42cc-b604-35ffb30b5e8c
Azabudai Interactive, Inc.
  Type:           C-Corporation
  Formation:      Delaware
  Status:         Operating
  Formation date: 2024-03-12
  EIN:            ...
  Address:        ...
  Phone:          ...

$ rightdocuments entities:info "Azabudai Interactive, Inc." -j
{"id":"5ecbafbe-...","name":"Azabudai Interactive, Inc.","entity_type":"C-Corporation",...}

Lookup rule: if the argument matches the UUID format, look up by id; otherwise look up by exact name match within the token-bound organization.

Server-side dependency

The API does not currently expose GET /api/v1/entities/:id — only GET /api/v1/entities (list) and POST /api/v1/entities (create). This needs to be added to swagger/v1/swagger.yaml and Api::V1::EntitiesController in the parent repo first. Once that ships and the SDK auto-regenerates, the CLI can wire entities:info to RightDocuments::EntitiesApi#entities_show.

For name-based lookup, either:

  • (a) Pull the list and filter client-side, or
  • (b) Accept a name query param on the list endpoint server-side.

(a) is simpler and avoids a server change beyond the show endpoint.

Current behavior (for context)

$ rightdocuments entities:info 5ecbafbe-229c-42cc-b604-35ffb30b5e8c -j
Command 'entities:info' is not defined.
Did you mean one of these?
    entities
    entities:create

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions