Socket
Socket
Sign inDemoInstall

@qlik/sdk

Package Overview
Dependencies
17
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.19.1 to 0.20.0

16

dist/cjs/apis/Api_Keys.js

@@ -92,3 +92,3 @@ var __create = Object.create;

@param data
@param data -
*/

@@ -194,5 +194,5 @@ async patch(data) {

api_keys_enabled,
max_api_key_expiry,
max_keys_per_user,
scim_externalClient_expiry,
max_api_key_expiry = "PT24H",
max_keys_per_user = 5,
scim_externalClient_expiry = "P365D",
...rest

@@ -323,3 +323,3 @@ }) {

@param tenantId - The tenant ID of the API keys configuration to be retrieved.
@param data
@param data -
*/

@@ -361,3 +361,3 @@ async patchConfig(tenantId, data) {

*/
async getApiKeys(queryParams = { limit: 20, sort: "-created" }, maxItems = 20) {
async getApiKeys(queryParams = { limit: 20, sort: "-created" }) {
const response = await this.auth.rest(

@@ -370,3 +370,3 @@ `/api-keys?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, ApiKey, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, ApiKey, queryParams);
}

@@ -376,3 +376,3 @@ /**

@param data
@param data -
*/

@@ -379,0 +379,0 @@ async create(data) {

@@ -217,3 +217,3 @@ var __create = Object.create;

@param path - Path to file content.
@param data
@param data -
*/

@@ -642,5 +642,5 @@ async setMediaFile(path, data) {

Thou,
Type,
Type = "UNKNOWN",
UseThou,
nDec,
nDec = 10,
...rest

@@ -1026,3 +1026,3 @@ }) {

attributes,
checkOriginAppId,
checkOriginAppId = true,
data,

@@ -2210,3 +2210,3 @@ targetId,

*/
async getEvaluations(guid, queryParams = { limit: 20 }, maxItems = 20) {
async getEvaluations(guid, queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -2219,3 +2219,3 @@ `${"/apps/{guid}/evaluations".replace("{guid}", guid)}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Evaluation, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Evaluation, queryParams);
}

@@ -2222,0 +2222,0 @@ /** Queue an app evaluation by its app guid.

@@ -432,3 +432,3 @@ var __create = Object.create;

*/
async getAudits(queryParams = { limit: 10, sort: "-eventTime" }, maxItems = 10) {
async getAudits(queryParams = { limit: 10, sort: "-eventTime" }) {
const response = await this.auth.rest(

@@ -441,3 +441,3 @@ `/audits?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, GetByIDResult, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, GetByIDResult, queryParams);
}

@@ -444,0 +444,0 @@ }

@@ -70,3 +70,3 @@ var __create = Object.create;

snippetIds,
state,
state = "available",
updatedAt,

@@ -153,3 +153,3 @@ workspace,

@param ownerId
@param ownerId -
*/

@@ -227,3 +227,3 @@ async move(ownerId) {

*/
async getRuns(queryParams = { limit: 10, sort: "id" }, maxItems = 10) {
async getRuns(queryParams = { limit: 10, sort: "id" }) {
const response = await this.auth.rest(

@@ -236,3 +236,3 @@ `${"/automations/{id}/runs".replace("{id}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, RunListObject, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, RunListObject, queryParams);
}

@@ -294,3 +294,3 @@ /**

schedules,
state,
state = "available",
workspace,

@@ -352,3 +352,3 @@ ...rest

runMode,
state,
state = "available",
updatedAt,

@@ -744,3 +744,3 @@ ...rest

@param data
@param data -
*/

@@ -797,3 +797,3 @@ async setSettings(data) {

*/
async getAutomations(queryParams = { limit: 100, sort: "id" }, maxItems = 100) {
async getAutomations(queryParams = { limit: 100, sort: "id" }) {
const response = await this.auth.rest(

@@ -806,3 +806,3 @@ `/automations?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, AutomationListObject, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, AutomationListObject, queryParams);
}

@@ -809,0 +809,0 @@ /**

@@ -161,3 +161,3 @@ var __create = Object.create;

@param data
@param data -
*/

@@ -192,3 +192,3 @@ async createItem(data) {

@param data
@param data -
*/

@@ -747,3 +747,3 @@ async set(data) {

*/
async getCollections(queryParams = {}, maxItems = 10) {
async getCollections(queryParams = {}) {
const response = await this.auth.rest(

@@ -756,3 +756,3 @@ `/collections?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, CollectionResultResponseBody, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, CollectionResultResponseBody, queryParams);
}

@@ -763,3 +763,3 @@ /** Creates and returns a new collection. Collections can have the same name.

@param data
@param data -
*/

@@ -766,0 +766,0 @@ async create(data) {

@@ -105,3 +105,3 @@ var __create = Object.create;

@param data
@param data -
*/

@@ -321,3 +321,3 @@ async set(data) {

*/
async getCspOrigins(queryParams = { limit: 20 }, maxItems = 20) {
async getCspOrigins(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -330,3 +330,3 @@ `/csp-origins?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, CSPEntry, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, CSPEntry, queryParams);
}

@@ -336,3 +336,3 @@ /**

@param data
@param data -
*/

@@ -339,0 +339,0 @@ async create(data) {

@@ -509,3 +509,3 @@ var __create = Object.create;

*/
async getConnections(queryParams = { limit: 20 }, maxItems = 20) {
async getConnections(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -518,3 +518,3 @@ `/data-files/connections?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, ConnectionsResponse, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, ConnectionsResponse, queryParams);
}

@@ -567,3 +567,3 @@ /**

*/
async getDataFiles(queryParams = { limit: 20 }, maxItems = 20) {
async getDataFiles(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -576,3 +576,3 @@ `/data-files?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, DataFileUploadResponse, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, DataFileUploadResponse, queryParams);
}

@@ -579,0 +579,0 @@ /**

@@ -149,3 +149,3 @@ var __create = Object.create;

@param data
@param data -
@param file - Extension archive.

@@ -311,3 +311,3 @@ */

@param data
@param data -
@param file - Extension archive.

@@ -314,0 +314,0 @@ */

@@ -358,3 +358,3 @@ var __create = Object.create;

*/
async filter(data, queryParams = { limit: 20, sort: "+name" }, maxItems = 20) {
async filter(data, queryParams = { limit: 20, sort: "+name" }) {
const response = await this.auth.rest(

@@ -368,3 +368,3 @@ `/groups/actions/filter?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Group, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Group, queryParams);
}

@@ -388,3 +388,3 @@ /** Returns the active tenant's group settings.

@param data
@param data -
*/

@@ -425,3 +425,3 @@ async patchSettings(data) {

*/
async getGroups(queryParams = { limit: 20 }, maxItems = 20) {
async getGroups(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -434,3 +434,3 @@ `/groups?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Group, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Group, queryParams);
}

@@ -437,0 +437,0 @@ }

@@ -329,3 +329,3 @@ var __create = Object.create;

*/
async getIdentityProviders(queryParams = { limit: 20 }, maxItems = 20) {
async getIdentityProviders(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -338,3 +338,3 @@ `/identity-providers?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, IDP, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, IDP, queryParams);
}

@@ -341,0 +341,0 @@ /** This endpoint creates an identity provider resource. It returns a 201 Created when creation is successful with a header "QLIK-IDP-POPTS" (A unique string representing a hash of the current configuration being tested), returns a 403 Forbidden for a non TenantAdmin user JWT or if the tenantID in the JWT does not match with any of the tenantIDs in the payload. An IdP can be created with Pending Options or options depending whether the IdP is interactive or not.

@@ -153,3 +153,3 @@ var __create = Object.create;

*/
async getCollections(queryParams = {}, maxItems = 10) {
async getCollections(queryParams = {}) {
const response = await this.auth.rest(

@@ -162,3 +162,3 @@ `${"/items/{itemId}/collections".replace("{itemId}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, CollectionResultResponseBody, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, CollectionResultResponseBody, queryParams);
}

@@ -175,3 +175,3 @@ /** Finds and returns the published items for a given item.

*/
async getPublisheditems(queryParams = {}, maxItems = 10) {
async getPublisheditems(queryParams = {}) {
const response = await this.auth.rest(

@@ -184,3 +184,3 @@ `${"/items/{itemId}/publisheditems".replace("{itemId}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, CollectionResultResponseBody, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, CollectionResultResponseBody, queryParams);
}

@@ -204,3 +204,3 @@ /** Deletes an item and removes the item from all collections.

@param data
@param data -
*/

@@ -283,3 +283,3 @@ async set(data) {

constructor({
usageMetricsEnabled,
usageMetricsEnabled = true,
...rest

@@ -708,3 +708,3 @@ }) {

@param data
@param data -
*/

@@ -764,3 +764,3 @@ async patchSettings(data) {

*/
async getItems(queryParams = {}, maxItems = 10) {
async getItems(queryParams = {}) {
const response = await this.auth.rest(

@@ -773,3 +773,3 @@ `/items?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, ItemResultResponseBody, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, ItemResultResponseBody, queryParams);
}

@@ -776,0 +776,0 @@ }

@@ -659,3 +659,3 @@ var __create = Object.create;

*/
async getAssignments(queryParams = { limit: 20 }, maxItems = 20) {
async getAssignments(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -668,3 +668,3 @@ `/licenses/assignments?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, AssignmentsResponseData, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, AssignmentsResponseData, queryParams);
}

@@ -679,3 +679,3 @@ /**

*/
async getConsumptions(queryParams = { limit: 200 }, maxItems = 200) {
async getConsumptions(queryParams = { limit: 200 }) {
const response = await this.auth.rest(

@@ -688,3 +688,3 @@ `/licenses/consumption?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, ConsumptionEventsResponseData, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, ConsumptionEventsResponseData, queryParams);
}

@@ -691,0 +691,0 @@ /**

@@ -156,3 +156,3 @@ var __create = Object.create;

*/
async getOauthTokens(queryParams = { sort: "userId" }, maxItems = 10) {
async getOauthTokens(queryParams = { sort: "userId" }) {
const response = await this.auth.rest(

@@ -165,3 +165,3 @@ `/oauth-tokens?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, OauthToken, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, OauthToken, queryParams);
}

@@ -168,0 +168,0 @@ }

@@ -226,3 +226,3 @@ var __create = Object.create;

queryError,
queryOrigin,
queryOrigin = "askQuestion",
queryText,

@@ -662,3 +662,3 @@ queryType,

@param qlik-web-integration-id - This header is only required for external clients or mashups for QCS, this value of this property should be the id of the web integration set up for the external client/mashup
@param data
@param data -
*/

@@ -682,5 +682,5 @@ async ask(data) {

@param data
@param data -
*/
async filter(data, queryParams = { limit: 100, sort: "+createdAt" }, maxItems = 100) {
async filter(data, queryParams = { limit: 100, sort: "+createdAt" }) {
const response = await this.auth.rest(

@@ -694,3 +694,3 @@ `/questions/actions/filter?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, NLMetricRecord, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, NLMetricRecord, queryParams);
}

@@ -697,0 +697,0 @@ }

@@ -300,3 +300,3 @@ var __create = Object.create;

*/
async getReloadTasks(queryParams = { limit: 10 }, maxItems = 10) {
async getReloadTasks(queryParams = { limit: 10 }) {
const response = await this.auth.rest(

@@ -309,3 +309,3 @@ `/reload-tasks?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Task, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Task, queryParams);
}

@@ -312,0 +312,0 @@ /**

@@ -231,3 +231,3 @@ var __create = Object.create;

*/
async getReloads(queryParams, maxItems = 10) {
async getReloads(queryParams) {
const response = await this.auth.rest(

@@ -240,3 +240,3 @@ `/reloads?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Reload, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Reload, queryParams);
}

@@ -243,0 +243,0 @@ /**

@@ -234,3 +234,3 @@ var __create = Object.create;

*/
async getRoles(queryParams = { limit: 20 }, maxItems = 20) {
async getRoles(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -243,3 +243,3 @@ `/roles?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Role, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Role, queryParams);
}

@@ -246,0 +246,0 @@ }

@@ -149,3 +149,3 @@ var __create = Object.create;

*/
async getAssignments(queryParams = { limit: 10 }, maxItems = 10) {
async getAssignments(queryParams = { limit: 10 }) {
const response = await this.auth.rest(

@@ -158,3 +158,3 @@ `${"/spaces/{spaceId}/assignments".replace("{spaceId}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Assignment, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Assignment, queryParams);
}

@@ -666,3 +666,3 @@ /**

*/
async getSpaces(queryParams = { limit: 10 }, maxItems = 10) {
async getSpaces(queryParams = { limit: 10 }) {
const response = await this.auth.rest(

@@ -675,3 +675,3 @@ `/spaces?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Space, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Space, queryParams);
}

@@ -678,0 +678,0 @@ /**

@@ -130,3 +130,3 @@ var __create = Object.create;

@param data
@param data -
@param file - Theme archive.

@@ -252,3 +252,3 @@ */

@param data
@param data -
@param file - Theme archive.

@@ -255,0 +255,0 @@ */

@@ -36,2 +36,3 @@ var __create = Object.create;

JSONPatchArray: () => JSONPatchArray,
JSONPatchAssignedRolesRefIDs: () => JSONPatchAssignedRolesRefIDs,
Metadata: () => Metadata,

@@ -139,3 +140,3 @@ User: () => User,

@param data
@param data -
*/

@@ -254,2 +255,15 @@ async patch(data) {

}
class JSONPatchAssignedRolesRefIDs {
constructor({
id,
...rest
}) {
this.id = id;
if (rest) {
Object.keys(rest).forEach((prop) => {
this[prop] = rest[prop];
});
}
}
}
class Metadata {

@@ -549,3 +563,3 @@ constructor({

*/
async filter(data, queryParams = { limit: 20, sort: "+name" }, maxItems = 20) {
async filter(data, queryParams = { limit: 20, sort: "+name" }) {
const response = await this.auth.rest(

@@ -559,3 +573,3 @@ `/users/actions/filter?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, User, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, User, queryParams);
}

@@ -660,3 +674,3 @@ /** Redirects to retrieve the user resource associated with the JWT claims.

status: "active"
}, maxItems = 20) {
}) {
const response = await this.auth.rest(

@@ -669,3 +683,3 @@ `/users?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, User, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, User, queryParams);
}

@@ -675,3 +689,3 @@ /** Creates an invited user.

@param data
@param data -
*/

@@ -698,2 +712,3 @@ async create(data) {

JSONPatchArray,
JSONPatchAssignedRolesRefIDs,
Metadata,

@@ -700,0 +715,0 @@ User,

@@ -87,3 +87,3 @@ var __create = Object.create;

@param data
@param data -
*/

@@ -331,3 +331,3 @@ async patch(data) {

*/
async getWebIntegrations(queryParams = { limit: 10, sort: "+name" }, maxItems = 10) {
async getWebIntegrations(queryParams = { limit: 10, sort: "+name" }) {
const response = await this.auth.rest(

@@ -340,3 +340,3 @@ `/web-integrations?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, WebIntegration, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, WebIntegration, queryParams);
}

@@ -346,3 +346,3 @@ /** Creates a web integration.

@param data
@param data -
*/

@@ -349,0 +349,0 @@ async create(data) {

@@ -60,3 +60,3 @@ var __create = Object.create;

id,
level,
level = "tenant",
name,

@@ -134,3 +134,3 @@ ownerId,

*/
async getDeliveries(queryParams = { limit: 20, sort: "-triggeredAt" }, maxItems = 20) {
async getDeliveries(queryParams = { limit: 20, sort: "-triggeredAt" }) {
const response = await this.auth.rest(

@@ -143,3 +143,3 @@ `${"/webhooks/{id}/deliveries".replace("{id}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Delivery, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Delivery, queryParams);
}

@@ -161,3 +161,3 @@ /**

@param WebhookPatchData
@param WebhookPatchData -
*/

@@ -176,3 +176,3 @@ async patch(WebhookPatchData) {

@param data
@param data -
*/

@@ -387,3 +387,3 @@ async set(data) {

headers,
level,
level = "tenant",
name,

@@ -541,3 +541,3 @@ ownerId,

*/
async getWebhooks(queryParams = { limit: 20, sort: "-createdAt" }, maxItems = 20) {
async getWebhooks(queryParams = { limit: 20, sort: "-createdAt" }) {
const response = await this.auth.rest(

@@ -550,3 +550,3 @@ `/webhooks?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new import_listable.default(responseJson, this.auth, Webhook, queryParams, maxItems);
return new import_listable.default(responseJson, this.auth, Webhook, queryParams);
}

@@ -556,3 +556,3 @@ /**

@param data
@param data -
*/

@@ -559,0 +559,0 @@ async create(data) {

@@ -82,3 +82,2 @@ var __create = Object.create;

Object.assign(this.rpc, { interceptors: this.rpcClient.interceptors });
Object.assign(this.rpc, { eventListeners: this.rpcClient.eventListeners });
this.rest = restClient.restClientInstance;

@@ -85,0 +84,0 @@ this.generateWebsocketUrl = (appId, appendAccessToken) => (0, import_utils.generateWebsocketUrl)(appId, this.rest, this.config, appendAccessToken);

@@ -94,3 +94,3 @@ var __defProp = Object.defineProperty;

}
const version = "0.19.1";
const version = "0.20.0";
const anyBody = init?.body;

@@ -97,0 +97,0 @@ const hasFormDataBody = anyBody?.append !== void 0;

@@ -57,3 +57,2 @@ var __create = Object.create;

this.sessions = {};
this.eventListeners = {};
this.config = config;

@@ -85,5 +84,15 @@ this.rest = rest ?? new import_restClient.default(config).restClientInstance;

session.on("closed", (data) => {
if (this.sessions[session.config?.url]?.eventListeners) {
Object.values(this.sessions[session.config?.url]?.eventListeners)?.forEach((handle) => {
handle?.closed?.forEach(
(listener) => {
listener(data);
}
);
});
}
if (data?.code && data.code >= 4e3) {
session.onRpcError(new import_errors.EngineCloseError(data.code, data.reason));
}
delete this.sessions[session.config?.url];
});

@@ -95,6 +104,6 @@ return session;

if ("handle" in msg) {
this.eventListeners?.[msg.handle]?.[`traffic:${direction}`]?.forEach((listener) => {
this.sessions[url.toString()]?.eventListeners?.[msg.handle]?.[`traffic:${direction}`]?.forEach((listener) => {
listener(msg);
});
this.eventListeners?.[msg.handle]?.["traffic:*"]?.forEach((listener) => {
this.sessions[url.toString()]?.eventListeners?.[msg.handle]?.["traffic:*"]?.forEach((listener) => {
listener(msg);

@@ -105,3 +114,5 @@ });

msg.change.forEach((qHandle) => {
this.eventListeners[qHandle]?.changed?.forEach((listener) => listener(msg));
this.sessions[url.toString()]?.eventListeners?.[qHandle]?.changed?.forEach(
(listener) => listener(msg)
);
});

@@ -111,3 +122,5 @@ }

msg.close.forEach((qHandle) => {
this.eventListeners[qHandle]?.closed?.forEach((listener) => listener(msg));
this.sessions[url.toString()]?.eventListeners?.[qHandle]?.closed?.forEach(
(listener) => listener(msg)
);
});

@@ -114,0 +127,0 @@ }

@@ -24,3 +24,3 @@ var __defProp = Object.defineProperty;

class ListableResource extends Array {
constructor(response, auth, ClsConstructor, queryParams = {}, maxItems = 10) {
constructor(response, auth, ClsConstructor, queryParams = {}) {
super();

@@ -32,3 +32,7 @@ const createObject = (data) => new ClsConstructor(data, auth);

let nextHref = response?.links?.next?.href;
const queryEntries = Object.entries(queryParams).filter(([, v]) => v !== void 0);
const limit100 = ["limit", 100];
const queryEntries = [
...Object.entries(queryParams).filter(([, v]) => v !== void 0),
limit100
];
const extraQueryString = queryEntries.length > 0 ? `&${queryEntries.map(([k, v]) => `${k}=${v}`).join("&")}` : "";

@@ -48,5 +52,2 @@ const fetchNext = async () => {

const done = Promise.resolve({ done: true, value: null });
if (index >= maxItems) {
return done;
}
if (index >= this.length) {

@@ -53,0 +54,0 @@ if (!nextHref) {

@@ -15,3 +15,3 @@ /**

@param lastUpdated - When the API key was last updated.
@param status
@param status -
@param sub - The ID of the subject for the API key.

@@ -55,3 +55,3 @@ @param subType - Type of the subject.

@param data
@param data -
*/

@@ -123,3 +123,3 @@ patch(data: ApiKeysPatchSchema): Promise<void>;

@param lastUpdated - When the API key was last updated.
@param status
@param status -
@param sub - The ID of the subject for the API key.

@@ -200,4 +200,4 @@ @param subType - Type of the subject.

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -216,5 +216,5 @@ */

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -247,3 +247,3 @@ */

@param tenantId - The tenant ID of the API keys configuration to be retrieved.
@param data
@param data -
*/

@@ -276,9 +276,9 @@ patchConfig(tenantId: string, data: ApiKeysConfigPatchSchema): Promise<void>;

sub?: string;
}, maxItems?: number): Promise<ListableResource<ApiKey>>;
}): Promise<ListableResource<ApiKey>>;
/**
Creates an API key resource.
@param data
@param data -
*/
create(data: ApiKeyBody): Promise<ApiKeyWithToken>;
}

@@ -49,3 +49,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -151,5 +151,5 @@ async patch(data) {

api_keys_enabled,
max_api_key_expiry,
max_keys_per_user,
scim_externalClient_expiry,
max_api_key_expiry = "PT24H",
max_keys_per_user = 5,
scim_externalClient_expiry = "P365D",
...rest

@@ -280,3 +280,3 @@ }) {

@param tenantId - The tenant ID of the API keys configuration to be retrieved.
@param data
@param data -
*/

@@ -318,3 +318,3 @@ async patchConfig(tenantId, data) {

*/
async getApiKeys(queryParams = { limit: 20, sort: "-created" }, maxItems = 20) {
async getApiKeys(queryParams = { limit: 20, sort: "-created" }) {
const response = await this.auth.rest(

@@ -327,3 +327,3 @@ `/api-keys?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, ApiKey, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, ApiKey, queryParams);
}

@@ -333,3 +333,3 @@ /**

@param data
@param data -
*/

@@ -336,0 +336,0 @@ async create(data) {

@@ -91,3 +91,3 @@ /**

@param path - Path to file content.
@param data
@param data -
*/

@@ -275,3 +275,3 @@ setMediaFile(path: string, data: FileData): Promise<void>;

/**
@param attributes
@param attributes -
@param auth - Auth object used to make requests

@@ -289,4 +289,4 @@ */

@param has_section_access - If set to true, the app has section access configured.
@param is_direct_query_mode
@param reload_meta
@param is_direct_query_mode -
@param reload_meta -
@param static_byte_size - Static memory usage for the app.

@@ -433,3 +433,3 @@ @param tables - List of table descriptions.

@param Fractiles - The .01, .05, .1, .25, .5, .75, .9, .95, .99 fractiles. Array of NaN otherwise.
@param FrequencyDistribution
@param FrequencyDistribution -
@param Kurtosis - Kurtosis of the numerical values. NaN otherwise.

@@ -684,3 +684,3 @@ @param LastSorted - For textual values the last sorted string.

@param cpu_time_spent_ms - Number of CPU milliseconds it took to reload the app.
@param hardware
@param hardware -
@param peak_memory_bytes - Maximum number of bytes used during reload of the app.

@@ -784,3 +784,3 @@ @param auth - Auth object used to make requests

@param owner - The owner of the app.
@param ownerId
@param ownerId -
@param publishTime - The date and time when the app was published, empty if unpublished.

@@ -859,3 +859,3 @@ @param published - True if the app is published on-prem, distributed in QCS, false if not.

/**
@param attributes
@param attributes -
@param data - The published app will have data from source or target app.

@@ -888,3 +888,3 @@ The default is source.

/**
@param attributes
@param attributes -
@param checkOriginAppId - Validate that source app is same as originally published.

@@ -927,3 +927,3 @@ @param data - The republished app will have data from source or target app.

@param endTime - Time when reload ended.
@param links
@param links -
@param reloadId - Reload identifier.

@@ -972,3 +972,3 @@ @param success - True if the reload was successful.

/**
@param links
@param links -
@param scripts - Script versions metadata.

@@ -1002,3 +1002,3 @@ @param auth - Auth object used to make requests

@param Frequency - Frequency of the above symbol in the field
@param Symbol
@param Symbol -
@param auth - Auth object used to make requests

@@ -1082,3 +1082,3 @@ */

/**
@param attributes
@param attributes -
@param auth - Auth object used to make requests

@@ -1094,3 +1094,3 @@ */

/**
@param ownerId
@param ownerId -
@param auth - Auth object used to make requests

@@ -1106,3 +1106,3 @@ */

/**
@param spaceId
@param spaceId -
@param auth - Auth object used to make requests

@@ -1118,7 +1118,7 @@ */

/**
@param absoluteDiff
@param diff
@param trend
@param baseline
@param comparison
@param absoluteDiff -
@param diff -
@param trend -
@param baseline -
@param comparison -
@param auth - Auth object used to make requests

@@ -1142,7 +1142,7 @@ */

/**
@param absoluteDiff
@param diff
@param trend
@param baseline
@param comparison
@param absoluteDiff -
@param diff -
@param trend -
@param baseline -
@param comparison -
@param auth - Auth object used to make requests

@@ -1166,7 +1166,7 @@ */

/**
@param absoluteDiff
@param diff
@param trend
@param baseline
@param comparison
@param absoluteDiff -
@param diff -
@param trend -
@param baseline -
@param comparison -
@param auth - Auth object used to make requests

@@ -1190,20 +1190,20 @@ */

/**
@param appOpenTimeSeconds
@param dataModelSizeMib
@param documentSizeMib
@param fileSizeMib
@param hasSectionAccess
@param maxMemoryMib
@param objHeavy
@param objNoCache
@param objSingleThreaded
@param objSlowCached
@param objSlowUncached
@param objectCount
@param rowCount
@param sheetCount
@param sheetsCached
@param sheetsUncached
@param topFieldsByBytes
@param topTablesByBytes
@param appOpenTimeSeconds -
@param dataModelSizeMib -
@param documentSizeMib -
@param fileSizeMib -
@param hasSectionAccess -
@param maxMemoryMib -
@param objHeavy -
@param objNoCache -
@param objSingleThreaded -
@param objSlowCached -
@param objSlowUncached -
@param objectCount -
@param rowCount -
@param sheetCount -
@param sheetsCached -
@param sheetsUncached -
@param topFieldsByBytes -
@param topTablesByBytes -
@param auth - Auth object used to make requests

@@ -1253,18 +1253,18 @@ */

/**
@param appId
@param appItemId
@param appName
@param details
@param ended
@param events
@param id
@param metadata
@param result
@param sheetId
@param sheetTitle
@param started
@param status
@param tenantId
@param timestamp
@param version
@param appId -
@param appItemId -
@param appName -
@param details -
@param ended -
@param events -
@param id -
@param metadata -
@param result -
@param sheetId -
@param sheetTitle -
@param started -
@param status -
@param tenantId -
@param timestamp -
@param version -
@param auth - Auth object used to make requests

@@ -1317,8 +1317,8 @@ */

/**
@param concurrentReload
@param dedicated
@param engineHasCache
@param errors
@param objectMetrics
@param warnings
@param concurrentReload -
@param dedicated -
@param engineHasCache -
@param errors -
@param objectMetrics -
@param warnings -
@param auth - Auth object used to make requests

@@ -1344,4 +1344,4 @@ */

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -1360,4 +1360,4 @@ */

/**
@param next
@param prev
@param next -
@param prev -
@param auth - Auth object used to make requests

@@ -1375,3 +1375,3 @@ */

/**
@param href
@param href -
@param auth - Auth object used to make requests

@@ -1387,3 +1387,3 @@ */

/**
@param href
@param href -
@param auth - Auth object used to make requests

@@ -1399,11 +1399,11 @@ */

/**
@param details
@param errorCode
@param objectId
@param objectTitle
@param objectType
@param objectVisualization
@param severity
@param sheetId
@param sheetTitle
@param details -
@param errorCode -
@param objectId -
@param objectTitle -
@param objectType -
@param objectVisualization -
@param severity -
@param sheetId -
@param sheetTitle -
@param auth - Auth object used to make requests

@@ -1435,10 +1435,10 @@ */

/**
@param amountofcardinalfieldvalues
@param amountoffields
@param amountoffieldvalues
@param amountofrows
@param amountoftables
@param hassectionaccess
@param reloadmeta
@param staticbytesize
@param amountofcardinalfieldvalues -
@param amountoffields -
@param amountoffieldvalues -
@param amountofrows -
@param amountoftables -
@param hassectionaccess -
@param reloadmeta -
@param staticbytesize -
@param auth - Auth object used to make requests

@@ -1468,4 +1468,4 @@ */

/**
@param cpuspent
@param peakmemorybytes
@param cpuspent -
@param peakmemorybytes -
@param auth - Auth object used to make requests

@@ -1483,6 +1483,6 @@ */

/**
@param id
@param objectType
@param sheetId
@param title
@param id -
@param objectType -
@param sheetId -
@param title -
@param auth - Auth object used to make requests

@@ -1504,14 +1504,14 @@ */

/**
@param documentSizeMiB
@param hasSectionAccess
@param objNoCache
@param objSingleThreaded
@param objSlowCached
@param objSlowUncached
@param objectCount
@param rowCount
@param sheetCount
@param sheets
@param topFieldsByBytes
@param topTablesByBytes
@param documentSizeMiB -
@param hasSectionAccess -
@param objNoCache -
@param objSingleThreaded -
@param objSlowCached -
@param objSlowUncached -
@param objectCount -
@param rowCount -
@param sheetCount -
@param sheets -
@param topFieldsByBytes -
@param topTablesByBytes -
@param auth - Auth object used to make requests

@@ -1549,5 +1549,5 @@ */

/**
@param byte_size
@param is_system
@param name
@param byte_size -
@param is_system -
@param name -
@param auth - Auth object used to make requests

@@ -1567,5 +1567,5 @@ */

/**
@param byte_size
@param is_system
@param name
@param byte_size -
@param is_system -
@param name -
@param auth - Auth object used to make requests

@@ -1585,7 +1585,7 @@ */

/**
@param id
@param objectType
@param sheetId
@param title
@param responseTimeSeconds
@param id -
@param objectType -
@param sheetId -
@param title -
@param responseTimeSeconds -
@param auth - Auth object used to make requests

@@ -1609,5 +1609,5 @@ */

/**
@param objectCount
@param sheet
@param sheetObjects
@param objectCount -
@param sheet -
@param sheetObjects -
@param auth - Auth object used to make requests

@@ -1627,9 +1627,9 @@ */

/**
@param id
@param objectType
@param sheetId
@param title
@param cpuQuotients
@param responseTimeSeconds
@param schema
@param id -
@param objectType -
@param sheetId -
@param title -
@param cpuQuotients -
@param responseTimeSeconds -
@param schema -
@param auth - Auth object used to make requests

@@ -1657,7 +1657,7 @@ */

/**
@param id
@param objectType
@param sheetId
@param title
@param cpuQuotient1
@param id -
@param objectType -
@param sheetId -
@param title -
@param cpuQuotient1 -
@param auth - Auth object used to make requests

@@ -1681,8 +1681,8 @@ */

/**
@param absoluteDiffAsc
@param absoluteDiffDesc
@param dataSourceStatus
@param list
@param relativeDiffAsc
@param relativeDiffDesc
@param absoluteDiffAsc -
@param absoluteDiffDesc -
@param dataSourceStatus -
@param list -
@param relativeDiffAsc -
@param relativeDiffDesc -
@param auth - Auth object used to make requests

@@ -1708,8 +1708,8 @@ */

/**
@param absoluteDiffAsc
@param absoluteDiffDesc
@param dataSourceStatus
@param list
@param relativeDiffAsc
@param relativeDiffDesc
@param absoluteDiffAsc -
@param absoluteDiffDesc -
@param dataSourceStatus -
@param list -
@param relativeDiffAsc -
@param relativeDiffDesc -
@param auth - Auth object used to make requests

@@ -1735,8 +1735,8 @@ */

/**
@param absoluteDiffAsc
@param absoluteDiffDesc
@param dataSourceStatus
@param list
@param relativeDiffAsc
@param relativeDiffDesc
@param absoluteDiffAsc -
@param absoluteDiffDesc -
@param dataSourceStatus -
@param list -
@param relativeDiffAsc -
@param relativeDiffDesc -
@param auth - Auth object used to make requests

@@ -1762,8 +1762,8 @@ */

/**
@param absoluteDiffAsc
@param absoluteDiffDesc
@param dataSourceStatus
@param list
@param relativeDiffAsc
@param relativeDiffDesc
@param absoluteDiffAsc -
@param absoluteDiffDesc -
@param dataSourceStatus -
@param list -
@param relativeDiffAsc -
@param relativeDiffDesc -
@param auth - Auth object used to make requests

@@ -1882,3 +1882,3 @@ */

sort?: string;
}, maxItems?: number): Promise<ListableResource<Evaluation>>;
}): Promise<ListableResource<Evaluation>>;
/** Queue an app evaluation by its app guid.

@@ -1885,0 +1885,0 @@

@@ -125,3 +125,3 @@ import Auth from "../auth/auth.js";

@param path - Path to file content.
@param data
@param data -
*/

@@ -550,5 +550,5 @@ async setMediaFile(path, data) {

Thou,
Type,
Type = "UNKNOWN",
UseThou,
nDec,
nDec = 10,
...rest

@@ -934,3 +934,3 @@ }) {

attributes,
checkOriginAppId,
checkOriginAppId = true,
data,

@@ -2118,3 +2118,3 @@ targetId,

*/
async getEvaluations(guid, queryParams = { limit: 20 }, maxItems = 20) {
async getEvaluations(guid, queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -2127,3 +2127,3 @@ `${"/apps/{guid}/evaluations".replace("{guid}", guid)}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Evaluation, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Evaluation, queryParams);
}

@@ -2130,0 +2130,0 @@ /** Queue an app evaluation by its app guid.

@@ -17,3 +17,3 @@ /**

@param id - The resource item's unique identifier.
@param links
@param links -
@param source - The source of the event message, usually the producing service.

@@ -104,4 +104,4 @@ @param tenantId - The ID of the tenant that owns the item. This is populated using the JWT.

/**
@param Self
@param self
@param Self -
@param self -
@param auth - Auth object used to make requests

@@ -120,3 +120,3 @@ */

@param data - List of requested resources.
@param links
@param links -
@param auth - Auth object used to make requests

@@ -135,3 +135,3 @@ */

@param data - List of audit items.
@param links
@param links -
@param auth - Auth object used to make requests

@@ -175,3 +175,3 @@ */

/**
@param Href
@param Href -
@param auth - Auth object used to make requests

@@ -187,8 +187,8 @@ */

/**
@param Next
@param Prev
@param Self
@param next
@param prev
@param self
@param Next -
@param Prev -
@param Self -
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -214,3 +214,3 @@ */

/**
@param href
@param href -
@param auth - Auth object used to make requests

@@ -281,3 +281,3 @@ */

userId?: string;
}, maxItems?: number): Promise<ListableResource<GetByIDResult>>;
}): Promise<ListableResource<GetByIDResult>>;
}

@@ -388,3 +388,3 @@ import Auth from "../auth/auth.js";

*/
async getAudits(queryParams = { limit: 10, sort: "-eventTime" }, maxItems = 10) {
async getAudits(queryParams = { limit: 10, sort: "-eventTime" }) {
const response = await this.auth.rest(

@@ -397,3 +397,3 @@ `/audits?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, GetByIDResult, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, GetByIDResult, queryParams);
}

@@ -400,0 +400,0 @@ }

@@ -10,17 +10,17 @@ /**

@param connectorIds - A list of connectors used inside the workspace.
@param createdAt
@param description
@param createdAt -
@param description -
@param endpointIds - A list of endpoints used inside the workspace.
@param executionToken
@param id
@param lastRun
@param lastRunAt
@param lastRunStatus
@param name
@param ownerId
@param runMode
@param schedules
@param executionToken -
@param id -
@param lastRun -
@param lastRunAt -
@param lastRunStatus -
@param name -
@param ownerId -
@param runMode -
@param schedules -
@param snippetIds - A list of snippets used inside the workspace.
@param state
@param updatedAt
@param state -
@param updatedAt -
@param workspace - The workspace generated by the Qlik Application Automations editor.

@@ -87,3 +87,3 @@ @param auth - Auth object used to make requests

@param ownerId
@param ownerId -
*/

@@ -126,3 +126,3 @@ move(ownerId: string): Promise<void>;

sort?: 'id' | 'status' | 'startTime' | '-id' | '-status' | '-startTime' | '+id' | '+status' | '+startTime';
}, maxItems?: number): Promise<ListableResource<RunListObject>>;
}): Promise<ListableResource<RunListObject>>;
/**

@@ -147,6 +147,6 @@ Create a run

/**
@param description
@param name
@param schedules
@param state
@param description -
@param name -
@param schedules -
@param state -
@param workspace - The workspace generated by the Qlik Application Automations editor.

@@ -171,4 +171,4 @@ @param auth - Auth object used to make requests

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -186,12 +186,12 @@ */

/**
@param createdAt
@param description
@param id
@param lastRunAt
@param lastRunStatus
@param name
@param ownerId
@param runMode
@param state
@param updatedAt
@param createdAt -
@param description -
@param id -
@param lastRunAt -
@param lastRunStatus -
@param name -
@param ownerId -
@param runMode -
@param state -
@param updatedAt -
@param auth - Auth object used to make requests

@@ -242,4 +242,4 @@ */

/**
@param next
@param prev
@param next -
@param prev -
@param auth - Auth object used to make requests

@@ -269,4 +269,4 @@ */

@param context - The source that triggers the automation will set the context.
@param id
@param inputs
@param id -
@param inputs -
@param auth - Auth object used to make requests

@@ -287,16 +287,16 @@ */

@param context - The source that triggers the automation will set the context. Certain contexts impact the execution of an automation (for example, The "test_run" context will not process all results when listing items).
@param createdAt
@param error
@param expectedInputs
@param id
@param inputs
@param isArchived
@param isTestRun
@param metrics
@param scheduledStartTime
@param startTime
@param status
@param stopTime
@param title
@param updatedAt
@param createdAt -
@param error -
@param expectedInputs -
@param id -
@param inputs -
@param isArchived -
@param isTestRun -
@param metrics -
@param scheduledStartTime -
@param startTime -
@param status -
@param stopTime -
@param title -
@param updatedAt -
@param auth - Auth object used to make requests

@@ -341,3 +341,3 @@ */

@param blocks - List of blocks used during execution. Note: this list currently only contains endpointBlocks and snippetBlocks
@param network
@param network -
@param totalApiCalls - The number of API calls made.

@@ -402,4 +402,4 @@ @param auth - Auth object used to make requests

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -417,14 +417,14 @@ */

/**
@param context
@param createdAt
@param error
@param id
@param isArchived
@param isTestRun
@param scheduledStartTime
@param startTime
@param status
@param stopTime
@param title
@param updatedAt
@param context -
@param createdAt -
@param error -
@param id -
@param isArchived -
@param isTestRun -
@param scheduledStartTime -
@param startTime -
@param status -
@param stopTime -
@param title -
@param updatedAt -
@param auth - Auth object used to make requests

@@ -463,5 +463,5 @@ */

@param interval - time in seconds.
@param startAt
@param stopAt
@param timezone
@param startAt -
@param stopAt -
@param timezone -
@param auth - Auth object used to make requests

@@ -483,8 +483,8 @@ */

/**
@param id
@param id -
@param interval - time in seconds.
@param lastStartedAt
@param startAt
@param stopAt
@param timezone
@param lastStartedAt -
@param startAt -
@param stopAt -
@param timezone -
@param auth - Auth object used to make requests

@@ -510,3 +510,3 @@ */

/**
@param automationsEnabled
@param automationsEnabled -
@param auth - Auth object used to make requests

@@ -522,3 +522,3 @@ */

/**
@param data
@param data -
@param auth - Auth object used to make requests

@@ -534,3 +534,3 @@ */

/**
@param automation
@param automation -
@param date - The date for the metric

@@ -566,3 +566,3 @@ @param name - The name for the metric

@param data
@param data -
*/

@@ -598,3 +598,3 @@ setSettings(data: SettingsObject): Promise<SettingsObject>;

sort?: 'id' | 'name' | 'runMode' | 'state' | 'createdAt' | 'updatedAt' | 'lastRunAt' | 'lastRunStatus' | '+id' | '+name' | '+runMode' | '+state' | '+createdAt' | '+updatedAt' | '+lastRunAt' | '+lastRunStatus' | '-id' | '-name' | '-runMode' | '-state' | '-createdAt' | '-updatedAt' | '-lastRunAt' | '-lastRunStatus';
}, maxItems?: number): Promise<ListableResource<AutomationListObject>>;
}): Promise<ListableResource<AutomationListObject>>;
/**

@@ -601,0 +601,0 @@ Create an automation

@@ -19,3 +19,3 @@ import Auth from "../auth/auth.js";

snippetIds,
state,
state = "available",
updatedAt,

@@ -102,3 +102,3 @@ workspace,

@param ownerId
@param ownerId -
*/

@@ -176,3 +176,3 @@ async move(ownerId) {

*/
async getRuns(queryParams = { limit: 10, sort: "id" }, maxItems = 10) {
async getRuns(queryParams = { limit: 10, sort: "id" }) {
const response = await this.auth.rest(

@@ -185,3 +185,3 @@ `${"/automations/{id}/runs".replace("{id}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, RunListObject, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, RunListObject, queryParams);
}

@@ -243,3 +243,3 @@ /**

schedules,
state,
state = "available",
workspace,

@@ -301,3 +301,3 @@ ...rest

runMode,
state,
state = "available",
updatedAt,

@@ -693,3 +693,3 @@ ...rest

@param data
@param data -
*/

@@ -746,3 +746,3 @@ async setSettings(data) {

*/
async getAutomations(queryParams = { limit: 100, sort: "id" }, maxItems = 100) {
async getAutomations(queryParams = { limit: 100, sort: "id" }) {
const response = await this.auth.rest(

@@ -755,3 +755,3 @@ `/automations?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, AutomationListObject, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, AutomationListObject, queryParams);
}

@@ -758,0 +758,0 @@ /**

@@ -12,8 +12,8 @@ /**

@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 description -
@param id - The collection's unique identifier.
@param itemCount - The number of items that have been added to the collection.
@param links
@param links -
@param meta - Collection metadata and computed fields.
@param name
@param name -
@param tenantId - The ID of the tenant that owns the collection. This property is populated by using JWT.

@@ -104,3 +104,3 @@ @param type - The collection's type.

@param data
@param data -
*/

@@ -118,3 +118,3 @@ createItem(data: CollectionsAddCollectionItemRequestBody): Promise<ItemResultResponseBody>;

@param data
@param data -
*/

@@ -135,4 +135,4 @@ set(data: CollectionsUpdateCollectionRequestBody): Promise<CollectionResultResponseBody>;

/**
@param description
@param name
@param description -
@param name -
@param type - The collection's type.

@@ -154,3 +154,3 @@ @param auth - Auth object used to make requests

ListCollectionItemsResponseBody result type
@param data
@param data -
@param auth - Auth object used to make requests

@@ -167,4 +167,4 @@ */

ListCollectionsResponseBody result type
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -183,4 +183,4 @@ */

/**
@param description
@param name
@param description -
@param name -
@param auth - Auth object used to make requests

@@ -198,3 +198,3 @@ */

/**
@param href
@param href -
@param auth - Auth object used to make requests

@@ -210,4 +210,4 @@ */

/**
@param items
@param self
@param items -
@param self -
@param auth - Auth object used to make requests

@@ -237,6 +237,6 @@ */

/**
@param item
@param next
@param prev
@param self
@param item -
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -258,6 +258,6 @@ */

/**
@param collections
@param open
@param self
@param thumbnail
@param collections -
@param open -
@param self -
@param thumbnail -
@param auth - Auth object used to make requests

@@ -305,13 +305,13 @@ */

@param creatorId - The ID of the user who created the item. This is only populated if the JWT contains a userId.
@param description
@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 itemViews -
@param links -
@param meta - Item metadata and computed fields.
@param name
@param name -
@param ownerId - The ID of the user who owns the item.
@param resourceAttributes
@param resourceAttributes -
@param resourceCreatedAt - The RFC3339 datetime when the resource that the item references was created.
@param resourceCustomAttributes
@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.

@@ -321,3 +321,3 @@ @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 resourceReloadStatus - If the resource last reload was successful or not.
@param resourceSize
@param resourceSize -
@param resourceSubType - Optional field defining the item's subtype, if any.

@@ -414,3 +414,3 @@ @param resourceType - The case-sensitive string defining the item's type.

@param usedBy - Number of apps this dataset is used in (datasets only).
@param week
@param week -
@param auth - Auth object used to make requests

@@ -451,6 +451,6 @@ */

/**
@param collection
@param next
@param prev
@param self
@param collection -
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -487,4 +487,4 @@ */

Multiple items.
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -550,3 +550,3 @@ */

type?: 'public' | 'private';
}, maxItems?: number): Promise<ListableResource<CollectionResultResponseBody>>;
}): Promise<ListableResource<CollectionResultResponseBody>>;
/** Creates and returns a new collection. Collections can have the same name.

@@ -556,5 +556,5 @@

@param data
@param data -
*/
create(data: CollectionsCreateCollectionRequestBody): Promise<CollectionResultResponseBody>;
}

@@ -110,3 +110,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -141,3 +141,3 @@ async createItem(data) {

@param data
@param data -
*/

@@ -696,3 +696,3 @@ async set(data) {

*/
async getCollections(queryParams = {}, maxItems = 10) {
async getCollections(queryParams = {}) {
const response = await this.auth.rest(

@@ -705,3 +705,3 @@ `/collections?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams);
}

@@ -712,3 +712,3 @@ /** Creates and returns a new collection. Collections can have the same name.

@param data
@param data -
*/

@@ -715,0 +715,0 @@ async create(data) {

@@ -81,3 +81,3 @@ /**

@param data
@param data -
*/

@@ -149,4 +149,4 @@ set(data: CSPEntryContent): Promise<CSPEntry>;

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -165,5 +165,5 @@ */

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -262,9 +262,9 @@ */

workerSrc?: boolean;
}, maxItems?: number): Promise<ListableResource<CSPEntry>>;
}): Promise<ListableResource<CSPEntry>>;
/**
Creates a new CSP entry
@param data
@param data -
*/
create(data: CSPEntryContent): Promise<CSPEntry>;
}

@@ -67,3 +67,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -283,3 +283,3 @@ async set(data) {

*/
async getCspOrigins(queryParams = { limit: 20 }, maxItems = 20) {
async getCspOrigins(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -292,3 +292,3 @@ `/csp-origins?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, CSPEntry, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, CSPEntry, queryParams);
}

@@ -298,3 +298,3 @@ /**

@param data
@param data -
*/

@@ -301,0 +301,0 @@ async create(data) {

@@ -139,3 +139,3 @@ /**

@param connectStatement - The connect statement that will be passed to the connector when invoked.
@param id
@param id -
@param name - The name of the connection.

@@ -187,4 +187,4 @@ @param spaceId - The team space that the given connection is associated with. If null, the connection is not associated

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -202,4 +202,4 @@ */

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -218,3 +218,3 @@ */

/**
@param href
@param href -
@param auth - Auth object used to make requests

@@ -230,5 +230,5 @@ */

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -259,7 +259,7 @@ */

/**
@param code
@param detail
@param id
@param status
@param title
@param code -
@param detail -
@param id -
@param status -
@param title -
@param auth - Auth object used to make requests

@@ -358,3 +358,3 @@ */

spaceId?: string;
}, maxItems?: number): Promise<ListableResource<ConnectionsResponse>>;
}): Promise<ListableResource<ConnectionsResponse>>;
/**

@@ -397,3 +397,3 @@ Get quota information for the calling user.

sort?: 'name' | '+name' | '-name' | 'size' | '+size' | '-size' | 'modifiedDate' | '+modifiedDate' | '-modifiedDate';
}, maxItems?: number): Promise<ListableResource<DataFileUploadResponse>>;
}): Promise<ListableResource<DataFileUploadResponse>>;
/**

@@ -400,0 +400,0 @@ Upload a new data file.

@@ -462,3 +462,3 @@ import Auth from "../auth/auth.js";

*/
async getConnections(queryParams = { limit: 20 }, maxItems = 20) {
async getConnections(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -471,3 +471,3 @@ `/data-files/connections?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, ConnectionsResponse, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, ConnectionsResponse, queryParams);
}

@@ -520,3 +520,3 @@ /**

*/
async getDataFiles(queryParams = { limit: 20 }, maxItems = 20) {
async getDataFiles(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -529,3 +529,3 @@ `/data-files?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, DataFileUploadResponse, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, DataFileUploadResponse, queryParams);
}

@@ -532,0 +532,0 @@ /**

@@ -14,3 +14,3 @@ /**

@param checksum - Checksum of the extension contents.
@param createdAt
@param createdAt -
@param dependencies - Map of dependencies describing version of the component it requires.

@@ -22,3 +22,3 @@ @param deprecated - A date noting when the extension was deprecated.

@param icon - Icon to show in the client.
@param id
@param id -
@param keywords - Keywords for the extension.

@@ -34,6 +34,6 @@ @param license - Under which license this extension is published.

@param tags - List of tags.
@param tenantId
@param tenantId -
@param type - The type of this extension (visualization, etc.).
@param updateAt
@param userId
@param updateAt -
@param userId -
@param version - Version of the extension.

@@ -120,3 +120,3 @@ @param auth - Auth object used to make requests

@param data
@param data -
@param file - Extension archive.

@@ -220,3 +220,3 @@ */

/**
@param data
@param data -
@param auth - Auth object used to make requests

@@ -250,3 +250,3 @@ */

@param data
@param data -
@param file - Extension archive.

@@ -253,0 +253,0 @@ */

@@ -113,3 +113,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
@param file - Extension archive.

@@ -275,3 +275,3 @@ */

@param data
@param data -
@param file - Extension archive.

@@ -278,0 +278,0 @@ */

@@ -10,3 +10,3 @@ /**

represents a Group document
@param assignedRoles
@param assignedRoles -
@param createdAt - The timestamp for when the group record was created.

@@ -65,7 +65,7 @@ @param id - The unique identifier for the group

represents a role entity to be stored on a Group entity, either default or custom role
@param id
@param level
@param name
@param permissions
@param type
@param id -
@param level -
@param name -
@param permissions -
@param type -
@param auth - Auth object used to make requests

@@ -90,3 +90,3 @@ */

Contains Links for current document
@param self
@param self -
@param auth - Auth object used to make requests

@@ -135,3 +135,3 @@ */

Contains Links for current document
@param self
@param self -
@param auth - Auth object used to make requests

@@ -160,3 +160,3 @@ */

@param data - An array of groups.
@param links
@param links -
@param totalResults - Indicates the total number of matching documents. Will only be returned if the query parameter "totalResults" is true.

@@ -178,5 +178,5 @@ @param auth - Auth object used to make requests

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -274,3 +274,3 @@ */

sort?: 'name' | '+name' | '-name';
}, maxItems?: number): Promise<ListableResource<Group>>;
}): Promise<ListableResource<Group>>;
/** Returns the active tenant's group settings.

@@ -284,3 +284,3 @@ Get group settings

@param data
@param data -
*/

@@ -311,3 +311,3 @@ patchSettings(data: SettingsPatchSchema): Promise<void>;

totalResults?: boolean;
}, maxItems?: number): Promise<ListableResource<Group>>;
}): Promise<ListableResource<Group>>;
}

@@ -311,3 +311,3 @@ import Auth from "../auth/auth.js";

*/
async filter(data, queryParams = { limit: 20, sort: "+name" }, maxItems = 20) {
async filter(data, queryParams = { limit: 20, sort: "+name" }) {
const response = await this.auth.rest(

@@ -321,3 +321,3 @@ `/groups/actions/filter?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Group, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Group, queryParams);
}

@@ -341,3 +341,3 @@ /** Returns the active tenant's group settings.

@param data
@param data -
*/

@@ -378,3 +378,3 @@ async patchSettings(data) {

*/
async getGroups(queryParams = { limit: 20 }, maxItems = 20) {
async getGroups(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -387,3 +387,3 @@ `/groups?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Group, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Group, queryParams);
}

@@ -390,0 +390,0 @@ }

@@ -84,5 +84,5 @@ /**

Contains pagination links.
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -186,3 +186,3 @@ */

prev?: string;
}, maxItems?: number): Promise<ListableResource<IDP>>;
}): Promise<ListableResource<IDP>>;
/** This endpoint creates an identity provider resource. It returns a 201 Created when creation is successful with a header "QLIK-IDP-POPTS" (A unique string representing a hash of the current configuration being tested), returns a 403 Forbidden for a non TenantAdmin user JWT or if the tenantID in the JWT does not match with any of the tenantIDs in the payload. An IdP can be created with Pending Options or options depending whether the IdP is interactive or not.

@@ -189,0 +189,0 @@ Creates a new IdP

@@ -286,3 +286,3 @@ import Auth from "../auth/auth.js";

*/
async getIdentityProviders(queryParams = { limit: 20 }, maxItems = 20) {
async getIdentityProviders(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -295,3 +295,3 @@ `/identity-providers?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, IDP, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, IDP, queryParams);
}

@@ -298,0 +298,0 @@ /** This endpoint creates an identity provider resource. It returns a 201 Created when creation is successful with a header "QLIK-IDP-POPTS" (A unique string representing a hash of the current configuration being tested), returns a 403 Forbidden for a non TenantAdmin user JWT or if the tenantID in the JWT does not match with any of the tenantIDs in the payload. An IdP can be created with Pending Options or options depending whether the IdP is interactive or not.

@@ -14,13 +14,13 @@ /**

@param creatorId - The ID of the user who created the item. This is only populated if the JWT contains a userId.
@param description
@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 itemViews -
@param links -
@param meta - Item metadata and computed fields.
@param name
@param name -
@param ownerId - The ID of the user who owns the item.
@param resourceAttributes
@param resourceAttributes -
@param resourceCreatedAt - The RFC3339 datetime when the resource that the item references was created.
@param resourceCustomAttributes
@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.

@@ -30,3 +30,3 @@ @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 resourceReloadStatus - If the resource last reload was successful or not.
@param resourceSize
@param resourceSize -
@param resourceSubType - Optional field defining the item's subtype, if any.

@@ -123,3 +123,3 @@ @param resourceType - The case-sensitive string defining the item's type.

type?: 'public' | 'private';
}, maxItems?: number): Promise<ListableResource<CollectionResultResponseBody>>;
}): Promise<ListableResource<CollectionResultResponseBody>>;
/** Finds and returns the published items for a given item.

@@ -141,3 +141,3 @@

sort?: '+createdAt' | '-createdAt' | '+name' | '-name' | '+updatedAt' | '-updatedAt';
}, maxItems?: number): Promise<ListableResource<CollectionResultResponseBody>>;
}): Promise<ListableResource<CollectionResultResponseBody>>;
/** Deletes an item and removes the item from all collections.

@@ -153,3 +153,3 @@

@param data
@param data -
*/

@@ -160,4 +160,4 @@ set(data: ItemsUpdateItemRequestBody): Promise<ItemResultResponseBody>;

ListItemCollectionsResponseBody result type
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -177,4 +177,4 @@ */

ListItemsResponseBody result type
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -209,6 +209,6 @@ */

/**
@param description
@param name
@param resourceAttributes
@param resourceCustomAttributes
@param description -
@param name -
@param resourceAttributes -
@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.

@@ -251,3 +251,3 @@ @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 href
@param href -
@param auth - Auth object used to make requests

@@ -263,4 +263,4 @@ */

/**
@param items
@param self
@param items -
@param self -
@param auth - Auth object used to make requests

@@ -294,8 +294,8 @@ */

@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 description -
@param id - The collection's unique identifier.
@param itemCount - The number of items that have been added to the collection.
@param links
@param links -
@param meta - Collection metadata and computed fields.
@param name
@param name -
@param tenantId - The ID of the tenant that owns the collection. This property is populated by using JWT.

@@ -338,6 +338,6 @@ @param type - The collection's type.

/**
@param item
@param next
@param prev
@param self
@param item -
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -359,6 +359,6 @@ */

/**
@param collections
@param open
@param self
@param thumbnail
@param collections -
@param open -
@param self -
@param thumbnail -
@param auth - Auth object used to make requests

@@ -420,3 +420,3 @@ */

@param usedBy - Number of apps this dataset is used in (datasets only).
@param week
@param week -
@param auth - Auth object used to make requests

@@ -457,6 +457,6 @@ */

/**
@param collection
@param next
@param prev
@param self
@param collection -
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -493,4 +493,4 @@ */

Multiple items.
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -521,3 +521,3 @@ */

@param data
@param data -
*/

@@ -579,3 +579,3 @@ patchSettings(data: ItemsSettingsPatch): Promise<ItemsSettingsResponseBody>;

noActions?: boolean;
}, maxItems?: number): Promise<ListableResource<ItemResultResponseBody>>;
}): Promise<ListableResource<ItemResultResponseBody>>;
}

@@ -102,3 +102,3 @@ import Auth from "../auth/auth.js";

*/
async getCollections(queryParams = {}, maxItems = 10) {
async getCollections(queryParams = {}) {
const response = await this.auth.rest(

@@ -111,3 +111,3 @@ `${"/items/{itemId}/collections".replace("{itemId}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams);
}

@@ -124,3 +124,3 @@ /** Finds and returns the published items for a given item.

*/
async getPublisheditems(queryParams = {}, maxItems = 10) {
async getPublisheditems(queryParams = {}) {
const response = await this.auth.rest(

@@ -133,3 +133,3 @@ `${"/items/{itemId}/publisheditems".replace("{itemId}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams);
}

@@ -153,3 +153,3 @@ /** Deletes an item and removes the item from all collections.

@param data
@param data -
*/

@@ -232,3 +232,3 @@ async set(data) {

constructor({
usageMetricsEnabled,
usageMetricsEnabled = true,
...rest

@@ -657,3 +657,3 @@ }) {

@param data
@param data -
*/

@@ -713,3 +713,3 @@ async patchSettings(data) {

*/
async getItems(queryParams = {}, maxItems = 10) {
async getItems(queryParams = {}) {
const response = await this.auth.rest(

@@ -722,3 +722,3 @@ `/items?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, ItemResultResponseBody, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, ItemResultResponseBody, queryParams);
}

@@ -725,0 +725,0 @@ }

@@ -9,3 +9,3 @@ /**

/**
@param add
@param add -
@param auth - Auth object used to make requests

@@ -41,3 +41,3 @@ */

/**
@param data
@param data -
@param auth - Auth object used to make requests

@@ -76,3 +76,3 @@ */

/**
@param delete_
@param delete_ -
@param auth - Auth object used to make requests

@@ -102,3 +102,3 @@ */

/**
@param data
@param data -
@param auth - Auth object used to make requests

@@ -137,3 +137,3 @@ */

/**
@param update
@param update -
@param auth - Auth object used to make requests

@@ -166,3 +166,3 @@ */

/**
@param data
@param data -
@param auth - Auth object used to make requests

@@ -204,4 +204,4 @@ */

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -245,4 +245,4 @@ */

/**
@param next
@param prev
@param next -
@param prev -
@param auth - Auth object used to make requests

@@ -260,4 +260,4 @@ */

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -313,4 +313,4 @@ */

/**
@param next
@param prev
@param next -
@param prev -
@param auth - Auth object used to make requests

@@ -339,8 +339,8 @@ */

/**
@param allotments
@param allotments -
@param changeTime - An ISO 8601 timestamp for when the license was last changed.
@param latestValidTime - An ISO 8601 timestamp for when the latest time the license has been known to be valid, a missing value indicates the indefinite future.
@param licenseKey
@param licenseNumber
@param licenseType
@param licenseKey -
@param licenseNumber -
@param licenseType -
@param origin - Origin of license key.

@@ -390,7 +390,7 @@ @param parameters - The license parameters.

/**
@param name
@param name -
@param overage - Overage value; -1 means unbounded overage.
@param units
@param unitsUsed
@param usageClass
@param units -
@param unitsUsed -
@param usageClass -
@param auth - Auth object used to make requests

@@ -530,3 +530,3 @@ */

sort?: string;
}, maxItems?: number): Promise<ListableResource<AssignmentsResponseData>>;
}): Promise<ListableResource<AssignmentsResponseData>>;
/**

@@ -545,3 +545,3 @@ Retrieves license consumption for the current tenant

sort?: string;
}, maxItems?: number): Promise<ListableResource<ConsumptionEventsResponseData>>;
}): Promise<ListableResource<ConsumptionEventsResponseData>>;
/**

@@ -548,0 +548,0 @@ Gets the general information of the license applied to the current tenant

@@ -601,3 +601,3 @@ import Auth from "../auth/auth.js";

*/
async getAssignments(queryParams = { limit: 20 }, maxItems = 20) {
async getAssignments(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -610,3 +610,3 @@ `/licenses/assignments?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, AssignmentsResponseData, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, AssignmentsResponseData, queryParams);
}

@@ -621,3 +621,3 @@ /**

*/
async getConsumptions(queryParams = { limit: 200 }, maxItems = 200) {
async getConsumptions(queryParams = { limit: 200 }) {
const response = await this.auth.rest(

@@ -630,3 +630,3 @@ `/licenses/consumption?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, ConsumptionEventsResponseData, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, ConsumptionEventsResponseData, queryParams);
}

@@ -633,0 +633,0 @@ /**

@@ -46,4 +46,4 @@ /**

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -61,5 +61,5 @@ */

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -101,3 +101,3 @@ */

userId?: string;
}, maxItems?: number): Promise<ListableResource<OauthToken>>;
}): Promise<ListableResource<OauthToken>>;
}

@@ -120,3 +120,3 @@ import Auth from "../auth/auth.js";

*/
async getOauthTokens(queryParams = { sort: "userId" }, maxItems = 10) {
async getOauthTokens(queryParams = { sort: "userId" }) {
const response = await this.auth.rest(

@@ -129,3 +129,3 @@ `/oauth-tokens?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, OauthToken, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, OauthToken, queryParams);
}

@@ -132,0 +132,0 @@ }

@@ -10,9 +10,9 @@ /**

Metadata for app
@param id
@param last_reload_date
@param limited_access
@param name
@param space_id
@param space_name
@param space_type
@param id -
@param last_reload_date -
@param limited_access -
@param name -
@param space_id -
@param space_name -
@param space_type -
@param auth - Auth object used to make requests

@@ -40,10 +40,10 @@ */

/**
@param followupSentence
@param imageUrl
@param infoType
@param infoValues
@param narrative
@param renderVisualization
@param sentence
@param type
@param followupSentence -
@param imageUrl -
@param infoType -
@param infoValues -
@param narrative -
@param renderVisualization -
@param sentence -
@param type -
@param auth - Auth object used to make requests

@@ -73,3 +73,3 @@ */

/**
@param text
@param text -
@param auth - Auth object used to make requests

@@ -85,3 +85,3 @@ */

/**
@param href
@param href -
@param auth - Auth object used to make requests

@@ -97,5 +97,5 @@ */

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -116,8 +116,8 @@ */

Visualisation recommendation specs for the query
@param analysis
@param analysisGroup
@param analysis -
@param analysisGroup -
@param chartType - Chart type given to current recommendation
@param dims - Dimension(s) considered for recommendation
@param msrs - Measure(s) considered for recommendation
@param relevance
@param relevance -
@param auth - Auth object used to make requests

@@ -145,3 +145,3 @@ */

@param appName - Qlik sense app name that is being used to answer the question
@param apps
@param apps -
@param channelId - Source from which conversation is happening

@@ -151,8 +151,8 @@ @param chartType - Chart type for given query. For insight advisor it would be 'native' and for insight advisor chat, it could be 'static' or 'responsive'

@param createdBy - Qlik sense user id who is interacting with insight advisor or insight advisor chat or third party api
@param feedback
@param feedback -
@param id - Unique record id stored in database
@param isContextualQuery - Boolean value indicates whether given query is contextual or not. It would be false for insight advisor
@param lang - language selected for query from insight advisor or insight advisor chat or third party api
@param nluInfo
@param queryError
@param nluInfo -
@param queryError -
@param queryOrigin - Refers to source from where narrative request is called

@@ -162,3 +162,3 @@ @param queryText - Query asked by user in insight advisor or insight advisor or third party api

@param questionId - Unique id assigned to user query
@param recommendations
@param recommendations -
@param responses - Provides info what was included in response for given query

@@ -267,5 +267,5 @@ @param stopWords - Tokens from question parsed which are ignored

/**
@param data
@param links
@param meta
@param data -
@param links -
@param meta -
@param auth - Auth object used to make requests

@@ -326,3 +326,3 @@ */

/**
@param text
@param text -
@param auth - Auth object used to make requests

@@ -338,3 +338,3 @@ */

/**
@param elements
@param elements -
@param auth - Auth object used to make requests

@@ -350,11 +350,11 @@ */

/**
@param entity
@param errorText
@param filterFieldName
@param filterText
@param isFilter
@param text
@param type
@param typeName
@param typeTranslated
@param entity -
@param errorText -
@param filterFieldName -
@param filterText -
@param isFilter -
@param text -
@param type -
@param typeName -
@param typeTranslated -
@param auth - Auth object used to make requests

@@ -410,4 +410,4 @@ */

/**
@param id
@param name
@param id -
@param name -
@param auth - Auth object used to make requests

@@ -425,3 +425,3 @@ */

/**
@param app
@param app -
@param clearEntityContext - Flag that clears the entity context.

@@ -467,5 +467,5 @@ @param disableConversationContext - Flag that specifies either to enable converastion context.

The attributes of sentences.
@param apps
@param apps -
@param conversationalResponse - A list of conversational responses.
@param nluInfo
@param nluInfo -
@param auth - Auth object used to make requests

@@ -485,5 +485,5 @@ */

/**
@param apps
@param conversationalResponse
@param nluInfo
@param apps -
@param conversationalResponse -
@param nluInfo -
@param auth - Auth object used to make requests

@@ -503,7 +503,7 @@ */

/**
@param apps
@param apps -
@param contextInfo - For contextual responses, this string contains a list of entities that are used to produce the response.
@param drillDownURI - The URL with the query injected to insight advisor of the app to which the query belongs.
@param responses
@param sentenceWithMatches
@param responses -
@param sentenceWithMatches -
@param auth - Auth object used to make requests

@@ -528,9 +528,9 @@ */

Any feedback from the user about a given recommendation
@param analysisType
@param chartType
@param comment
@param recommendationAddedToHub
@param recommendationAddedToSheet
@param recommendationDisliked
@param recommendationLiked
@param analysisType -
@param chartType -
@param comment -
@param recommendationAddedToHub -
@param recommendationAddedToSheet -
@param recommendationDisliked -
@param recommendationLiked -
@param auth - Auth object used to make requests

@@ -559,3 +559,3 @@ */

@param data - Data object should be used to render visualization
@param language
@param language -
@param auth - Auth object used to make requests

@@ -580,3 +580,3 @@ */

@param qlik-web-integration-id - This header is only required for external clients or mashups for QCS, this value of this property should be the id of the web integration set up for the external client/mashup
@param data
@param data -
*/

@@ -591,3 +591,3 @@ ask(data: QueryCreate): Promise<any>;

@param data
@param data -
*/

@@ -598,3 +598,3 @@ filter(data: NLMetricsRequest, queryParams?: {

sort?: 'createdAt' | 'updatedAt' | '+createdAt' | '+updatedAt' | '-createdAt' | '-updatedAt';
}, maxItems?: number): Promise<ListableResource<NLMetricRecord>>;
}): Promise<ListableResource<NLMetricRecord>>;
}

@@ -172,3 +172,3 @@ import Auth from "../auth/auth.js";

queryError,
queryOrigin,
queryOrigin = "askQuestion",
queryText,

@@ -608,3 +608,3 @@ queryType,

@param qlik-web-integration-id - This header is only required for external clients or mashups for QCS, this value of this property should be the id of the web integration set up for the external client/mashup
@param data
@param data -
*/

@@ -628,5 +628,5 @@ async ask(data) {

@param data
@param data -
*/
async filter(data, queryParams = { limit: 100, sort: "+createdAt" }, maxItems = 100) {
async filter(data, queryParams = { limit: 100, sort: "+createdAt" }) {
const response = await this.auth.rest(

@@ -640,3 +640,3 @@ `/questions/actions/filter?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, NLMetricRecord, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, NLMetricRecord, queryParams);
}

@@ -643,0 +643,0 @@ }

@@ -20,3 +20,3 @@ /**

@param lastExecutionTime - The last time the task executed.
@param links
@param links -
@param log - The reason why the task was disabled.

@@ -84,3 +84,3 @@ @param nextExecutionTime - The next time the task will execute.

/**
@param href
@param href -
@param auth - Auth object used to make requests

@@ -96,5 +96,5 @@ */

/**
@param self
@param next
@param prev
@param self -
@param next -
@param prev -
@param auth - Auth object used to make requests

@@ -184,3 +184,3 @@ */

/**
@param self
@param self -
@param auth - Auth object used to make requests

@@ -196,4 +196,4 @@ */

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -236,3 +236,3 @@ */

prev?: string;
}, maxItems?: number): Promise<ListableResource<Task>>;
}): Promise<ListableResource<Task>>;
/**

@@ -239,0 +239,0 @@ Create a task for a specified app.

@@ -261,3 +261,3 @@ import Auth from "../auth/auth.js";

*/
async getReloadTasks(queryParams = { limit: 10 }, maxItems = 10) {
async getReloadTasks(queryParams = { limit: 10 }) {
const response = await this.auth.rest(

@@ -270,3 +270,3 @@ `/reload-tasks?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Task, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Task, queryParams);
}

@@ -273,0 +273,0 @@ /**

@@ -14,3 +14,3 @@ /**

@param id - The ID of the reload.
@param links
@param links -
@param log - The log describing the result of the reload request.

@@ -63,3 +63,3 @@ @param partial - The boolean value used to present the reload is partial or not

/**
@param href
@param href -
@param auth - Auth object used to make requests

@@ -75,3 +75,3 @@ */

/**
@param self
@param self -
@param auth - Auth object used to make requests

@@ -101,4 +101,4 @@ */

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -117,5 +117,5 @@ */

/**
@param self
@param next
@param prev
@param self -
@param next -
@param prev -
@param auth - Auth object used to make requests

@@ -159,3 +159,3 @@ */

prev?: string;
}, maxItems?: number): Promise<ListableResource<Reload>>;
}): Promise<ListableResource<Reload>>;
/**

@@ -162,0 +162,0 @@ Reloads an app specified by an app ID.

@@ -193,3 +193,3 @@ import Auth from "../auth/auth.js";

*/
async getReloads(queryParams, maxItems = 10) {
async getReloads(queryParams) {
const response = await this.auth.rest(

@@ -202,3 +202,3 @@ `/reloads?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Reload, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Reload, queryParams);
}

@@ -205,0 +205,0 @@ /**

@@ -66,3 +66,3 @@ /**

Link to the next page of items
@param href
@param href -
@param auth - Auth object used to make requests

@@ -79,3 +79,3 @@ */

Link to the previous page of items
@param href
@param href -
@param auth - Auth object used to make requests

@@ -92,3 +92,3 @@ */

Link to the current page of items
@param href
@param href -
@param auth - Auth object used to make requests

@@ -122,3 +122,3 @@ */

Contains links for the role.
@param self
@param self -
@param auth - Auth object used to make requests

@@ -171,3 +171,3 @@ */

totalResults?: boolean;
}, maxItems?: number): Promise<ListableResource<Role>>;
}): Promise<ListableResource<Role>>;
}

@@ -194,3 +194,3 @@ import Auth from "../auth/auth.js";

*/
async getRoles(queryParams = { limit: 20 }, maxItems = 20) {
async getRoles(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -203,3 +203,3 @@ `/roles?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Role, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Role, queryParams);
}

@@ -206,0 +206,0 @@ }

@@ -14,3 +14,3 @@ /**

@param id - A unique identifier for the space, for example, 62716f4b39b865ece543cd45.
@param links
@param links -
@param meta - Information about the space settings.

@@ -81,3 +81,3 @@ @param name - The name of the space. Personal spaces do not have a name.

prev?: string;
}, maxItems?: number): Promise<ListableResource<Assignment>>;
}): Promise<ListableResource<Assignment>>;
/**

@@ -111,8 +111,8 @@ Creates an assignment.

@param createdBy - The ID of the user who created the assignment.
@param id
@param links
@param id -
@param links -
@param roles - The roles assigned to a user or group. Must not be empty.
@param spaceId - The unique identifier for the space.
@param tenantId - The unique identifier for the tenant.
@param type
@param type -
@param updatedAt - The date and time when the space was updated.

@@ -167,4 +167,4 @@ @param updatedBy - The ID of the user who updated the assignment.

/**
@param self
@param space
@param self -
@param space -
@param auth - Auth object used to make requests

@@ -193,5 +193,5 @@ */

/**
@param data
@param links
@param meta
@param data -
@param links -
@param meta -
@param auth - Auth object used to make requests

@@ -211,5 +211,5 @@ */

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -268,4 +268,4 @@ */

/**
@param assignments
@param self
@param assignments -
@param self -
@param auth - Auth object used to make requests

@@ -307,3 +307,3 @@ */

The distinct types of spaces (shared, managed, and so on).
@param data
@param data -
@param auth - Auth object used to make requests

@@ -336,5 +336,5 @@ */

/**
@param data
@param links
@param meta
@param data -
@param links -
@param meta -
@param auth - Auth object used to make requests

@@ -355,5 +355,5 @@ */

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -439,3 +439,3 @@ */

type?: string;
}, maxItems?: number): Promise<ListableResource<Space>>;
}): Promise<ListableResource<Space>>;
/**

@@ -442,0 +442,0 @@ Creates a space.

@@ -98,3 +98,3 @@ import Auth from "../auth/auth.js";

*/
async getAssignments(queryParams = { limit: 10 }, maxItems = 10) {
async getAssignments(queryParams = { limit: 10 }) {
const response = await this.auth.rest(

@@ -107,3 +107,3 @@ `${"/spaces/{spaceId}/assignments".replace("{spaceId}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Assignment, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Assignment, queryParams);
}

@@ -615,3 +615,3 @@ /**

*/
async getSpaces(queryParams = { limit: 10 }, maxItems = 10) {
async getSpaces(queryParams = { limit: 10 }) {
const response = await this.auth.rest(

@@ -624,3 +624,3 @@ `/spaces?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Space, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Space, queryParams);
}

@@ -627,0 +627,0 @@ /**

@@ -11,3 +11,3 @@ /**

@param author - Author of the theme.
@param createdAt
@param createdAt -
@param dependencies - Map of dependencies describing version of the component it requires.

@@ -18,3 +18,3 @@ @param description - Description of the theme.

@param icon - Icon to show in the client.
@param id
@param id -
@param keywords - Keywords for the theme.

@@ -28,6 +28,6 @@ @param license - Under which license this theme is published.

@param tags - List of tags.
@param tenantId
@param tenantId -
@param type - The type of this theme (visualization, etc.).
@param updateAt
@param userId
@param updateAt -
@param userId -
@param version - Version of the theme.

@@ -102,3 +102,3 @@ @param auth - Auth object used to make requests

@param data
@param data -
@param file - Theme archive.

@@ -166,3 +166,3 @@ */

/**
@param data
@param data -
@param auth - Auth object used to make requests

@@ -196,3 +196,3 @@ */

@param data
@param data -
@param file - Theme archive.

@@ -199,0 +199,0 @@ */

@@ -95,3 +95,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
@param file - Theme archive.

@@ -217,3 +217,3 @@ */

@param data
@param data -
@param file - Theme archive.

@@ -220,0 +220,0 @@ */

@@ -85,3 +85,3 @@ /**

@param data
@param data -
*/

@@ -169,3 +169,3 @@ patch(data: JSONPatchArray): Promise<void>;

path: '/name' | '/roles (Deprecated)' | '/assignedRoles' | '/inviteExpiry' | '/preferredZoneinfo' | '/preferredLocale' | '/status' | string;
value: any;
value: string | boolean | Array<any> | Array<JSONPatchAssignedRolesRefIDs>;
[key: string]: any;

@@ -175,3 +175,3 @@ constructor({ op, path, value, ...rest }: {

path: '/name' | '/roles (Deprecated)' | '/assignedRoles' | '/inviteExpiry' | '/preferredZoneinfo' | '/preferredLocale' | '/status' | string;
value: any;
value: string | boolean | Array<any> | Array<JSONPatchAssignedRolesRefIDs>;
});

@@ -190,2 +190,14 @@ }

/**
represents a role entity stored in the database
@param id - The unique role identitier
@param auth - Auth object used to make requests
*/
export declare class JSONPatchAssignedRolesRefIDs {
id: string;
[key: string]: any;
constructor({ id, ...rest }: {
id: string;
});
}
/**
An object containing the metadata for the user configuration.

@@ -445,3 +457,3 @@ @param valid_roles - List of system roles to which the user can be assigned.

sort?: 'name' | '+name' | '-name';
}, maxItems?: number): Promise<ListableResource<User>>;
}): Promise<ListableResource<User>>;
/** Redirects to retrieve the user resource associated with the JWT claims.

@@ -528,9 +540,9 @@ Get my user

tenantId?: string;
}, maxItems?: number): Promise<ListableResource<User>>;
}): Promise<ListableResource<User>>;
/** Creates an invited user.
Create user
@param data
@param data -
*/
create(data: UserPostSchema): Promise<User>;
}

@@ -85,3 +85,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -200,2 +200,15 @@ async patch(data) {

}
class JSONPatchAssignedRolesRefIDs {
constructor({
id,
...rest
}) {
this.id = id;
if (rest) {
Object.keys(rest).forEach((prop) => {
this[prop] = rest[prop];
});
}
}
}
class Metadata {

@@ -495,3 +508,3 @@ constructor({

*/
async filter(data, queryParams = { limit: 20, sort: "+name" }, maxItems = 20) {
async filter(data, queryParams = { limit: 20, sort: "+name" }) {
const response = await this.auth.rest(

@@ -505,3 +518,3 @@ `/users/actions/filter?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, User, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, User, queryParams);
}

@@ -606,3 +619,3 @@ /** Redirects to retrieve the user resource associated with the JWT claims.

status: "active"
}, maxItems = 20) {
}) {
const response = await this.auth.rest(

@@ -615,3 +628,3 @@ `/users?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, User, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, User, queryParams);
}

@@ -621,3 +634,3 @@ /** Creates an invited user.

@param data
@param data -
*/

@@ -643,2 +656,3 @@ async create(data) {

JSONPatchArray,
JSONPatchAssignedRolesRefIDs,
Metadata,

@@ -645,0 +659,0 @@ User,

@@ -46,3 +46,3 @@ /**

@param data
@param data -
*/

@@ -147,3 +147,3 @@ patch(data: WebIntegrationPatchSchema): Promise<void>;

An array of web integration objects.
@param data
@param data -
@param links - Pagination links

@@ -241,9 +241,9 @@ @param auth - Auth object used to make requests

tenantId?: string;
}, maxItems?: number): Promise<ListableResource<WebIntegration>>;
}): Promise<ListableResource<WebIntegration>>;
/** Creates a web integration.
Create web integration
@param data
@param data -
*/
create(data: WebIntegrationPostSchema): Promise<WebIntegrationPost>;
}

@@ -43,3 +43,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -287,3 +287,3 @@ async patch(data) {

*/
async getWebIntegrations(queryParams = { limit: 10, sort: "+name" }, maxItems = 10) {
async getWebIntegrations(queryParams = { limit: 10, sort: "+name" }) {
const response = await this.auth.rest(

@@ -296,3 +296,3 @@ `/web-integrations?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, WebIntegration, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, WebIntegration, queryParams);
}

@@ -302,3 +302,3 @@ /** Creates a web integration.

@param data
@param data -
*/

@@ -305,0 +305,0 @@ async create(data) {

@@ -101,3 +101,3 @@ /**

status?: 'success' | 'fail';
}, maxItems?: number): Promise<ListableResource<Delivery>>;
}): Promise<ListableResource<Delivery>>;
/**

@@ -111,3 +111,3 @@ Deletes a specific webhook

@param WebhookPatchData
@param WebhookPatchData -
*/

@@ -118,3 +118,3 @@ patch(WebhookPatchData: Array<WebhookPatch>): Promise<void>;

@param data
@param data -
*/

@@ -126,4 +126,4 @@ set(data: WebhookDef): Promise<Webhook>;

@param id - The delivery's unique identifier
@param request
@param response
@param request -
@param response -
@param status - The status of delivery

@@ -157,4 +157,4 @@ @param statusMessage - The status message of the delivery

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -172,5 +172,5 @@ */

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -244,3 +244,3 @@ */

/**
@param data
@param data -
@param auth - Auth object used to make requests

@@ -310,4 +310,4 @@ */

/**
@param data
@param links
@param data -
@param links -
@param auth - Auth object used to make requests

@@ -326,5 +326,5 @@ */

/**
@param next
@param prev
@param self
@param next -
@param prev -
@param self -
@param auth - Auth object used to make requests

@@ -353,3 +353,3 @@ */

path: '/name' | '/description' | '/url' | '/eventTypes' | '/headers' | '/enabled' | '/secret' | string;
value?: any;
value?: boolean | number | object | string;
[key: string]: any;

@@ -359,3 +359,3 @@ constructor({ op, path, value, ...rest }: {

path: '/name' | '/description' | '/url' | '/eventTypes' | '/headers' | '/enabled' | '/secret' | string;
value?: any;
value?: boolean | number | object | string;
});

@@ -407,9 +407,9 @@ }

url?: string;
}, maxItems?: number): Promise<ListableResource<Webhook>>;
}): Promise<ListableResource<Webhook>>;
/**
Creates a new webhook
@param data
@param data -
*/
create(data: WebhookDef): Promise<Webhook>;
}

@@ -15,3 +15,3 @@ import Auth from "../auth/auth.js";

id,
level,
level = "tenant",
name,

@@ -89,3 +89,3 @@ ownerId,

*/
async getDeliveries(queryParams = { limit: 20, sort: "-triggeredAt" }, maxItems = 20) {
async getDeliveries(queryParams = { limit: 20, sort: "-triggeredAt" }) {
const response = await this.auth.rest(

@@ -98,3 +98,3 @@ `${"/webhooks/{id}/deliveries".replace("{id}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Delivery, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Delivery, queryParams);
}

@@ -116,3 +116,3 @@ /**

@param WebhookPatchData
@param WebhookPatchData -
*/

@@ -131,3 +131,3 @@ async patch(WebhookPatchData) {

@param data
@param data -
*/

@@ -342,3 +342,3 @@ async set(data) {

headers,
level,
level = "tenant",
name,

@@ -496,3 +496,3 @@ ownerId,

*/
async getWebhooks(queryParams = { limit: 20, sort: "-createdAt" }, maxItems = 20) {
async getWebhooks(queryParams = { limit: 20, sort: "-createdAt" }) {
const response = await this.auth.rest(

@@ -505,3 +505,3 @@ `/webhooks?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Webhook, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Webhook, queryParams);
}

@@ -511,3 +511,3 @@ /**

@param data
@param data -
*/

@@ -514,0 +514,0 @@ async create(data) {

@@ -59,3 +59,2 @@ import {

Object.assign(this.rpc, { interceptors: this.rpcClient.interceptors });
Object.assign(this.rpc, { eventListeners: this.rpcClient.eventListeners });
this.rest = restClient.restClientInstance;

@@ -62,0 +61,0 @@ this.generateWebsocketUrl = (appId, appendAccessToken) => generateWebsocketUrl(appId, this.rest, this.config, appendAccessToken);

@@ -115,3 +115,3 @@ // src/errors.ts

}
const version = "0.19.1";
const version = "0.20.0";
const anyBody = init?.body;

@@ -118,0 +118,0 @@ const hasFormDataBody = anyBody?.append !== void 0;

@@ -1,2 +0,2 @@

import { Config, RpcSession, Interceptors, RpcResponseObject } from '../types/types.js';
import { Config, RpcSession, Interceptors } from '../types/types.js';
import { RestClientInstance } from './restClient.js';

@@ -6,9 +6,3 @@ type EnigmaRpc = (appId: string) => Promise<RpcSession>;

interceptors?: Interceptors;
eventListeners?: {
[qHandle: number]: {
[key in 'changed' | 'closed' | 'traffic:sent' | 'traffic:received' | 'traffic:*']: Array<EventListener>;
} | object;
};
}
type EventListener = ((res: RpcResponseObject) => void) | ((direction: 'sent' | 'received') => void) | (() => void);
/**

@@ -30,7 +24,2 @@ * @remarks

};
eventListeners: {
[qHandle: number]: {
[key in 'changed' | 'closed' | 'traffic:sent' | 'traffic:received' | 'traffic:*']: Array<EventListener>;
};
};
constructor(config: Config, rest?: RestClientInstance);

@@ -37,0 +26,0 @@ rpc(appId: string): Promise<RpcSession>;

import { Auth } from './qlik.js';
export default class ListableResource<T> extends Array<T> {
pagination: AsyncIterable<T>;
constructor(response: any, auth: Auth, ClsConstructor: new (...args: any) => T, queryParams?: {}, maxItems?: number);
constructor(response: any, auth: Auth, ClsConstructor: new (...args: any) => T, queryParams?: {});
}
class ListableResource extends Array {
constructor(response, auth, ClsConstructor, queryParams = {}, maxItems = 10) {
constructor(response, auth, ClsConstructor, queryParams = {}) {
super();

@@ -9,3 +9,7 @@ const createObject = (data) => new ClsConstructor(data, auth);

let nextHref = response?.links?.next?.href;
const queryEntries = Object.entries(queryParams).filter(([, v]) => v !== void 0);
const limit100 = ["limit", 100];
const queryEntries = [
...Object.entries(queryParams).filter(([, v]) => v !== void 0),
limit100
];
const extraQueryString = queryEntries.length > 0 ? `&${queryEntries.map(([k, v]) => `${k}=${v}`).join("&")}` : "";

@@ -25,5 +29,2 @@ const fetchNext = async () => {

const done = Promise.resolve({ done: true, value: null });
if (index >= maxItems) {
return done;
}
if (index >= this.length) {

@@ -30,0 +31,0 @@ if (!nextHref) {

@@ -29,3 +29,3 @@ import Auth from './auth/auth.js';

export { AuthType } from './types/types.js';
export type { Config, ClaimsAndOptions } from './types/types.js';
export type { Config, ClaimsAndOptions, EventListener, EventTypes, } from './types/types.js';
export type { RestClientInstance } from './auth/restClient.js';

@@ -32,0 +32,0 @@ export type { RpcClientInstance } from './auth/rpcClient.js';

@@ -179,3 +179,11 @@ import type { JwtPayload, SignOptions } from 'jsonwebtoken';

};
export type EventListener = ((res: RpcResponseObject | any) => void) | ((type: string | any, data?: any) => void) | (() => void);
export type EventTypes = 'opened' | 'changed' | 'closed' | 'traffic:sent' | 'traffic:received' | 'traffic:*' | 'suspended' | 'resumed' | 'socket-error' | string;
export type RpcSession = {
/** Event listeners on Objects for the session */
eventListeners?: {
[qHandle: number]: {
[key in EventTypes]: Array<EventListener>;
};
};
/** Establishes the websocket against the configured URL and returns the Global instance. */

@@ -188,3 +196,3 @@ open(): Promise<RpcResponseObject>;

/** Listen to events */
on(event: 'opened' | 'closed' | 'suspended' | 'resumed' | string, listener: (() => void) | ((data: any) => void) | ((type: string, data: any) => void)): void;
on(event: EventTypes, listener: EventListener): void;
};

@@ -49,3 +49,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -151,5 +151,5 @@ async patch(data) {

api_keys_enabled,
max_api_key_expiry,
max_keys_per_user,
scim_externalClient_expiry,
max_api_key_expiry = "PT24H",
max_keys_per_user = 5,
scim_externalClient_expiry = "P365D",
...rest

@@ -280,3 +280,3 @@ }) {

@param tenantId - The tenant ID of the API keys configuration to be retrieved.
@param data
@param data -
*/

@@ -318,3 +318,3 @@ async patchConfig(tenantId, data) {

*/
async getApiKeys(queryParams = { limit: 20, sort: "-created" }, maxItems = 20) {
async getApiKeys(queryParams = { limit: 20, sort: "-created" }) {
const response = await this.auth.rest(

@@ -327,3 +327,3 @@ `/api-keys?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, ApiKey, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, ApiKey, queryParams);
}

@@ -333,3 +333,3 @@ /**

@param data
@param data -
*/

@@ -336,0 +336,0 @@ async create(data) {

@@ -125,3 +125,3 @@ import Auth from "../auth/auth.js";

@param path - Path to file content.
@param data
@param data -
*/

@@ -550,5 +550,5 @@ async setMediaFile(path, data) {

Thou,
Type,
Type = "UNKNOWN",
UseThou,
nDec,
nDec = 10,
...rest

@@ -934,3 +934,3 @@ }) {

attributes,
checkOriginAppId,
checkOriginAppId = true,
data,

@@ -2118,3 +2118,3 @@ targetId,

*/
async getEvaluations(guid, queryParams = { limit: 20 }, maxItems = 20) {
async getEvaluations(guid, queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -2127,3 +2127,3 @@ `${"/apps/{guid}/evaluations".replace("{guid}", guid)}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Evaluation, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Evaluation, queryParams);
}

@@ -2130,0 +2130,0 @@ /** Queue an app evaluation by its app guid.

@@ -388,3 +388,3 @@ import Auth from "../auth/auth.js";

*/
async getAudits(queryParams = { limit: 10, sort: "-eventTime" }, maxItems = 10) {
async getAudits(queryParams = { limit: 10, sort: "-eventTime" }) {
const response = await this.auth.rest(

@@ -397,3 +397,3 @@ `/audits?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, GetByIDResult, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, GetByIDResult, queryParams);
}

@@ -400,0 +400,0 @@ }

@@ -19,3 +19,3 @@ import Auth from "../auth/auth.js";

snippetIds,
state,
state = "available",
updatedAt,

@@ -102,3 +102,3 @@ workspace,

@param ownerId
@param ownerId -
*/

@@ -176,3 +176,3 @@ async move(ownerId) {

*/
async getRuns(queryParams = { limit: 10, sort: "id" }, maxItems = 10) {
async getRuns(queryParams = { limit: 10, sort: "id" }) {
const response = await this.auth.rest(

@@ -185,3 +185,3 @@ `${"/automations/{id}/runs".replace("{id}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, RunListObject, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, RunListObject, queryParams);
}

@@ -243,3 +243,3 @@ /**

schedules,
state,
state = "available",
workspace,

@@ -301,3 +301,3 @@ ...rest

runMode,
state,
state = "available",
updatedAt,

@@ -693,3 +693,3 @@ ...rest

@param data
@param data -
*/

@@ -746,3 +746,3 @@ async setSettings(data) {

*/
async getAutomations(queryParams = { limit: 100, sort: "id" }, maxItems = 100) {
async getAutomations(queryParams = { limit: 100, sort: "id" }) {
const response = await this.auth.rest(

@@ -755,3 +755,3 @@ `/automations?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, AutomationListObject, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, AutomationListObject, queryParams);
}

@@ -758,0 +758,0 @@ /**

@@ -110,3 +110,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -141,3 +141,3 @@ async createItem(data) {

@param data
@param data -
*/

@@ -696,3 +696,3 @@ async set(data) {

*/
async getCollections(queryParams = {}, maxItems = 10) {
async getCollections(queryParams = {}) {
const response = await this.auth.rest(

@@ -705,3 +705,3 @@ `/collections?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams);
}

@@ -712,3 +712,3 @@ /** Creates and returns a new collection. Collections can have the same name.

@param data
@param data -
*/

@@ -715,0 +715,0 @@ async create(data) {

@@ -67,3 +67,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -283,3 +283,3 @@ async set(data) {

*/
async getCspOrigins(queryParams = { limit: 20 }, maxItems = 20) {
async getCspOrigins(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -292,3 +292,3 @@ `/csp-origins?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, CSPEntry, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, CSPEntry, queryParams);
}

@@ -298,3 +298,3 @@ /**

@param data
@param data -
*/

@@ -301,0 +301,0 @@ async create(data) {

@@ -462,3 +462,3 @@ import Auth from "../auth/auth.js";

*/
async getConnections(queryParams = { limit: 20 }, maxItems = 20) {
async getConnections(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -471,3 +471,3 @@ `/data-files/connections?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, ConnectionsResponse, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, ConnectionsResponse, queryParams);
}

@@ -520,3 +520,3 @@ /**

*/
async getDataFiles(queryParams = { limit: 20 }, maxItems = 20) {
async getDataFiles(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -529,3 +529,3 @@ `/data-files?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, DataFileUploadResponse, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, DataFileUploadResponse, queryParams);
}

@@ -532,0 +532,0 @@ /**

@@ -113,3 +113,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
@param file - Extension archive.

@@ -275,3 +275,3 @@ */

@param data
@param data -
@param file - Extension archive.

@@ -278,0 +278,0 @@ */

@@ -311,3 +311,3 @@ import Auth from "../auth/auth.js";

*/
async filter(data, queryParams = { limit: 20, sort: "+name" }, maxItems = 20) {
async filter(data, queryParams = { limit: 20, sort: "+name" }) {
const response = await this.auth.rest(

@@ -321,3 +321,3 @@ `/groups/actions/filter?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Group, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Group, queryParams);
}

@@ -341,3 +341,3 @@ /** Returns the active tenant's group settings.

@param data
@param data -
*/

@@ -378,3 +378,3 @@ async patchSettings(data) {

*/
async getGroups(queryParams = { limit: 20 }, maxItems = 20) {
async getGroups(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -387,3 +387,3 @@ `/groups?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Group, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Group, queryParams);
}

@@ -390,0 +390,0 @@ }

@@ -286,3 +286,3 @@ import Auth from "../auth/auth.js";

*/
async getIdentityProviders(queryParams = { limit: 20 }, maxItems = 20) {
async getIdentityProviders(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -295,3 +295,3 @@ `/identity-providers?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, IDP, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, IDP, queryParams);
}

@@ -298,0 +298,0 @@ /** This endpoint creates an identity provider resource. It returns a 201 Created when creation is successful with a header "QLIK-IDP-POPTS" (A unique string representing a hash of the current configuration being tested), returns a 403 Forbidden for a non TenantAdmin user JWT or if the tenantID in the JWT does not match with any of the tenantIDs in the payload. An IdP can be created with Pending Options or options depending whether the IdP is interactive or not.

@@ -102,3 +102,3 @@ import Auth from "../auth/auth.js";

*/
async getCollections(queryParams = {}, maxItems = 10) {
async getCollections(queryParams = {}) {
const response = await this.auth.rest(

@@ -111,3 +111,3 @@ `${"/items/{itemId}/collections".replace("{itemId}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams);
}

@@ -124,3 +124,3 @@ /** Finds and returns the published items for a given item.

*/
async getPublisheditems(queryParams = {}, maxItems = 10) {
async getPublisheditems(queryParams = {}) {
const response = await this.auth.rest(

@@ -133,3 +133,3 @@ `${"/items/{itemId}/publisheditems".replace("{itemId}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, CollectionResultResponseBody, queryParams);
}

@@ -153,3 +153,3 @@ /** Deletes an item and removes the item from all collections.

@param data
@param data -
*/

@@ -232,3 +232,3 @@ async set(data) {

constructor({
usageMetricsEnabled,
usageMetricsEnabled = true,
...rest

@@ -657,3 +657,3 @@ }) {

@param data
@param data -
*/

@@ -713,3 +713,3 @@ async patchSettings(data) {

*/
async getItems(queryParams = {}, maxItems = 10) {
async getItems(queryParams = {}) {
const response = await this.auth.rest(

@@ -722,3 +722,3 @@ `/items?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, ItemResultResponseBody, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, ItemResultResponseBody, queryParams);
}

@@ -725,0 +725,0 @@ }

@@ -601,3 +601,3 @@ import Auth from "../auth/auth.js";

*/
async getAssignments(queryParams = { limit: 20 }, maxItems = 20) {
async getAssignments(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -610,3 +610,3 @@ `/licenses/assignments?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, AssignmentsResponseData, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, AssignmentsResponseData, queryParams);
}

@@ -621,3 +621,3 @@ /**

*/
async getConsumptions(queryParams = { limit: 200 }, maxItems = 200) {
async getConsumptions(queryParams = { limit: 200 }) {
const response = await this.auth.rest(

@@ -630,3 +630,3 @@ `/licenses/consumption?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, ConsumptionEventsResponseData, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, ConsumptionEventsResponseData, queryParams);
}

@@ -633,0 +633,0 @@ /**

@@ -120,3 +120,3 @@ import Auth from "../auth/auth.js";

*/
async getOauthTokens(queryParams = { sort: "userId" }, maxItems = 10) {
async getOauthTokens(queryParams = { sort: "userId" }) {
const response = await this.auth.rest(

@@ -129,3 +129,3 @@ `/oauth-tokens?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, OauthToken, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, OauthToken, queryParams);
}

@@ -132,0 +132,0 @@ }

@@ -172,3 +172,3 @@ import Auth from "../auth/auth.js";

queryError,
queryOrigin,
queryOrigin = "askQuestion",
queryText,

@@ -608,3 +608,3 @@ queryType,

@param qlik-web-integration-id - This header is only required for external clients or mashups for QCS, this value of this property should be the id of the web integration set up for the external client/mashup
@param data
@param data -
*/

@@ -628,5 +628,5 @@ async ask(data) {

@param data
@param data -
*/
async filter(data, queryParams = { limit: 100, sort: "+createdAt" }, maxItems = 100) {
async filter(data, queryParams = { limit: 100, sort: "+createdAt" }) {
const response = await this.auth.rest(

@@ -640,3 +640,3 @@ `/questions/actions/filter?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, NLMetricRecord, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, NLMetricRecord, queryParams);
}

@@ -643,0 +643,0 @@ }

@@ -261,3 +261,3 @@ import Auth from "../auth/auth.js";

*/
async getReloadTasks(queryParams = { limit: 10 }, maxItems = 10) {
async getReloadTasks(queryParams = { limit: 10 }) {
const response = await this.auth.rest(

@@ -270,3 +270,3 @@ `/reload-tasks?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Task, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Task, queryParams);
}

@@ -273,0 +273,0 @@ /**

@@ -193,3 +193,3 @@ import Auth from "../auth/auth.js";

*/
async getReloads(queryParams, maxItems = 10) {
async getReloads(queryParams) {
const response = await this.auth.rest(

@@ -202,3 +202,3 @@ `/reloads?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Reload, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Reload, queryParams);
}

@@ -205,0 +205,0 @@ /**

@@ -194,3 +194,3 @@ import Auth from "../auth/auth.js";

*/
async getRoles(queryParams = { limit: 20 }, maxItems = 20) {
async getRoles(queryParams = { limit: 20 }) {
const response = await this.auth.rest(

@@ -203,3 +203,3 @@ `/roles?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Role, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Role, queryParams);
}

@@ -206,0 +206,0 @@ }

@@ -98,3 +98,3 @@ import Auth from "../auth/auth.js";

*/
async getAssignments(queryParams = { limit: 10 }, maxItems = 10) {
async getAssignments(queryParams = { limit: 10 }) {
const response = await this.auth.rest(

@@ -107,3 +107,3 @@ `${"/spaces/{spaceId}/assignments".replace("{spaceId}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Assignment, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Assignment, queryParams);
}

@@ -615,3 +615,3 @@ /**

*/
async getSpaces(queryParams = { limit: 10 }, maxItems = 10) {
async getSpaces(queryParams = { limit: 10 }) {
const response = await this.auth.rest(

@@ -624,3 +624,3 @@ `/spaces?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Space, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Space, queryParams);
}

@@ -627,0 +627,0 @@ /**

@@ -95,3 +95,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
@param file - Theme archive.

@@ -217,3 +217,3 @@ */

@param data
@param data -
@param file - Theme archive.

@@ -220,0 +220,0 @@ */

@@ -85,3 +85,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -200,2 +200,15 @@ async patch(data) {

}
class JSONPatchAssignedRolesRefIDs {
constructor({
id,
...rest
}) {
this.id = id;
if (rest) {
Object.keys(rest).forEach((prop) => {
this[prop] = rest[prop];
});
}
}
}
class Metadata {

@@ -495,3 +508,3 @@ constructor({

*/
async filter(data, queryParams = { limit: 20, sort: "+name" }, maxItems = 20) {
async filter(data, queryParams = { limit: 20, sort: "+name" }) {
const response = await this.auth.rest(

@@ -505,3 +518,3 @@ `/users/actions/filter?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, User, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, User, queryParams);
}

@@ -606,3 +619,3 @@ /** Redirects to retrieve the user resource associated with the JWT claims.

status: "active"
}, maxItems = 20) {
}) {
const response = await this.auth.rest(

@@ -615,3 +628,3 @@ `/users?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, User, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, User, queryParams);
}

@@ -621,3 +634,3 @@ /** Creates an invited user.

@param data
@param data -
*/

@@ -643,2 +656,3 @@ async create(data) {

JSONPatchArray,
JSONPatchAssignedRolesRefIDs,
Metadata,

@@ -645,0 +659,0 @@ User,

@@ -43,3 +43,3 @@ import Auth from "../auth/auth.js";

@param data
@param data -
*/

@@ -287,3 +287,3 @@ async patch(data) {

*/
async getWebIntegrations(queryParams = { limit: 10, sort: "+name" }, maxItems = 10) {
async getWebIntegrations(queryParams = { limit: 10, sort: "+name" }) {
const response = await this.auth.rest(

@@ -296,3 +296,3 @@ `/web-integrations?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, WebIntegration, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, WebIntegration, queryParams);
}

@@ -302,3 +302,3 @@ /** Creates a web integration.

@param data
@param data -
*/

@@ -305,0 +305,0 @@ async create(data) {

@@ -15,3 +15,3 @@ import Auth from "../auth/auth.js";

id,
level,
level = "tenant",
name,

@@ -89,3 +89,3 @@ ownerId,

*/
async getDeliveries(queryParams = { limit: 20, sort: "-triggeredAt" }, maxItems = 20) {
async getDeliveries(queryParams = { limit: 20, sort: "-triggeredAt" }) {
const response = await this.auth.rest(

@@ -98,3 +98,3 @@ `${"/webhooks/{id}/deliveries".replace("{id}", this.id ?? "")}?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Delivery, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Delivery, queryParams);
}

@@ -116,3 +116,3 @@ /**

@param WebhookPatchData
@param WebhookPatchData -
*/

@@ -131,3 +131,3 @@ async patch(WebhookPatchData) {

@param data
@param data -
*/

@@ -342,3 +342,3 @@ async set(data) {

headers,
level,
level = "tenant",
name,

@@ -496,3 +496,3 @@ ownerId,

*/
async getWebhooks(queryParams = { limit: 20, sort: "-createdAt" }, maxItems = 20) {
async getWebhooks(queryParams = { limit: 20, sort: "-createdAt" }) {
const response = await this.auth.rest(

@@ -505,3 +505,3 @@ `/webhooks?${new URLSearchParams(Object.entries(queryParams).filter(([, v]) => v !== void 0).map(([k, v]) => [k, v.toString()])).toString()}`,

const responseJson = await response.json();
return new ListableResource(responseJson, this.auth, Webhook, queryParams, maxItems);
return new ListableResource(responseJson, this.auth, Webhook, queryParams);
}

@@ -511,3 +511,3 @@ /**

@param data
@param data -
*/

@@ -514,0 +514,0 @@ async create(data) {

@@ -59,3 +59,2 @@ import {

Object.assign(this.rpc, { interceptors: this.rpcClient.interceptors });
Object.assign(this.rpc, { eventListeners: this.rpcClient.eventListeners });
this.rest = restClient.restClientInstance;

@@ -62,0 +61,0 @@ this.generateWebsocketUrl = (appId, appendAccessToken) => generateWebsocketUrl(appId, this.rest, this.config, appendAccessToken);

@@ -87,3 +87,3 @@

}
const version = "0.19.1";
const version = "0.20.0";
const anyBody = init?.body;

@@ -90,0 +90,0 @@ const hasFormDataBody = anyBody?.append !== void 0;

@@ -30,3 +30,2 @@

this.sessions = {};
this.eventListeners = {};
this.config = config;

@@ -58,5 +57,15 @@ this.rest = rest ?? new RestClient(config).restClientInstance;

session.on("closed", (data) => {
if (this.sessions[session.config?.url]?.eventListeners) {
Object.values(this.sessions[session.config?.url]?.eventListeners)?.forEach((handle) => {
handle?.closed?.forEach(
(listener) => {
listener(data);
}
);
});
}
if (data?.code && data.code >= 4e3) {
session.onRpcError(new EngineCloseError(data.code, data.reason));
}
delete this.sessions[session.config?.url];
});

@@ -68,6 +77,6 @@ return session;

if ("handle" in msg) {
this.eventListeners?.[msg.handle]?.[`traffic:${direction}`]?.forEach((listener) => {
this.sessions[url.toString()]?.eventListeners?.[msg.handle]?.[`traffic:${direction}`]?.forEach((listener) => {
listener(msg);
});
this.eventListeners?.[msg.handle]?.["traffic:*"]?.forEach((listener) => {
this.sessions[url.toString()]?.eventListeners?.[msg.handle]?.["traffic:*"]?.forEach((listener) => {
listener(msg);

@@ -78,3 +87,5 @@ });

msg.change.forEach((qHandle) => {
this.eventListeners[qHandle]?.changed?.forEach((listener) => listener(msg));
this.sessions[url.toString()]?.eventListeners?.[qHandle]?.changed?.forEach(
(listener) => listener(msg)
);
});

@@ -84,3 +95,5 @@ }

msg.close.forEach((qHandle) => {
this.eventListeners[qHandle]?.closed?.forEach((listener) => listener(msg));
this.sessions[url.toString()]?.eventListeners?.[qHandle]?.closed?.forEach(
(listener) => listener(msg)
);
});

@@ -87,0 +100,0 @@ }

class ListableResource extends Array {
constructor(response, auth, ClsConstructor, queryParams = {}, maxItems = 10) {
constructor(response, auth, ClsConstructor, queryParams = {}) {
super();

@@ -9,3 +9,7 @@ const createObject = (data) => new ClsConstructor(data, auth);

let nextHref = response?.links?.next?.href;
const queryEntries = Object.entries(queryParams).filter(([, v]) => v !== void 0);
const limit100 = ["limit", 100];
const queryEntries = [
...Object.entries(queryParams).filter(([, v]) => v !== void 0),
limit100
];
const extraQueryString = queryEntries.length > 0 ? `&${queryEntries.map(([k, v]) => `${k}=${v}`).join("&")}` : "";

@@ -25,5 +29,2 @@ const fetchNext = async () => {

const done = Promise.resolve({ done: true, value: null });
if (index >= maxItems) {
return done;
}
if (index >= this.length) {

@@ -30,0 +31,0 @@ if (!nextHref) {

{
"name": "@qlik/sdk",
"version": "0.19.1",
"version": "0.20.0",
"description": "The Qlik Platform SDKs are a suite of tools, libraries, and documentation that simplifies building high-quality and performant applications on top of the Qlik Sense Platform.",

@@ -241,5 +241,5 @@ "types": "dist/esm/qlik.d.ts",

"@types/jsonwebtoken": "9.0.1",
"enigma.js": "2.10.0",
"enigma.js": "2.11.0",
"jsonwebtoken": "9.0.0",
"ws": "8.12.0"
"ws": "8.13.0"
},

@@ -250,15 +250,15 @@ "files": [

"devDependencies": {
"@babel/core": "7.20.12",
"@babel/core": "7.21.3",
"@babel/preset-env": "7.20.2",
"@babel/preset-typescript": "7.18.6",
"@qlik-trial/spectacular": "0.19.0",
"@qlik-trial/spectacular": "0.21.3",
"@types/jest": "29.4.0",
"@types/node": "18.14.0",
"@types/node": "18.15.1",
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "5.52.0",
"@typescript-eslint/eslint-plugin": "5.54.0",
"@typescript-eslint/parser": "5.52.0",
"cross-env": "7.0.3",
"cypress": "12.6.0",
"cypress": "12.7.0",
"dotenv": "16.0.3",
"esbuild": "0.17.9",
"esbuild": "0.17.11",
"eslint": "8.34.0",

@@ -272,3 +272,3 @@ "eslint-config-airbnb-base": "15.0.0",

"jest": "29.4.3",
"jest-environment-jsdom": "29.4.3",
"jest-environment-jsdom": "29.5.0",
"jszip": "3.10.1",

@@ -279,3 +279,3 @@ "start-server-and-test": "1.15.4",

"ts-node": "10.9.1",
"typedoc": "0.23.25",
"typedoc": "0.23.28",
"typedoc-plugin-markdown": "3.14.0",

@@ -282,0 +282,0 @@ "typedoc-plugin-rename-defaults": "0.6.4",

@@ -8,2 +8,3 @@ # qlik-sdk-typescript

- [qlik-sdk-typescript](#qlik-sdk-typescript)
- [Getting started](#getting-started)
- [Install](#install)

@@ -16,13 +17,11 @@ - [Authentication options](#authentication-options)

- [Fetch](#fetch)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Bugs](#bugs)
- [Features](#features)
- [Developing](#developing)
- [Test](#test)
- [Environment variables](#environment-variables)
- [Releasing](#releasing)
- [ES6-Modules](#es6-modules)
- [CommonJS](#commonjs)
- [Object events](#object-events)
- [Paginated responses](#paginated-responses)
- [Examples](#examples)
- [Express OAuth](#express-oauth)
- [Node.js](#nodejs)
- [Node16](#node16)
- [Pagination](#pagination)
- [Single Page Application OAuth](#single-page-application-oauth)

@@ -143,3 +142,3 @@ - [Web App](#web-app)

// websocket url for Enigma.js
const wsUrl = await generateWebsocketUrl(appId);
const wsUrl = await auth.generateWebsocketUrl(appId);
}

@@ -254,80 +253,2 @@ // ....

```js
const queryParams = {}
const maxItems = 100
const items = await qlik.items.getItems(queryParams, maxItems);
// The response from getItems will only include the first (about 10) elements
// The elements can be accessed like an array
const item0 = items[0]
const all100ItemNames = [];
// The items.pagination iterator can be used to get all the elements up until max is reached.
// When looping through items.pagination it will
// start at the first element returned from the getItems request.
// Additional get items requests will be done as needed.
for await (const item of items.pagination) {
all100ItemNames.push(item.names);
}
// All elements are now accessible through the array index
const item99 = items[99]
```
## Changelog
Detailed changes for each release are documented in the [release notes](./CHANGELOG.md).
## Contributing
Please make sure to read and follow our [Code of conduct](https://github.com/qlik-oss/open-source/blob/master/CODE_OF_CONDUCT.md)
### Bugs
Bugs can be reported by adding issues in the repository. Please use the Bug Report template.
### Features
Features can also be reported by adding issues in the repository. Please use the Feature Request template.
### Developing
```bash
# install dependencies
yarn
# lint - also includes TSDoc linting (warn)
yarn lint
# lint with auto fix
yarn lint:fix
# run tests
yarn test
yarn test:unit
yarn test:integration
# generate documentation (typedoc) under `/docs`
yarn docs
# run build
yarn build
# re-build on file change - useful during development
yarn build:watch
```
#### Test
To run specific jest test files use [testRegex](https://jestjs.io/docs/configuration#testregex-string--arraystring)
##### Environment variables
Copy `.env.example` to `.env` and fill in the values
### Releasing
To create a release of the sdk do the following steps
1. Check first that the documentation is updated (run `yarn docs`)
2. Update the [CHANGELOG.md](./CHANGELOG.md) with the changes compared to previous release.
3. Change version in [package.json](./package.json).
4. Open a Pull Request towards main branch with the changes from previous steps. Merge when approved.
5. Create a github release for the new version.
## Examples

@@ -518,2 +439,102 @@

### Node16
```js
const path = require('path');
const process = require('process');
require('dotenv').config({ path: path.join(__dirname, '.env') });
const { Auth, AuthType } = require('@qlik/sdk');
const fetch = require('cross-fetch');
global.fetch = fetch;
const envVars = ['QCS_SERVER', 'QCS_API_KEY'];
for (let i = 0; i < envVars.length; i += 1) {
if (!(envVars[i] in process.env)) {
console.log(`Missing environment variable: ${envVars[i]}`);
process.exit(1);
}
}
const auth = new Auth({
authType: AuthType.APIKey,
host: process.env.QCS_SERVER,
apiKey: process.env.QCS_API_KEY,
});
(async () => {
// get user
try {
const res = await auth.rest('/users/me');
if (res.status !== 200) {
console.log('Failed to get /users/me');
process.exit(1);
}
const userData = await res.json();
console.log(`Logged in as: ${userData.name}`);
} catch (error) {
console.log('Error on get /users/me');
console.log(error);
}
})();
```
### Pagination
```js
const path = require('path');
const process = require('process');
require('dotenv').config({ path: path.join(__dirname, '.env') });
const { AuthType } = require('@qlik/sdk');
const Qlik = require('@qlik/sdk').default;
const envVars = ['QCS_SERVER', 'QCS_API_KEY'];
for (let i = 0; i < envVars.length; i += 1) {
if (!(envVars[i] in process.env)) {
console.log(`Missing environment variable: ${envVars[i]}`);
process.exit(1);
}
}
(async () => {
const qlik = new Qlik({
authType: AuthType.APIKey,
host: process.env.QCS_SERVER,
apiKey: process.env.QCS_API_KEY,
});
const user = await qlik.users.getMe();
// Get all app items by setting resourceType to 'app',
// created by current user: createdByUserId: user.id
// The response from getItems will only include the first (about 10) elements
const items = await qlik.items.getItems(
{ resourceType: 'app', createdByUserId: user.id },
);
// The elements can be accessed like an array
const firstItem = items[0];
console.log(`First item name = ${firstItem.name}`);
// The items.pagination iterator can be used
// to get all the elements
// When looping through items.pagination it will
// start at the first element returned from the getItems request.
// Additional get items requests will be done as needed.
const allItemNames = [];
for await (const item of items.pagination) {
allItemNames.push(item.name);
}
// All elements are now accessible through the array index
const lastItem = items[items.length - 1];
console.log(`Last item name = ${lastItem.name}`);
console.log(allItemNames);
})();
```
### Single Page Application OAuth

@@ -531,4 +552,4 @@

authType: AuthType.OAuth2,
host: process.env.OAUTH_QCS_SERVER,
clientId: process.env.OAUTH_CLIENT_ID,
host: process.env.OAUTH_QCS_SERVER2,
clientId: process.env.OAUTH_CLIENT_ID2,
redirectUri: process.env.OAUTH_REDIRECT_URI,

@@ -535,0 +556,0 @@ });

{
"name": "@qlik/sdk",
"version": "0.19.1",
"version": "0.20.0",
"description": "The Qlik Platform SDKs are a suite of tools, libraries, and documentation that simplifies building high-quality and performant applications on top of the Qlik Sense Platform.",

@@ -241,5 +241,5 @@ "types": "dist/esm/qlik.d.ts",

"@types/jsonwebtoken": "9.0.1",
"enigma.js": "2.10.0",
"enigma.js": "2.11.0",
"jsonwebtoken": "9.0.0",
"ws": "8.12.0"
"ws": "8.13.0"
},

@@ -250,15 +250,15 @@ "files": [

"devDependencies": {
"@babel/core": "7.20.12",
"@babel/core": "7.21.3",
"@babel/preset-env": "7.20.2",
"@babel/preset-typescript": "7.18.6",
"@qlik-trial/spectacular": "0.19.0",
"@qlik-trial/spectacular": "0.21.3",
"@types/jest": "29.4.0",
"@types/node": "18.14.0",
"@types/node": "18.15.1",
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "5.52.0",
"@typescript-eslint/eslint-plugin": "5.54.0",
"@typescript-eslint/parser": "5.52.0",
"cross-env": "7.0.3",
"cypress": "12.6.0",
"cypress": "12.7.0",
"dotenv": "16.0.3",
"esbuild": "0.17.9",
"esbuild": "0.17.11",
"eslint": "8.34.0",

@@ -272,3 +272,3 @@ "eslint-config-airbnb-base": "15.0.0",

"jest": "29.4.3",
"jest-environment-jsdom": "29.4.3",
"jest-environment-jsdom": "29.5.0",
"jszip": "3.10.1",

@@ -279,3 +279,3 @@ "start-server-and-test": "1.15.4",

"ts-node": "10.9.1",
"typedoc": "0.23.25",
"typedoc": "0.23.28",
"typedoc-plugin-markdown": "3.14.0",

@@ -288,2 +288,2 @@ "typedoc-plugin-rename-defaults": "0.6.4",

}
}
}

@@ -8,2 +8,3 @@ # qlik-sdk-typescript

- [qlik-sdk-typescript](#qlik-sdk-typescript)
- [Getting started](#getting-started)
- [Install](#install)

@@ -16,13 +17,11 @@ - [Authentication options](#authentication-options)

- [Fetch](#fetch)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Bugs](#bugs)
- [Features](#features)
- [Developing](#developing)
- [Test](#test)
- [Environment variables](#environment-variables)
- [Releasing](#releasing)
- [ES6-Modules](#es6-modules)
- [CommonJS](#commonjs)
- [Object events](#object-events)
- [Paginated responses](#paginated-responses)
- [Examples](#examples)
- [Express OAuth](#express-oauth)
- [Node.js](#nodejs)
- [Node16](#node16)
- [Pagination](#pagination)
- [Single Page Application OAuth](#single-page-application-oauth)

@@ -143,3 +142,3 @@ - [Web App](#web-app)

// websocket url for Enigma.js
const wsUrl = await generateWebsocketUrl(appId);
const wsUrl = await auth.generateWebsocketUrl(appId);
}

@@ -254,80 +253,2 @@ // ....

```js
const queryParams = {}
const maxItems = 100
const items = await qlik.items.getItems(queryParams, maxItems);
// The response from getItems will only include the first (about 10) elements
// The elements can be accessed like an array
const item0 = items[0]
const all100ItemNames = [];
// The items.pagination iterator can be used to get all the elements up until max is reached.
// When looping through items.pagination it will
// start at the first element returned from the getItems request.
// Additional get items requests will be done as needed.
for await (const item of items.pagination) {
all100ItemNames.push(item.names);
}
// All elements are now accessible through the array index
const item99 = items[99]
```
## Changelog
Detailed changes for each release are documented in the [release notes](./CHANGELOG.md).
## Contributing
Please make sure to read and follow our [Code of conduct](https://github.com/qlik-oss/open-source/blob/master/CODE_OF_CONDUCT.md)
### Bugs
Bugs can be reported by adding issues in the repository. Please use the Bug Report template.
### Features
Features can also be reported by adding issues in the repository. Please use the Feature Request template.
### Developing
```bash
# install dependencies
yarn
# lint - also includes TSDoc linting (warn)
yarn lint
# lint with auto fix
yarn lint:fix
# run tests
yarn test
yarn test:unit
yarn test:integration
# generate documentation (typedoc) under `/docs`
yarn docs
# run build
yarn build
# re-build on file change - useful during development
yarn build:watch
```
#### Test
To run specific jest test files use [testRegex](https://jestjs.io/docs/configuration#testregex-string--arraystring)
##### Environment variables
Copy `.env.example` to `.env` and fill in the values
### Releasing
To create a release of the sdk do the following steps
1. Check first that the documentation is updated (run `yarn docs`)
2. Update the [CHANGELOG.md](./CHANGELOG.md) with the changes compared to previous release.
3. Change version in [package.json](./package.json).
4. Open a Pull Request towards main branch with the changes from previous steps. Merge when approved.
5. Create a github release for the new version.
## Examples

@@ -518,2 +439,102 @@

### Node16
```js
const path = require('path');
const process = require('process');
require('dotenv').config({ path: path.join(__dirname, '.env') });
const { Auth, AuthType } = require('@qlik/sdk');
const fetch = require('cross-fetch');
global.fetch = fetch;
const envVars = ['QCS_SERVER', 'QCS_API_KEY'];
for (let i = 0; i < envVars.length; i += 1) {
if (!(envVars[i] in process.env)) {
console.log(`Missing environment variable: ${envVars[i]}`);
process.exit(1);
}
}
const auth = new Auth({
authType: AuthType.APIKey,
host: process.env.QCS_SERVER,
apiKey: process.env.QCS_API_KEY,
});
(async () => {
// get user
try {
const res = await auth.rest('/users/me');
if (res.status !== 200) {
console.log('Failed to get /users/me');
process.exit(1);
}
const userData = await res.json();
console.log(`Logged in as: ${userData.name}`);
} catch (error) {
console.log('Error on get /users/me');
console.log(error);
}
})();
```
### Pagination
```js
const path = require('path');
const process = require('process');
require('dotenv').config({ path: path.join(__dirname, '.env') });
const { AuthType } = require('@qlik/sdk');
const Qlik = require('@qlik/sdk').default;
const envVars = ['QCS_SERVER', 'QCS_API_KEY'];
for (let i = 0; i < envVars.length; i += 1) {
if (!(envVars[i] in process.env)) {
console.log(`Missing environment variable: ${envVars[i]}`);
process.exit(1);
}
}
(async () => {
const qlik = new Qlik({
authType: AuthType.APIKey,
host: process.env.QCS_SERVER,
apiKey: process.env.QCS_API_KEY,
});
const user = await qlik.users.getMe();
// Get all app items by setting resourceType to 'app',
// created by current user: createdByUserId: user.id
// The response from getItems will only include the first (about 10) elements
const items = await qlik.items.getItems(
{ resourceType: 'app', createdByUserId: user.id },
);
// The elements can be accessed like an array
const firstItem = items[0];
console.log(`First item name = ${firstItem.name}`);
// The items.pagination iterator can be used
// to get all the elements
// When looping through items.pagination it will
// start at the first element returned from the getItems request.
// Additional get items requests will be done as needed.
const allItemNames = [];
for await (const item of items.pagination) {
allItemNames.push(item.name);
}
// All elements are now accessible through the array index
const lastItem = items[items.length - 1];
console.log(`Last item name = ${lastItem.name}`);
console.log(allItemNames);
})();
```
### Single Page Application OAuth

@@ -531,4 +552,4 @@

authType: AuthType.OAuth2,
host: process.env.OAUTH_QCS_SERVER,
clientId: process.env.OAUTH_CLIENT_ID,
host: process.env.OAUTH_QCS_SERVER2,
clientId: process.env.OAUTH_CLIENT_ID2,
redirectUri: process.env.OAUTH_REDIRECT_URI,

@@ -535,0 +556,0 @@ });

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc