module

RightDocuments

How a document was sent: email, mail, courier, by hand.

Constants

BASE_URL = ENV["RIGHTDOCUMENTS_URL"]? || "https://app.rightdocuments.com"
CLI_VERSION = "0.13.0"
CLIENT_ID = ENV["RIGHTDOCUMENTS_CLIENT_ID"]? || "d4803e11ec443f87854a6caec69ab50b"
DEFAULT_PROFILE = "default"
ENUM_FIELDS = {"entity_type", "formation_state", "status"}

If body is a 422 validation response with errors on entity_type, formation_state, or status, returns a multi-line hint listing the validation messages and the current catalog values. Returns nil otherwise (so the caller can fall back to its default error output).

PROFILE_NAME = /\A[A-Za-z0-9._-]+\z/
UUID_RE = /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/i

Class methods

access_token

The current profile's access token, refreshed when needed.

Source
enum_error_hint(body : String) : String | Nil
Source
host
Source
netrc_machine(profile : String = self.profile) : String

The ~/.netrc machine name for a profile. The default profile keeps the plain host, so logins from before profiles still work.

Source
oauth

Build a fresh OAuth client for the current profile. NetrcStore persists tokens at ~/.netrc.

Source
profile

The named login in use: --profile, else $RIGHTDOCUMENTS_PROFILE, else "default".

Source
profile=(profile : String)

The named login in use: --profile, else $RIGHTDOCUMENTS_PROFILE, else "default".

Source
resolve_entity_id(identifier : String) : String

Resolve an entity argument that may be a UUID or a name. When a name is given, fetches the entity list and finds the match (case-insensitive).

Source
sdk_config

Build an SDK config with the current access token. Token refresh is handled by the OAuth client transparently — this just reads the current value.

Source
select_profile(argv : Array(String)) : Nil

Takes --profile NAME or --profile=NAME from the arguments before Athena parses them, because the token store is chosen outside any one command.

Source
stored_profiles

Profiles with a stored login for this host, from the ~/.netrc machine names.

Source

Nested types