/**
 * Business Manager role operations for B2C Commerce instances.
 *
 * Provides functions for managing instance-level access roles via OCAPI Data API.
 */
import type { B2CInstance } from '../../instance/index.js';
import type { components } from '../../clients/ocapi.generated.js';
/**
 * BM access role from OCAPI.
 */
export type BmRole = components['schemas']['role'];
/**
 * BM access roles collection from OCAPI.
 */
export type BmRoles = components['schemas']['roles'];
/**
 * BM role permissions from OCAPI.
 */
export type BmRolePermissions = components['schemas']['role_permissions'];
/**
 * Options for listing BM roles.
 */
export interface ListBmRolesOptions {
    /** Start index (default 0) */
    start?: number;
    /** Number of items to return (default 25) */
    count?: number;
}
/**
 * Options for getting a BM role.
 */
export interface GetBmRoleOptions {
    /** Expansions to apply (e.g. 'users', 'permissions') */
    expand?: string[];
}
/**
 * Lists all access roles on a B2C Commerce instance.
 *
 * @param instance - B2C instance to query
 * @param options - Pagination options
 * @returns Roles collection with pagination info
 *
 * @example
 * ```typescript
 * const roles = await listBmRoles(instance);
 * for (const role of roles.data ?? []) {
 *   console.log(role.id, role.description);
 * }
 * ```
 */
export declare function listBmRoles(instance: B2CInstance, options?: ListBmRolesOptions): Promise<BmRoles>;
/**
 * Gets details of a specific access role.
 *
 * @param instance - B2C instance to query
 * @param roleId - Role ID (e.g. "Administrator")
 * @param options - Expand options
 * @returns Role details
 *
 * @example
 * ```typescript
 * const role = await getBmRole(instance, 'Administrator', { expand: ['users'] });
 * console.log(role.id, role.user_count);
 * ```
 */
export declare function getBmRole(instance: B2CInstance, roleId: string, options?: GetBmRoleOptions): Promise<BmRole>;
/**
 * Creates a new access role on an instance.
 *
 * @param instance - B2C instance
 * @param roleId - Role ID to create
 * @param role - Role properties (description, etc.)
 * @returns Created role
 *
 * @example
 * ```typescript
 * const role = await createBmRole(instance, 'MyCustomRole', { description: 'A custom role' });
 * ```
 */
export declare function createBmRole(instance: B2CInstance, roleId: string, role?: {
    description?: string;
}): Promise<BmRole>;
/**
 * Deletes an access role from an instance.
 *
 * System roles (e.g. "Administrator", "Support") cannot be deleted.
 *
 * @param instance - B2C instance
 * @param roleId - Role ID to delete
 *
 * @example
 * ```typescript
 * await deleteBmRole(instance, 'MyCustomRole');
 * ```
 */
export declare function deleteBmRole(instance: B2CInstance, roleId: string): Promise<void>;
/**
 * Assigns a user to an access role on an instance.
 *
 * @param instance - B2C instance
 * @param roleId - Role ID to grant
 * @param login - User login (email)
 * @returns The user object after assignment
 *
 * @example
 * ```typescript
 * const user = await grantBmRole(instance, 'Administrator', 'user@example.com');
 * ```
 */
export declare function grantBmRole(instance: B2CInstance, roleId: string, login: string): Promise<components['schemas']['user']>;
/**
 * Unassigns a user from an access role on an instance.
 *
 * @param instance - B2C instance
 * @param roleId - Role ID to revoke
 * @param login - User login (email)
 *
 * @example
 * ```typescript
 * await revokeBmRole(instance, 'Administrator', 'user@example.com');
 * ```
 */
export declare function revokeBmRole(instance: B2CInstance, roleId: string, login: string): Promise<void>;
/**
 * Gets permissions assigned to an access role.
 *
 * @param instance - B2C instance
 * @param roleId - Role ID
 * @returns Role permissions object
 *
 * @example
 * ```typescript
 * const permissions = await getBmRolePermissions(instance, 'Administrator');
 * console.log(permissions.functional?.organization?.length);
 * ```
 */
export declare function getBmRolePermissions(instance: B2CInstance, roleId: string): Promise<BmRolePermissions>;
/**
 * Sets (replaces) all permissions for an access role.
 *
 * This is a full replacement — all existing permissions are replaced with the provided set.
 *
 * @param instance - B2C instance
 * @param roleId - Role ID
 * @param permissions - Complete permissions object
 * @returns Updated permissions
 *
 * @example
 * ```typescript
 * const perms = await getBmRolePermissions(instance, 'MyRole');
 * // ... modify perms ...
 * await setBmRolePermissions(instance, 'MyRole', perms);
 * ```
 */
export declare function setBmRolePermissions(instance: B2CInstance, roleId: string, permissions: BmRolePermissions): Promise<BmRolePermissions>;
