/** This is spectacularly generated code by spectacular based on Qlik Cloud Services APIs */ import Auth from '../auth/auth.js'; import ListableResource from '../listable.js'; import type { Config } from '../types/types.js'; export type Filter = { /** The advanced filtering to be applied the query. All conditional statements within this query parameter are case insensitive. @example "(id eq \"626949b9017b657805080bbd\" or id eq \"626949bf017b657805080bbe\") and (status eq \"active\" or status eq \"deleted\")" */ filter?: string; [key: string]: any; }; /** represents a Group document @param assignedRoles - @param createdAt - The timestamp for when the group record was created. @param id - The unique identifier for the group @param idpId - The unique identifier for the source IDP. @param lastUpdatedAt - The timestamp for when the group record was last updated. @param links - Contains Links for current document @param name - The name of the group. @param status - The state of the group. @param tenantId - The tenant identifier associated with the given group @param auth - Auth object used to make requests */ export declare class Group { auth: Auth; assignedRoles?: { id: string; level: 'admin' | 'user' | string; name: string; permissions: Array; type: 'default' | string; }[]; createdAt: string; id: string; idpId?: string; lastUpdatedAt: string; links: { self: { href: string; }; }; name: string; status: 'active' | 'disabled' | string; tenantId: string; [key: string]: any; constructor({ assignedRoles, createdAt, id, idpId, lastUpdatedAt, links, name, status, tenantId, ...rest }: { assignedRoles?: { id: string; level: 'admin' | 'user' | string; name: string; permissions: Array; type: 'default' | string; }[]; createdAt: string; id: string; idpId?: string; lastUpdatedAt: string; links: { self: { href: string; }; }; name: string; status: 'active' | 'disabled' | string; tenantId: string; }, auth?: Auth); /** Delete group by id */ delete(): Promise; /** Update group by id @param data - An array of JSON Patches for a group. */ patch(data: GroupPatchSchema): Promise; } export type GroupPatch = { /** The operation to be performed. Currently "replace" is the only supported operation. @example "replace" */ op: 'replace' | string; /** Attribute name of a field of the Groups entity. @example "assignedRoles" */ path: 'assignedRoles' | string; /** The roles to assign to the group (limit of 100 roles per group). */ value: Array | Array; [key: string]: any; }; export type GroupPatchAssignedRolesRefIDs = { /** The unique role identitier @example "507f191e810c19729de860ea" */ id: string; [key: string]: any; }; export type GroupPatchSchema = Array; export type GroupPostSchema = { /** The roles to assign to the group (limit of 100 roles per group). */ assignedRoles?: Array | Array; /** The name of the group (maximum length of 256 characters). @example "Development" */ name: string; /** The status of the created group within the tenant. Defaults to active if empty. @example "active" */ status?: 'active' | string; [key: string]: any; }; export type GroupPostSchemaAssignedRolesRefIDs = { /** The unique role identitier @example "507f191e810c19729de860ea" */ id: string; [key: string]: any; }; export type GroupSettings = { /** Determines if groups should be created on login. */ autoCreateGroups: boolean; /** Contains Links for current document */ links: { self: { href: string; }; }; /** Determines if groups should be created on login. */ syncIdpGroups: boolean; systemGroups?: { '000000000000000000000001'?: { assignedRoles?: Array; createdAt?: string; enabled?: boolean; id?: '000000000000000000000001' | string; lastUpdatedAt?: string; name?: 'com.qlik.Everyone' | string; }; }; /** The unique tenant identifier. */ tenantId: string; [key: string]: any; }; export type GroupSettingsSystemGroups000000000000000000000001AssignedRoles = { /** The unique role identitier @example "507f191e810c19729de860ea" */ id: string; /** The role level @example "admin" */ level: 'admin' | 'user' | string; /** The role name @example "Developer" */ name: string; /** An array of permissions associated to a given role. @example ["app:create"] */ permissions: Array; /** The type of role @example "default" */ type: 'default' | string; [key: string]: any; }; export type SettingsPatch = { /** The operation to be performed. */ op: 'replace' | string; /** A JSON Pointer. */ path: '/autoCreateGroups' | '/syncIdpGroups' | '/systemGroups/{id}/assignedRoles' | string; /** The value to be used for this operation. */ value: boolean | Array | Array; [key: string]: any; }; export type SettingsPatchAssignedRolesRefIDs = { /** The unique role identitier @example "507f191e810c19729de860ea" */ id: string; [key: string]: any; }; export type SettingsPatchSchema = Array; export declare class Groups { auth: Auth; config: Config; constructor(config: Config | Auth); /** Retrieves a list of groups matching the filter using advanced query string. Filter groups @param limit - The number of user entries to retrieve. @param next - Get users with IDs that are higher than the target user ID. Cannot be used in conjunction with prev. @param prev - Get users with IDs that are lower than the target user ID. Cannot be used in conjunction with next. @param sort - The field to sort by, with +/- prefix indicating sort order @param data - An advanced query filter to be used for complex user querying in the tenant. */ filter(data: Filter, queryParams?: { limit?: number; next?: string; prev?: string; sort?: 'name' | '+name' | '-name'; }): Promise>; /** Returns the active tenant's group settings. Get group settings */ getSettings(): Promise; /** Update group settings @param data - An array of JSON Patches for the groups settings. */ patchSettings(data: SettingsPatchSchema): Promise; /** Returns the requested group. Get group by id @param groupId - The group's unique identifier */ get(groupId: string): Promise; /** Returns a list of groups with cursor-based pagination. List groups. @param filter - The advanced filtering to use for the query. Refer to RFC 7644 https://datatracker.ietf.org/doc/rfc7644/ for the syntax. Cannot be combined with any of the fields marked as deprecated. All conditional statements within this query parameter are case insensitive. @param limit - The number of groups to retrieve. @param next - The next page cursor. @param prev - The previous page cursor. @param sort - Optional resource field name to sort on, eg. name. Can be prefixed with +/- to determine order, defaults to (+) ascending. @param systemGroups - Return system groups (e.g. Everyone) instead of regular groups. Cannot be combined with any other query parameters. @param totalResults - Whether to return a total match count in the result. Defaults to false. */ getGroups(queryParams?: { filter?: string; limit?: number; next?: string; prev?: string; sort?: string; systemGroups?: boolean; totalResults?: boolean; }): Promise>; /** Creates a group. The maximum number of groups a tenant can have is 10,000. Create group. @param data - */ create(data: GroupPostSchema): Promise; }