qlik-saas-api
Version:
Interact with Qlik Sense SaaS REST API
86 lines (85 loc) • 2.45 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
import { QlikSaaSClient } from "qlik-rest-api";
import { IExtensionImportData } from "./Extensions";
export interface IExtension {
id: string;
tenantId: string;
userId: string;
type: string;
name: string;
qextFilename: string;
qextVersion: string;
description: string;
version: string;
author: string;
supplier: string;
homepage: string;
keywords: string;
license: string;
repository: string;
dependencies: {};
icon: string;
tags: string[];
preview: string;
checksum: string;
bundled: boolean;
deprecated: string;
bundle: {
id: string;
name: string;
description: string;
};
supernova: boolean;
file: {
contentType: string;
contentLength: number;
md5: string;
fileId: string;
originalname: string;
};
createdAt: string;
updateAt: string;
}
export declare class Extension {
#private;
details: IExtension;
constructor(saasClient: QlikSaaSClient, id: string, details?: IExtension);
init(arg?: {
force: boolean;
}): Promise<void>;
remove(): Promise<number>;
file(arg: {
fileName: string;
}): Promise<any>;
download(): Promise<{
file: AxiosResponse<T>;
id: string;
name: string;
}>;
/**
* **WARNING!**
*
* At this point (2023-08-29) not all "data" properties can be updated.
* Qlik will reply with status 200 ("OK. Extension has been updated.") but the extension
* is not updated. For example: if we pass new value for "name" property the update request
* will be ok but the extension name is not updated in Qlik.
*
* Although the documentation states that all properties can be passed that is not
* reflecting the reality. From my experience the only things that can be updates
* at the moment are the "file" and "data.tags"
*
* This method will anyway accept all "data" properties and when one day Qlik enable
* all properties on their end then this method will not require any updating
*/
update(arg: {
file: string | Buffer;
data: Partial<IExtensionImportData>;
} | {
file?: undefined;
data: Partial<IExtensionImportData>;
} | {
file: string | Buffer;
data?: undefined;
}): Promise<number>;
}