Skip to content

API Reference parrot_tools.interfaces.gigsmart.models.common

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.interfaces.gigsmart.models.common

View source

Common / shared models — Relay pagination generics and OAuth token.

All models in this module are pure Pydantic v2 data classes with no dependencies on GigSmart-specific types. They are reused across every API surface.

Class OAuthToken

Parsed OAuth 2.1 token response from the GigSmart token endpoint.

Fields:

Field Type Default Description
access_token str
token_type str 'bearer'
expires_in int
refresh_token str | None None
scope str
expires_at datetime | None None

Method OAuthToken.is_expired

Return True if the token has passed its expiry time.

is_expired() -> bool

Returns: bool

Method OAuthToken.needs_refresh

Return True if the token expires within threshold_seconds.

needs_refresh(threshold_seconds: int = 120) -> bool

Parameter Type Default Description
threshold_seconds int 120

Returns: bool

Class RelayConnection

A Relay pagination connection wrapping a list of typed edges.

Fields:

Field Type Default Description
edges list[RelayEdge[T]]
page_info RelayPageInfo

Method RelayConnection.nodes

Return the unwrapped list of node objects from all edges.

nodes() -> list[T]

Returns: list[T]

Class RelayEdge

A single edge in a Relay connection.

Fields:

Field Type Default Description
node T
cursor str | None None

Class RelayPageInfo

GraphQL Relay PageInfo fragment.

Fields:

Field Type Default Description
has_next_page bool
has_previous_page bool False
start_cursor str | None None
end_cursor str | None None

Attribute T

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally