/** 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 declare enum ActionName { Create = "create", Read = "read", Update = "update", Delete = "delete", Publish = "publish" } export declare enum RoleType { Consumer = "consumer", Contributor = "contributor", Dataconsumer = "dataconsumer", Facilitator = "facilitator", Operator = "operator", Producer = "producer", Publisher = "publisher", Basicconsumer = "basicconsumer", Codeveloper = "codeveloper" } export declare enum SharedSpaceRoleType { Facilitator = "facilitator", Consumer = "consumer", Producer = "producer", Dataconsumer = "dataconsumer", Codeveloper = "codeveloper" } export declare enum SpaceType { Shared = "shared", Managed = "managed", Data = "data" } export type Assignment = { /** The userId or groupId based on the type. */ assigneeId: string; /** The date and time when the space was created. */ createdAt?: string; /** The ID of the user who created the assignment. */ createdBy?: string; id: string; links: { self: Link; space?: Link; }; /** The roles assigned to a user or group. Must not be empty. */ roles: Array; /** The unique identifier for the space. */ spaceId: string; /** The unique identifier for the tenant. */ tenantId: string; type: 'user' | 'group' | string; /** The date and time when the space was updated. */ updatedAt?: string; /** The ID of the user who updated the assignment. */ updatedBy?: string; [key: string]: any; }; export type AssignmentCreate = { /** The userId or groupId based on the type. */ assigneeId: string; /** The roles assigned to the assigneeId. */ roles: Array; /** The type of assignment such as user or group */ type: 'user' | 'group' | string; [key: string]: any; }; export type AssignmentUpdate = { /** The roles assigned to the assigneeId. */ roles?: Array; [key: string]: any; }; export type Link = { /** URL that defines the resource. */ href: string; [key: string]: any; }; /** A space is a security context simplifying the management of access control by allowing users to control it on the containers instead of on the resources themselves. @param createdAt - The date and time when the space was created. @param createdBy - The ID of the user who created the space. @param description - The description of the space. Personal spaces do not have a description. @param id - A unique identifier for the space, for example, 62716f4b39b865ece543cd45. @param links - @param meta - Information about the space settings. @param name - The name of the space. Personal spaces do not have a name. @param ownerId - The ID for the space owner. @param tenantId - The ID for the tenant, for example, xqGQ0k66vSR8f9G7J-vYtHZQkiYrCpct. @param type - The type of space such as shared, managed, and so on. @param updatedAt - The date and time when the space was updated. @param auth - Auth object used to make requests */ export declare class Space { auth: Auth; createdAt?: string; createdBy?: string; description?: string; id: string; links: { assignments: Link; self: Link; }; meta?: { actions: Array; assignableRoles: Array; roles: Array; }; name: string; ownerId?: string; tenantId: string; type?: 'shared' | 'managed' | 'data' | string; updatedAt?: string; [key: string]: any; constructor({ createdAt, createdBy, description, id, links, meta, name, ownerId, tenantId, type, updatedAt, ...rest }: { createdAt?: string; createdBy?: string; description?: string; id: string; links: { assignments: Link; self: Link; }; meta?: { actions: Array; assignableRoles: Array; roles: Array; }; name: string; ownerId?: string; tenantId: string; type?: 'shared' | 'managed' | 'data' | string; updatedAt?: string; }, auth?: Auth); /** Deletes an assignment. @param assignmentId - The ID of the assignment to delete. */ deleteAssignment(assignmentId: string): Promise; /** Retrieves a single assignment by ID. @param assignmentId - The ID of the assignment to retrieve. */ getAssignment(assignmentId: string): Promise; /** Updates a single assignment by ID. The complete list of roles must be provided. @param assignmentId - The ID of the assignment to update. @param data - Attributes that the user wants to update for the specified assignment. */ setAssignment(assignmentId: string, data: AssignmentUpdate): Promise; /** Retrieves the assignments of the space matching the query. @param limit - Maximum number of assignments to return. @param next - The next page cursor. Next links make use of this. @param prev - The previous page cursor. Previous links make use of this. */ getAssignments(queryParams?: { limit?: number; next?: string; prev?: string; }): Promise>; /** Creates an assignment. @param data - Attributes that the user wants to set for the assignment for the space. */ createAssignment(data: AssignmentCreate): Promise; /** Deletes a space. */ delete(): Promise; /** Patches (updates) a space (partially). @param data - Attribute that the user wants to patch (update) for the specified space. */ patch(data: SpacePatch): Promise; /** Updates a space. @param data - Attributes that the user wants to update for the specified space. */ set(data: SpaceUpdate): Promise; } export type SpaceCreate = { /** The description of the space. Personal spaces do not have a description. */ description?: string; /** The name of the space. Personal spaces do not have a name. */ name: string; /** The type of space such as shared, managed, and so on. */ type: 'shared' | 'managed' | 'data' | string; [key: string]: any; }; export type SpacePatch = Array; export type SpacePatchElement = { /** The operation to be performed. */ op: 'replace' | string; /** Field of space to be patched (updated). */ path: '/name' | '/ownerId' | '/description' | string; /** The value to be used within the operations. - name: The name (string) of space of maxLength 256 of pattern: ^[^\"\*\?\\/\|\\\:]+$ - description: The description (string) of the space. Personal spaces do not have a description. - ownerId: The user ID in uid format (string) of the space owner. */ value: string; [key: string]: any; }; export type SpaceTypes = { /** @example ["shared","managed"] */ data?: Array; [key: string]: any; }; export type SpaceUpdate = { /** The description of the space. Personal spaces do not have a description. */ description?: string; /** The name of the space. */ name?: string; /** The user ID of the space owner. */ ownerId?: string; [key: string]: any; }; export declare class Spaces { auth: Auth; config: Config; constructor(config: Config | Auth); /** Gets a list of distinct space types. */ getTypes(): Promise; /** Retrieves a single space by ID. @param spaceId - The ID of the space to retrieve. */ get(spaceId: string): Promise; /** Retrieves spaces that the current user has access to and match the query. @param action - Action on space. Supports only "?action=publish". @param filter - Exact match filtering on space name using SCIM. Case insensitive on attribute name. For example ?filter=name eq "MySpace" and ?filter=NAME eq "MySpace" is both valid. @param limit - Maximum number of spaces to return. @param name - Space name to search and filter for. Case-insensitive open search with wildcards both as prefix and suffix. For example, "?name=fin" will get "finance", "Final" and "Griffin". @param next - The next page cursor. Next links make use of this. @param ownerId - Space ownerId to filter by. For example, "?ownerId=123". @param prev - The previous page cursor. Previous links make use of this. @param sort - Field to sort by. Prefix with +/- to indicate asc/desc. For example, "?sort=+name" to sort ascending on Name. Supported fields are "type", "name" and "createdAt". @param type - Type(s) of space to filter. For example, "?type=managed,shared". */ getSpaces(queryParams?: { action?: string; filter?: string; limit?: number; name?: string; next?: string; ownerId?: string; prev?: string; sort?: string; type?: string; }): Promise>; /** Creates a space. @param data - Attributes that the user wants to set for a new space. */ create(data: SpaceCreate): Promise; }