/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */

export interface paths {
    "/api/identity/tokens": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Get tokens
         * @description Retrieves tokens associated with the authenticated user.
         */
        get: operations["getUserTokens"];
        put?: never;
        /**
         * Generate token
         * @description Generates a token for the authenticated user.
         */
        post: operations["generateToken"];
        /**
         * Delete token
         * @description Deletes a specific token for the authenticated user.
         */
        delete: operations["deleteUserToken"];
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/identity/tokens/{id}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Get token by ID
         * @description Retrieves a specific token by its ID.
         */
        get: operations["getUserTokensById"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/identity/tokens/infinite": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Issue indefinite lifetime token
         * @description Creates a non-expiring user token for provider admin use cases.
         */
        get: operations["issueIndefiniteLifetimeToken"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
}
export type webhooks = Record<string, never>;
export interface components {
    schemas: {
        /** @description Represents a user-owned API token or OAuth session. */
        UserToken: {
            /**
             * Format: uuid
             * @description Unique identifier for the token.
             */
            id?: string;
            /**
             * Format: uuid
             * @description UUID of the user who owns the token.
             */
            user_id?: string;
            /** @description Authentication provider associated with the token. */
            provider?: string;
            /** @description Access token value. */
            access_token?: string;
            /** @description Refresh token value when applicable. */
            refresh_token?: string;
            /** @description Human-readable token name. */
            name?: string;
            /** @description Purpose for which the token was created. */
            purpose?: string;
            /** @description Whether this entry represents an OAuth session. */
            is_oauth?: boolean;
            /**
             * Format: date-time
             * @description Timestamp when the resource was created.
             */
            created_at?: string;
            /**
             * Format: date-time
             * @description Timestamp when the resource was updated.
             */
            updated_at?: string;
        };
        /** @description A paginated list of tokens. */
        TokenPage: {
            tokens: {
                /**
                 * Format: uuid
                 * @description Unique identifier for the token.
                 */
                id?: string;
                /**
                 * Format: uuid
                 * @description UUID of the user who owns the token.
                 */
                user_id?: string;
                /** @description Authentication provider associated with the token. */
                provider?: string;
                /** @description Access token value. */
                access_token?: string;
                /** @description Refresh token value when applicable. */
                refresh_token?: string;
                /** @description Human-readable token name. */
                name?: string;
                /** @description Purpose for which the token was created. */
                purpose?: string;
                /** @description Whether this entry represents an OAuth session. */
                is_oauth?: boolean;
                /**
                 * Format: date-time
                 * @description Timestamp when the resource was created.
                 */
                created_at?: string;
                /**
                 * Format: date-time
                 * @description Timestamp when the resource was updated.
                 */
                updated_at?: string;
            }[];
            /** @description Total number of tokens across all pages. */
            total_count: number;
            /** @description Current page number (zero-based). */
            page: number;
            /** @description Number of tokens per page. */
            page_size: number;
        };
    };
    responses: {
        /** @description Invalid request body or request param */
        400: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "text/plain": string;
            };
        };
        /** @description Expired JWT token used or insufficient privilege */
        401: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "text/plain": string;
            };
        };
        /** @description Result not found */
        404: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "text/plain": string;
            };
        };
        /** @description Internal server error */
        500: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "text/plain": string;
            };
        };
    };
    parameters: {
        /** @description Token ID */
        id: string;
        /** @description Get responses by page */
        page: string;
        /** @description Get responses by pagesize */
        pagesize: string;
        /** @description Get responses that match search param value */
        search: string;
        /** @description Get ordered responses */
        order: string;
        /** @description Whether to retrieve OAuth-backed sessions instead of API tokens. */
        isOAuth: boolean;
        /** @description Name of the token. */
        name: string;
        /** @description Purpose for which the token is generated. */
        purpose: string;
        /** @description ID of the token. */
        tokenId: string;
        /** @description UUID of the user. */
        userId: string;
        /** @description Remote provider. */
        provider: string;
    };
    requestBodies: never;
    headers: never;
    pathItems: never;
}
export type $defs = Record<string, never>;
export interface operations {
    getUserTokens: {
        parameters: {
            query?: {
                /** @description Whether to retrieve OAuth-backed sessions instead of API tokens. */
                isOAuth?: boolean;
                /** @description Get responses by page */
                page?: string;
                /** @description Get responses by pagesize */
                pagesize?: string;
                /** @description Get responses that match search param value */
                search?: string;
                /** @description Get ordered responses */
                order?: string;
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Tokens response */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        tokens: {
                            /**
                             * Format: uuid
                             * @description Unique identifier for the token.
                             */
                            id?: string;
                            /**
                             * Format: uuid
                             * @description UUID of the user who owns the token.
                             */
                            user_id?: string;
                            /** @description Authentication provider associated with the token. */
                            provider?: string;
                            /** @description Access token value. */
                            access_token?: string;
                            /** @description Refresh token value when applicable. */
                            refresh_token?: string;
                            /** @description Human-readable token name. */
                            name?: string;
                            /** @description Purpose for which the token was created. */
                            purpose?: string;
                            /** @description Whether this entry represents an OAuth session. */
                            is_oauth?: boolean;
                            /**
                             * Format: date-time
                             * @description Timestamp when the resource was created.
                             */
                            created_at?: string;
                            /**
                             * Format: date-time
                             * @description Timestamp when the resource was updated.
                             */
                            updated_at?: string;
                        }[];
                        /** @description Total number of tokens across all pages. */
                        total_count: number;
                        /** @description Current page number (zero-based). */
                        page: number;
                        /** @description Number of tokens per page. */
                        page_size: number;
                    };
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
    generateToken: {
        parameters: {
            query: {
                /** @description Name of the token. */
                name: string;
                /** @description Purpose for which the token is generated. */
                purpose?: string;
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Token generated */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        tokens: {
                            /**
                             * Format: uuid
                             * @description Unique identifier for the token.
                             */
                            id?: string;
                            /**
                             * Format: uuid
                             * @description UUID of the user who owns the token.
                             */
                            user_id?: string;
                            /** @description Authentication provider associated with the token. */
                            provider?: string;
                            /** @description Access token value. */
                            access_token?: string;
                            /** @description Refresh token value when applicable. */
                            refresh_token?: string;
                            /** @description Human-readable token name. */
                            name?: string;
                            /** @description Purpose for which the token was created. */
                            purpose?: string;
                            /** @description Whether this entry represents an OAuth session. */
                            is_oauth?: boolean;
                            /**
                             * Format: date-time
                             * @description Timestamp when the resource was created.
                             */
                            created_at?: string;
                            /**
                             * Format: date-time
                             * @description Timestamp when the resource was updated.
                             */
                            updated_at?: string;
                        }[];
                        /** @description Total number of tokens across all pages. */
                        total_count: number;
                        /** @description Current page number (zero-based). */
                        page: number;
                        /** @description Number of tokens per page. */
                        page_size: number;
                    };
                };
            };
            /** @description Invalid request body or request param */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
    deleteUserToken: {
        parameters: {
            query: {
                /** @description ID of the token. */
                token_id: string;
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Token deleted */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        tokens: {
                            /**
                             * Format: uuid
                             * @description Unique identifier for the token.
                             */
                            id?: string;
                            /**
                             * Format: uuid
                             * @description UUID of the user who owns the token.
                             */
                            user_id?: string;
                            /** @description Authentication provider associated with the token. */
                            provider?: string;
                            /** @description Access token value. */
                            access_token?: string;
                            /** @description Refresh token value when applicable. */
                            refresh_token?: string;
                            /** @description Human-readable token name. */
                            name?: string;
                            /** @description Purpose for which the token was created. */
                            purpose?: string;
                            /** @description Whether this entry represents an OAuth session. */
                            is_oauth?: boolean;
                            /**
                             * Format: date-time
                             * @description Timestamp when the resource was created.
                             */
                            created_at?: string;
                            /**
                             * Format: date-time
                             * @description Timestamp when the resource was updated.
                             */
                            updated_at?: string;
                        }[];
                        /** @description Total number of tokens across all pages. */
                        total_count: number;
                        /** @description Current page number (zero-based). */
                        page: number;
                        /** @description Number of tokens per page. */
                        page_size: number;
                    };
                };
            };
            /** @description Invalid request body or request param */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
    getUserTokensById: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Token ID */
                id: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Token response */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        /**
                         * Format: uuid
                         * @description Unique identifier for the token.
                         */
                        id?: string;
                        /**
                         * Format: uuid
                         * @description UUID of the user who owns the token.
                         */
                        user_id?: string;
                        /** @description Authentication provider associated with the token. */
                        provider?: string;
                        /** @description Access token value. */
                        access_token?: string;
                        /** @description Refresh token value when applicable. */
                        refresh_token?: string;
                        /** @description Human-readable token name. */
                        name?: string;
                        /** @description Purpose for which the token was created. */
                        purpose?: string;
                        /** @description Whether this entry represents an OAuth session. */
                        is_oauth?: boolean;
                        /**
                         * Format: date-time
                         * @description Timestamp when the resource was created.
                         */
                        created_at?: string;
                        /**
                         * Format: date-time
                         * @description Timestamp when the resource was updated.
                         */
                        updated_at?: string;
                    };
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Result not found */
            404: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
    issueIndefiniteLifetimeToken: {
        parameters: {
            query: {
                /** @description UUID of the user. */
                user_id: string;
                /** @description Remote provider. */
                provider: string;
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Token generated */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        tokens: {
                            /**
                             * Format: uuid
                             * @description Unique identifier for the token.
                             */
                            id?: string;
                            /**
                             * Format: uuid
                             * @description UUID of the user who owns the token.
                             */
                            user_id?: string;
                            /** @description Authentication provider associated with the token. */
                            provider?: string;
                            /** @description Access token value. */
                            access_token?: string;
                            /** @description Refresh token value when applicable. */
                            refresh_token?: string;
                            /** @description Human-readable token name. */
                            name?: string;
                            /** @description Purpose for which the token was created. */
                            purpose?: string;
                            /** @description Whether this entry represents an OAuth session. */
                            is_oauth?: boolean;
                            /**
                             * Format: date-time
                             * @description Timestamp when the resource was created.
                             */
                            created_at?: string;
                            /**
                             * Format: date-time
                             * @description Timestamp when the resource was updated.
                             */
                            updated_at?: string;
                        }[];
                        /** @description Total number of tokens across all pages. */
                        total_count: number;
                        /** @description Current page number (zero-based). */
                        page: number;
                        /** @description Number of tokens per page. */
                        page_size: number;
                    };
                };
            };
            /** @description Invalid request body or request param */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
}
