UNPKG

@aashari/mcp-server-aws-sso

Version:

Node.js/TypeScript MCP server for AWS Single Sign-On (SSO). Enables AI systems (LLMs) with tools to initiate SSO login (device auth flow), list accounts/roles, and securely execute AWS CLI commands using temporary credentials. Streamlines AI interaction w

70 lines (69 loc) 1.88 kB
/** * Types of pagination mechanisms used by different APIs */ export declare enum PaginationType { /** * Offset-based pagination (startAt, maxResults, total) * Used by many REST APIs including Jira */ OFFSET = "offset", /** * Cursor-based pagination (cursor in URL) * Used by many modern APIs including Confluence */ CURSOR = "cursor", /** * Page-based pagination (page parameter in URL) * Used by many APIs including Bitbucket */ PAGE = "page" } /** * Structure for offset-based pagination data */ export interface OffsetPaginationData { startAt?: number; maxResults?: number; total?: number; nextPage?: string; values?: unknown[]; } /** * Structure for cursor-based pagination data */ export interface CursorPaginationData { _links: { next?: string; }; results?: unknown[]; } /** * Structure for page-based pagination data */ export interface PagePaginationData { next?: string; values?: unknown[]; } /** * Union type for all pagination data types */ export type PaginationData = OffsetPaginationData | CursorPaginationData | PagePaginationData; /** * Response pagination information */ export interface ResponsePagination { /** The next cursor value (if applicable) */ nextCursor?: string; /** Whether there are more results available */ hasMore: boolean; /** Count of items in the current batch */ count?: number; } /** * Extract pagination information from an API response * @param data API response data * @param type Pagination type (offset, cursor, or page) * @param source Optional source identifier for logging * @returns Response pagination information */ export declare function extractPaginationInfo<T extends Record<string, unknown>>(data: T, type: PaginationType, source?: string): ResponsePagination;