import { APIResource } from "../../../../../core/resource.js";
import * as RolesAPI from "./roles.js";
import { RoleCreateParams, RoleCreateResponse, RoleDeleteParams, RoleDeleteResponse, RoleListParams, RoleListResponse, RoleListResponsesPage, RoleRetrieveParams, RoleRetrieveResponse, Roles } from "./roles.js";
import { APIPromise } from "../../../../../core/api-promise.js";
import { NextCursorPage, type NextCursorPageParams, PagePromise } from "../../../../../core/pagination.js";
import { RequestOptions } from "../../../../../internal/request-options.js";
export declare class Groups extends APIResource {
    roles: RolesAPI.Roles;
    /**
     * Grants a group access to a project.
     *
     * @example
     * ```ts
     * const projectGroup =
     *   await client.admin.organization.projects.groups.create(
     *     'project_id',
     *     { group_id: 'group_id', role: 'role' },
     *   );
     * ```
     */
    create(projectID: string, body: GroupCreateParams, options?: RequestOptions): APIPromise<ProjectGroup>;
    /**
     * Retrieves a project's group.
     *
     * @example
     * ```ts
     * const projectGroup =
     *   await client.admin.organization.projects.groups.retrieve(
     *     'group_id',
     *     { project_id: 'project_id' },
     *   );
     * ```
     */
    retrieve(groupID: string, params: GroupRetrieveParams, options?: RequestOptions): APIPromise<ProjectGroup>;
    /**
     * Lists the groups that have access to a project.
     *
     * @example
     * ```ts
     * // Automatically fetches more pages as needed.
     * for await (const projectGroup of client.admin.organization.projects.groups.list(
     *   'project_id',
     * )) {
     *   // ...
     * }
     * ```
     */
    list(projectID: string, query?: GroupListParams | null | undefined, options?: RequestOptions): PagePromise<ProjectGroupsPage, ProjectGroup>;
    /**
     * Revokes a group's access to a project.
     *
     * @example
     * ```ts
     * const group =
     *   await client.admin.organization.projects.groups.delete(
     *     'group_id',
     *     { project_id: 'project_id' },
     *   );
     * ```
     */
    delete(groupID: string, params: GroupDeleteParams, options?: RequestOptions): APIPromise<GroupDeleteResponse>;
}
export type ProjectGroupsPage = NextCursorPage<ProjectGroup>;
/**
 * Details about a group's membership in a project.
 */
export interface ProjectGroup {
    /**
     * Unix timestamp (in seconds) when the group was granted project access.
     */
    created_at: number;
    /**
     * Identifier of the group that has access to the project.
     */
    group_id: string;
    /**
     * Display name of the group.
     */
    group_name: string;
    /**
     * The type of the group.
     */
    group_type: 'group' | 'tenant_group';
    /**
     * Always `project.group`.
     */
    object: 'project.group';
    /**
     * Identifier of the project.
     */
    project_id: string;
}
/**
 * Confirmation payload returned after removing a group from a project.
 */
export interface GroupDeleteResponse {
    /**
     * Whether the group membership in the project was removed.
     */
    deleted: boolean;
    /**
     * Always `project.group.deleted`.
     */
    object: 'project.group.deleted';
}
export interface GroupCreateParams {
    /**
     * Identifier of the group to add to the project.
     */
    group_id: string;
    /**
     * Identifier of the project role to grant to the group.
     */
    role: string;
}
export interface GroupRetrieveParams {
    /**
     * Path param: The ID of the project to inspect.
     */
    project_id: string;
    /**
     * Query param: The type of group to retrieve.
     */
    group_type?: 'group' | 'tenant_group';
}
export interface GroupListParams extends NextCursorPageParams {
    /**
     * Sort order for the returned groups.
     */
    order?: 'asc' | 'desc';
}
export interface GroupDeleteParams {
    /**
     * The ID of the project to update.
     */
    project_id: string;
}
export declare namespace Groups {
    export { type ProjectGroup as ProjectGroup, type GroupDeleteResponse as GroupDeleteResponse, type ProjectGroupsPage as ProjectGroupsPage, type GroupCreateParams as GroupCreateParams, type GroupRetrieveParams as GroupRetrieveParams, type GroupListParams as GroupListParams, type GroupDeleteParams as GroupDeleteParams, };
    export { Roles as Roles, type RoleCreateResponse as RoleCreateResponse, type RoleRetrieveResponse as RoleRetrieveResponse, type RoleListResponse as RoleListResponse, type RoleDeleteResponse as RoleDeleteResponse, type RoleListResponsesPage as RoleListResponsesPage, type RoleCreateParams as RoleCreateParams, type RoleRetrieveParams as RoleRetrieveParams, type RoleListParams as RoleListParams, type RoleDeleteParams as RoleDeleteParams, };
}
//# sourceMappingURL=groups.d.ts.map