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

export interface paths {
    "/api/identity/roles": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /**
         * Add role holder
         * @description Assigns a role to a user identified by email.
         */
        post: operations["addRoleHolder"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/identity/roles/{id}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        post?: never;
        /**
         * Delete role
         * @description Removes a role assignment by ID.
         */
        delete: operations["deleteRole"];
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/identity/orgs/{orgId}/roles": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Get organization roles
         * @description Returns all roles defined for the specified organization.
         */
        get: operations["getAllRoles"];
        /**
         * Bulk edit role holders
         * @description Updates role assignments for multiple users in the organization.
         */
        put: operations["bulkEditRoleHolder"];
        /**
         * Upsert organization role
         * @description Creates or updates a role for the specified organization.
         */
        post: operations["upsertRole"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/identity/orgs/{orgId}/roles/{roleId}/keychains": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Get keychains for role
         * @description Returns all keychains assigned to the specified role.
         */
        get: operations["getRoleKeychains"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/identity/orgs/{orgId}/roles/{roleId}/keychains/{keychainId}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /**
         * Assign keychain to role
         * @description Associates a keychain with the specified role.
         */
        post: operations["assignKeychainToRole"];
        /**
         * Unassign keychain from role
         * @description Removes the association between a keychain and a role.
         */
        delete: operations["unassignKeychainFromRole"];
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
}
export type webhooks = Record<string, never>;
export interface components {
    schemas: {
        /** @description Role definition */
        Role: {
            /**
             * Format: uuid
             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
             */
            id?: string;
            /** @description Unique name of the role. */
            role_name: string;
            /** @description Human-readable description of the role. */
            description: string;
            /**
             * 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;
            /**
             * Format: date-time
             * @description Timestamp when the role was soft-deleted.
             */
            deleted_at?: string;
        };
        /** @description A paginated list of roles. */
        RolesPage: {
            /** @description Current page number (zero-based). */
            page: number;
            /** @description Number of roles per page. */
            page_size: number;
            /** @description Total number of roles across all pages. */
            total_count: number;
            /** @description The roles of the rolespage. */
            roles: {
                /**
                 * Format: uuid
                 * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                 */
                id?: string;
                /** @description Unique name of the role. */
                role_name: string;
                /** @description Human-readable description of the role. */
                description: string;
                /**
                 * 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;
                /**
                 * Format: date-time
                 * @description Timestamp when the role was soft-deleted.
                 */
                deleted_at?: string;
            }[];
        };
        /** @description Mapping between a role and a keychain. */
        RolesKeychainsMapping: {
            /**
             * Format: uuid
             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
             */
            id: string;
            /**
             * Format: uuid
             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
             */
            keychain_id: string;
            /**
             * Format: uuid
             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
             */
            role_id: string;
            /**
             * 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;
            /**
             * Format: date-time
             * @description SQL null Timestamp to handle null values of time.
             */
            deleted_at?: string;
        };
        /** @description Request body for assigning a role to a user. */
        RoleHolderRequest: {
            /**
             * Format: email
             * @description Email of the user to assign roles to.
             */
            email: string;
            /** @description List of role names to assign. */
            roleNames: string[];
        };
        /** @description Request to update role assignments for a user. */
        UserRoleUpdateRequest: {
            /**
             * Format: uuid
             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
             */
            id?: string;
            /**
             * Format: uuid
             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
             */
            user_id?: string;
            /** @description The username of the userroleupdaterequest. */
            username?: string;
            /**
             * Format: email
             * @description Email address.
             */
            email?: string;
            /** @description The first name of the userroleupdaterequest. */
            firstName?: string;
            /** @description The last name of the userroleupdaterequest. */
            lastName?: string;
            /** @description Current status of the resource. */
            status?: string;
            /** @description The role names of the userroleupdaterequest. */
            roleNames?: string[];
            /** Format: date-time */
            created_at?: string;
            /** Format: date-time */
            updated_at?: string;
            /**
             * Format: date-time
             * @description SQL null Timestamp to handle null values of time.
             */
            deleted_at?: string;
        };
        /** @description User notification preferences. */
        Preference: {
            /** @description Whether to send a welcome email to new users. */
            welcomeEmail: boolean;
            /** @description Whether to notify the user of role changes. */
            notifyRoleChange: boolean;
        };
    };
    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 Role ID */
        id: string;
        /** @description Organization ID */
        orgId: string;
        /** @description Role ID */
        roleId: string;
        /** @description Keychain ID */
        keychainId: 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 Get all possible entries */
        all: boolean;
        /** @description Role grouping selector such as provider, organization, or team. */
        selector: string;
        /** @description Team ID used when selector is team. */
        teamId: string;
    };
    requestBodies: never;
    headers: never;
    pathItems: never;
}
export type $defs = Record<string, never>;
export interface operations {
    addRoleHolder: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    /**
                     * Format: email
                     * @description Email of the user to assign roles to.
                     */
                    email: string;
                    /** @description List of role names to assign. */
                    roleNames: string[];
                };
            };
        };
        responses: {
            /** @description Role holder added */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @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;
                };
            };
        };
    };
    deleteRole: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Role ID */
                id: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Role deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @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;
                };
            };
        };
    };
    getAllRoles: {
        parameters: {
            query?: {
                /** @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 Get all possible entries */
                all?: boolean;
                /** @description Role grouping selector such as provider, organization, or team. */
                selector?: string;
                /** @description Team ID used when selector is team. */
                teamId?: string;
            };
            header?: never;
            path: {
                /** @description Organization ID */
                orgId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Roles response */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        /** @description Current page number (zero-based). */
                        page: number;
                        /** @description Number of roles per page. */
                        page_size: number;
                        /** @description Total number of roles across all pages. */
                        total_count: number;
                        /** @description The roles of the rolespage. */
                        roles: {
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            id?: string;
                            /** @description Unique name of the role. */
                            role_name: string;
                            /** @description Human-readable description of the role. */
                            description: string;
                            /**
                             * 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;
                            /**
                             * Format: date-time
                             * @description Timestamp when the role was soft-deleted.
                             */
                            deleted_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;
                };
            };
        };
    };
    bulkEditRoleHolder: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Organization ID */
                orgId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    /**
                     * Format: uuid
                     * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                     */
                    id?: string;
                    /**
                     * Format: uuid
                     * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                     */
                    user_id?: string;
                    /** @description The username of the userroleupdaterequest. */
                    username?: string;
                    /**
                     * Format: email
                     * @description Email address.
                     */
                    email?: string;
                    /** @description The first name of the userroleupdaterequest. */
                    firstName?: string;
                    /** @description The last name of the userroleupdaterequest. */
                    lastName?: string;
                    /** @description Current status of the resource. */
                    status?: string;
                    /** @description The role names of the userroleupdaterequest. */
                    roleNames?: string[];
                    /** Format: date-time */
                    created_at?: string;
                    /** Format: date-time */
                    updated_at?: string;
                    /**
                     * Format: date-time
                     * @description SQL null Timestamp to handle null values of time.
                     */
                    deleted_at?: string;
                }[];
            };
        };
        responses: {
            /** @description Role holders updated */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @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;
                };
            };
        };
    };
    upsertRole: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Organization ID */
                orgId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    /**
                     * Format: uuid
                     * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                     */
                    id?: string;
                    /** @description Unique name of the role. */
                    role_name: string;
                    /** @description Human-readable description of the role. */
                    description: string;
                    /**
                     * 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;
                    /**
                     * Format: date-time
                     * @description Timestamp when the role was soft-deleted.
                     */
                    deleted_at?: string;
                };
            };
        };
        responses: {
            /** @description Role upserted */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        /**
                         * Format: uuid
                         * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                         */
                        id?: string;
                        /** @description Unique name of the role. */
                        role_name: string;
                        /** @description Human-readable description of the role. */
                        description: string;
                        /**
                         * 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;
                        /**
                         * Format: date-time
                         * @description Timestamp when the role was soft-deleted.
                         */
                        deleted_at?: string;
                    };
                };
            };
            /** @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;
                };
            };
        };
    };
    getRoleKeychains: {
        parameters: {
            query?: {
                /** @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: {
                /** @description Organization ID */
                orgId: string;
                /** @description Role ID */
                roleId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Keychains response */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        page: number;
                        page_size: number;
                        total_count: number;
                        /** @description The keychains of the keychainpage. */
                        keychains: {
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            id: string;
                            /** @description Name of the keychain. */
                            name: string;
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            owner: string;
                            /**
                             * 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;
                            /**
                             * Format: date-time
                             * @description SQL null Timestamp to handle null values of time.
                             */
                            deleted_at?: string;
                        }[];
                    };
                };
            };
            /** @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;
                };
            };
        };
    };
    assignKeychainToRole: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Organization ID */
                orgId: string;
                /** @description Role ID */
                roleId: string;
                /** @description Keychain ID */
                keychainId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Keychain assigned to role */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @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;
                };
            };
        };
    };
    unassignKeychainFromRole: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Organization ID */
                orgId: string;
                /** @description Role ID */
                roleId: string;
                /** @description Keychain ID */
                keychainId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Keychain unassigned from role */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @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;
                };
            };
        };
    };
}
