/** 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 CollectionTypes { Private = "private", Public = "public", Publicgoverned = "publicgoverned" } export declare enum ItemResourceTypeEnum { App = "app", Collection = "collection", Qlikview = "qlikview", Insight = "insight", Qvapp = "qvapp", Genericlink = "genericlink", Sharingservicetask = "sharingservicetask", Note = "note", Dataasset = "dataasset", Dataset = "dataset", Automation = "automation", AutomlExperiment = "automl-experiment", AutomlDeployment = "automl-deployment" } export type CollectionLinksResponseBody = { items?: Link; self?: Link; [key: string]: any; }; /** Collection metadata and computed fields. @param items - Multiple items. @param auth - Auth object used to make requests */ export declare class CollectionMetaResponseBody { auth: Auth; items?: ItemsResultResponseBody; [key: string]: any; constructor({ items, ...rest }: { items?: ItemsResultResponseBody; }, auth?: Auth); } /** A collection. @param createdAt - The RFC3339 datetime when the collection was created. @param creatorId - The ID of the user who created the collection. This property is only populated if the JWT contains a userId. @param description - @param full - States if a collection has reached its items limit or not @param id - The collection's unique identifier. @param itemCount - The number of items that have been added to the collection that the user has access to. @param links - @param meta - Collection metadata and computed fields. @param name - @param tenantId - The ID of the tenant that owns the collection. This property is populated by using JWT. @param type - @param updatedAt - The RFC3339 datetime when the collection was last updated. @param updaterId - The ID of the user who last updated the collection. This property is only populated if the JWT contains a userId. @param auth - Auth object used to make requests */ export declare class CollectionResultResponseBody { auth: Auth; createdAt: string; creatorId?: string; description?: string; full?: boolean; id: string; itemCount: number; links: CollectionLinksResponseBody; meta?: CollectionMetaResponseBody; name: string; tenantId: string; type: 'private' | 'public' | 'favorite' | 'publicgoverned' | string; updatedAt: string; updaterId?: string; [key: string]: any; constructor({ createdAt, creatorId, description, full, id, itemCount, links, meta, name, tenantId, type, updatedAt, updaterId, ...rest }: { createdAt: string; creatorId?: string; description?: string; full?: boolean; id: string; itemCount: number; links: CollectionLinksResponseBody; meta?: CollectionMetaResponseBody; name: string; tenantId: string; type: 'private' | 'public' | 'favorite' | 'publicgoverned' | string; updatedAt: string; updaterId?: string; }, auth?: Auth); } export type ItemLinksResponseBody = { collections?: Link; open?: Link; self?: Link; thumbnail?: Link; [key: string]: any; }; export type ItemMetaResponseBody = { /** The actions that the user can perform on the item. */ actions: Array; /** An array of collections that the item is part of. */ collections: Array; /** The flag that indicates if item is in the user's favorites collection. */ isFavorited: boolean; /** An array of tags that the item is part of. */ tags: Array; [key: string]: any; }; /** An item. @param actions - The actions that the user can perform on the item. @param collectionIds - The ID of the collections that the item has been added to. @param createdAt - The RFC3339 datetime when the item was created. @param creatorId - The ID of the user who created the item. This is only populated if the JWT contains a userId. @param description - @param id - The item's unique identifier. @param isFavorited - The flag that indicates if item is in the user's favorites collection. @param itemViews - @param links - @param meta - Item metadata and computed fields. @param name - @param ownerId - The ID of the user who owns the item. @param resourceAttributes - @param resourceCreatedAt - The RFC3339 datetime when the resource that the item references was created. @param resourceCustomAttributes - @param resourceId - The case-sensitive string used to search for an item by resourceId. If resourceId is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. @param resourceLink - The case-sensitive string used to search for an item by resourceLink. If resourceLink is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. @param resourceReloadEndTime - The RFC3339 datetime when the resource last reload ended. @param resourceReloadStatus - If the resource last reload was successful or not. @param resourceSize - @param resourceSubType - Optional field defining the item's subtype, if any. @param resourceType - The case-sensitive string defining the item's type. @param resourceUpdatedAt - The RFC3339 datetime when the resource that the item references was last updated. @param spaceId - The space's unique identifier. @param tenantId - The ID of the tenant that owns the item. This is populated using the JWT. @param thumbnailId - The item thumbnail's unique identifier. This is optional for internal resources. @param updatedAt - The RFC3339 datetime when the item was last updated. @param updaterId - ID of the user who last updated the item. This is only populated if the JWT contains a userId. @param auth - Auth object used to make requests */ export declare class ItemResultResponseBody { auth: Auth; actions: Array; collectionIds: Array; createdAt: string; creatorId?: string; description?: string; id: string; isFavorited: boolean; itemViews?: ItemViewsResponseBody; links: ItemLinksResponseBody; meta: ItemMetaResponseBody; name: string; ownerId?: string; resourceAttributes: object; resourceCreatedAt: string; resourceCustomAttributes: object; resourceId?: string; resourceLink?: string; resourceReloadEndTime?: string; resourceReloadStatus?: string; resourceSize?: ItemsResourceSizeResponseBody; resourceSubType?: string; resourceType: ItemResourceTypeEnum; resourceUpdatedAt: string; spaceId?: string; tenantId: string; thumbnailId?: string; updatedAt: string; updaterId?: string; [key: string]: any; constructor({ actions, collectionIds, createdAt, creatorId, description, id, isFavorited, itemViews, links, meta, name, ownerId, resourceAttributes, resourceCreatedAt, resourceCustomAttributes, resourceId, resourceLink, resourceReloadEndTime, resourceReloadStatus, resourceSize, resourceSubType, resourceType, resourceUpdatedAt, spaceId, tenantId, thumbnailId, updatedAt, updaterId, ...rest }: { actions: Array; collectionIds: Array; createdAt: string; creatorId?: string; description?: string; id: string; isFavorited: boolean; itemViews?: ItemViewsResponseBody; links: ItemLinksResponseBody; meta: ItemMetaResponseBody; name: string; ownerId?: string; resourceAttributes: object; resourceCreatedAt: string; resourceCustomAttributes: object; resourceId?: string; resourceLink?: string; resourceReloadEndTime?: string; resourceReloadStatus?: string; resourceSize?: ItemsResourceSizeResponseBody; resourceSubType?: string; resourceType: ItemResourceTypeEnum; resourceUpdatedAt: string; spaceId?: string; tenantId: string; thumbnailId?: string; updatedAt: string; updaterId?: string; }, auth?: Auth); /** Finds and returns the collections of an item. This endpoint does not return the user's favorites collection. Returns the collections of an item. @param limit - The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive). @param name - The case-sensitive string used to search for a collection by name. @param next - The cursor to the next page of resources. Provide either the next or prev cursor, but not both. @param prev - The cursor to the previous page of resources. Provide either the next or prev cursor, but not both. @param query - The case-insensitive string used to search for a resource by name or description. @param sort - The property of a resource to sort on (default sort is +createdAt). The supported properties are createdAt, updatedAt, and name. A property must be prefixed by + or - to indicate ascending or descending sort order respectively. @param type - The case-sensitive string used to search for a collection by type. */ getCollections(queryParams?: { limit?: number; name?: string; next?: string; prev?: string; query?: string; sort?: '+createdAt' | '-createdAt' | '+name' | '-name' | '+updatedAt' | '-updatedAt'; type?: CollectionTypes; }): Promise>; /** Finds and returns the published items for a given item. Returns published items for a given item. @param limit - The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive). @param next - The cursor to the next page of resources. Provide either the next or prev cursor, but not both. @param prev - The cursor to the previous page of resources. Provide either the next or prev cursor, but not both. @param resourceType - The case-sensitive string used to search for an item by resourceType. @param sort - The property of a resource to sort on (default sort is +createdAt). The supported properties are createdAt, updatedAt, and name. A property must be prefixed by + or - to indicate ascending or descending sort order respectively. */ getPublisheditems(queryParams?: { limit?: number; next?: string; prev?: string; resourceType?: ItemResourceTypeEnum; sort?: '+createdAt' | '-createdAt' | '+name' | '-name' | '+updatedAt' | '-updatedAt'; }): Promise>; /** Deletes an item and removes the item from all collections. Deletes an item. */ delete(): Promise; /** Updates an item. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value. Updates an item. @param data - */ set(data: ItemsUpdateItemRequestBody): Promise; } export type ItemsLinksResponseBody = { collection?: Link; next?: Link; prev?: Link; self?: Link; [key: string]: any; }; export type ItemsResourceSizeResponseBody = { /** Size of the app on disk in bytes. */ appFile?: number; /** Size of the app in memory in bytes. */ appMemory?: number; [key: string]: any; }; /** Multiple items. @param data - @param links - @param auth - Auth object used to make requests */ export declare class ItemsResultResponseBody { auth: Auth; data: Array; links: ItemsLinksResponseBody; [key: string]: any; constructor({ data, links, ...rest }: { data: Array; links: ItemsLinksResponseBody; }, auth?: Auth); } export type ItemsSettingsPatch = Array; export type ItemsSettingsPatchElement = { /** The operation to be performed. Only "replace" is supported. */ op: 'replace' | string; /** Field of Settings to be patched (updated). */ path: '/usageMetricsEnabled' | string; /** The value to be used within the operations. */ value: boolean; [key: string]: any; }; export type ItemsSettingsResponseBody = { /** Decides if the usage metrics will be shown in the hub UI. @defaultValue true */ usageMetricsEnabled: boolean; [key: string]: any; }; export type ItemsUpdateItemRequestBody = { description?: string; name?: string; resourceAttributes?: object; resourceCustomAttributes?: object; /** The case-sensitive string used to search for an item by resourceId. If resourceId is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. */ resourceId?: string; /** The case-sensitive string used to search for an item by resourceLink. If resourceLink is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. */ resourceLink?: string; /** Optional field defining the item's subtype, if any. */ resourceSubType?: string; /** The case-sensitive string defining the item's type. */ resourceType: ItemResourceTypeEnum; /** The RFC3339 datetime when the resource that the item references was last updated. */ resourceUpdatedAt?: string; /** The space's unique identifier. */ spaceId?: string; /** The item thumbnail's unique identifier. This is optional for internal resources. */ thumbnailId?: string; [key: string]: any; }; export type ItemTagResponseBody = { /** The ID of the tag/collection. */ id: string; /** The name of the tag/collection. */ name: string; [key: string]: any; }; export type ItemViewsResponseBody = { /** Total number of views the resource got during the last 28 days. */ total?: number; /** Trend in views over the last 4 weeks. */ trend?: number; /** Number of unique users who viewed the resource during the last 28 days. */ unique?: number; /** Number of apps this dataset is used in (datasets only). */ usedBy?: number; week?: Array; [key: string]: any; }; export type ItemViewsWeeksResponseBody = { /** The RFC3339 datetime representing the start of the referenced week. */ start?: string; /** Total number of views the resource got during the referenced week. */ total?: number; /** Number of unique users who viewed the resource during the referenced week. */ unique?: number; [key: string]: any; }; export type Link = { href?: string; [key: string]: any; }; export declare class Items { auth: Auth; config: Config; constructor(config: Config | Auth); /** Finds and returns the settings for the current tenant. Returns tenant specific settings. */ getSettings(): Promise; /** Updates the settings provided in the patch body. Patches tenant specific settings. @param data - */ patchSettings(data: ItemsSettingsPatch): Promise; /** Finds and returns an item. Returns an item. @param itemId - The item's unique identifier */ get(itemId: string): Promise; /** Finds and returns items that the user has access to. Retrieves items that the user has access to. @param collectionId - The collection's unique identifier. @param createdByUserId - User's unique identifier. @param id - The item's unique identifier. @param limit - The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive). @param name - The case-insensitive string used to search for a resource by name. @param next - The cursor to the next page of resources. Provide either the next or prev cursor, but not both. @param notCreatedByUserId - User's unique identifier. @param notOwnerId - Owner identifier. @param ownerId - Owner identifier. @param prev - The cursor to the previous page of resources. Provide either the next or prev cursor, but not both. @param query - The case-insensitive string used to search for a resource by name or description. @param resourceId - The case-sensitive string used to search for an item by resourceId. If resourceId is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. @param resourceIds - The case-sensitive strings used to search for an item by resourceIds. The maximum number of resourceIds it supports is 100. If resourceIds is provided, then resourceType must be provided. For example '?resourceIds=appId1,appId2' @param resourceLink - The case-sensitive string used to search for an item by resourceLink. If resourceLink is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. @param resourceSubType - the case-sensitive string used to filter items by resourceSubType(s). For example '?resourceSubType=chart-monitoring,qix-df,qvd'. Will return a 400 error if used in conjuction with the square bracket syntax for resourceSubType filtering in the 'resourceType' query parameter. @param resourceType - The case-sensitive string used to filter items by resourceType(s). For example '?resourceType=app,qvapp'. Additionally, a optional resourceSubType filter can be added to each resourceType. For example '?resourceType=app[qvd,chart-monitoring],qvapp'. An trailing comma can be used to include the empty resourceSubType, e.g. '?resourceType=app[qvd,chart-monitoring,]', or, to include only empty resourceSubTypes, '?resourceType=app[]' This syntax replaces the 'resourceSubType' query param, and using both in the same query will result in a 400 error. @param shared - Whether or not to return items in a shared space. @param sort - The property of a resource to sort on (default sort is +createdAt). The supported properties are createdAt, updatedAt, and name. A property must be prefixed by + or - to indicate ascending or descending sort order respectively. @param spaceId - The space's unique identifier (supports \'personal\' as spaceId). @param noActions - If set to true, the user's available actions for each item will not be evaluated meaning the actions-array will be omitted from the response (reduces response time). */ getItems(queryParams?: { collectionId?: string; createdByUserId?: string; id?: string; limit?: number; name?: string; next?: string; notCreatedByUserId?: string; notOwnerId?: string; ownerId?: string; prev?: string; query?: string; resourceId?: string; resourceIds?: string; resourceLink?: string; resourceSubType?: string; resourceType?: ItemResourceTypeEnum; shared?: boolean; sort?: '+createdAt' | '-createdAt' | '+name' | '-name' | '+updatedAt' | '-updatedAt'; spaceId?: string; noActions?: boolean; }): Promise>; }