From e891f2b08a4894b86a31f818a5639a6feb2b5050 Mon Sep 17 00:00:00 2001 From: Qlik OSS Build Bot <31236930+qlikossbuild@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:02:21 +0200 Subject: [PATCH] feat: qlik api updates (#79) Co-authored-by: qlikossbuild --- api-keys.js | 4 +- apps.js | 4 +- audits.js | 4 +- auth.js | 4 +- automations.js | 4 +- brands.js | 4 +- chunks/{MFNOHOWH.js => 3XUFIUKR.js} | 2 +- chunks/{7IMOYFWE.js => AJZHO3JW.js} | 2 +- chunks/{6O3XBOLZ.js => GPIKV6PO.js} | 2 +- chunks/{YHKRUQRS.js => JUVTHREC.js} | 74 ++++++++++++++++++++++++++--- chunks/{GXMVBX45.js => TXEL4LPW.js} | 2 +- collections.js | 4 +- csp-origins.js | 4 +- data-assets.js | 4 +- data-connections.js | 4 +- data-credentials.js | 4 +- data-files.js | 4 +- extensions.js | 4 +- glossaries.js | 4 +- groups.js | 4 +- identity-providers.js | 4 +- index.js | 8 ++-- items.js | 4 +- licenses.js | 4 +- qix.js | 4 +- quotas.js | 4 +- reload-tasks.js | 4 +- reloads.js | 4 +- reports.js | 4 +- roles.js | 4 +- spaces.js | 4 +- temp-contents.js | 4 +- tenants.js | 4 +- themes.js | 4 +- transports.js | 4 +- users.js | 4 +- web-integrations.js | 4 +- web-notifications.js | 4 +- webhooks.js | 4 +- 39 files changed, 141 insertions(+), 81 deletions(-) rename chunks/{MFNOHOWH.js => 3XUFIUKR.js} (96%) rename chunks/{7IMOYFWE.js => AJZHO3JW.js} (93%) rename chunks/{6O3XBOLZ.js => GPIKV6PO.js} (96%) rename chunks/{YHKRUQRS.js => JUVTHREC.js} (90%) rename chunks/{GXMVBX45.js => TXEL4LPW.js} (98%) diff --git a/api-keys.js b/api-keys.js index 662014d..432cc70 100644 --- a/api-keys.js +++ b/api-keys.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/api-keys.ts diff --git a/apps.js b/apps.js index 31423f1..0d9233c 100644 --- a/apps.js +++ b/apps.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/apps.ts diff --git a/audits.js b/audits.js index 9b7c87f..b98c037 100644 --- a/audits.js +++ b/audits.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/audits.ts diff --git a/auth.js b/auth.js index f716d23..a16f96a 100644 --- a/auth.js +++ b/auth.js @@ -4,8 +4,8 @@ import { logout, registerAuthModule, setDefaultHostConfig -} from "./chunks/6O3XBOLZ.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/GPIKV6PO.js"; +import "./chunks/AJZHO3JW.js"; export { auth_default as default, getAccessToken, diff --git a/automations.js b/automations.js index a98f3e2..dd4cbed 100644 --- a/automations.js +++ b/automations.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/automations.ts diff --git a/brands.js b/brands.js index ce3c8c7..438573c 100644 --- a/brands.js +++ b/brands.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/brands.ts diff --git a/chunks/MFNOHOWH.js b/chunks/3XUFIUKR.js similarity index 96% rename from chunks/MFNOHOWH.js rename to chunks/3XUFIUKR.js index f557a1b..1dd2d43 100644 --- a/chunks/MFNOHOWH.js +++ b/chunks/3XUFIUKR.js @@ -1,6 +1,6 @@ import { getInvokeFetchRuntimeModule -} from "./7IMOYFWE.js"; +} from "./AJZHO3JW.js"; import { isBrowser } from "./2ZQ3ZX7F.js"; diff --git a/chunks/7IMOYFWE.js b/chunks/AJZHO3JW.js similarity index 93% rename from chunks/7IMOYFWE.js rename to chunks/AJZHO3JW.js index 5465132..b487c38 100644 --- a/chunks/7IMOYFWE.js +++ b/chunks/AJZHO3JW.js @@ -8,7 +8,7 @@ function getAuthRuntimeModule(hostConfig) { async function getQixRuntimeModule(hostConfig) { await getAuthRuntimeModule(hostConfig); const isNode = !!globalThis.process?.argv; - return isNode ? import("./YHKRUQRS.js") : import("./TBHMVTOT.js").then( + return isNode ? import("./JUVTHREC.js") : import("./TBHMVTOT.js").then( (mod) => mod.importRuntimeModule("qix@v1", hostConfig) ); } diff --git a/chunks/6O3XBOLZ.js b/chunks/GPIKV6PO.js similarity index 96% rename from chunks/6O3XBOLZ.js rename to chunks/GPIKV6PO.js index 127caca..9fffb8e 100644 --- a/chunks/6O3XBOLZ.js +++ b/chunks/GPIKV6PO.js @@ -1,6 +1,6 @@ import { getAuthRuntimeModule -} from "./7IMOYFWE.js"; +} from "./AJZHO3JW.js"; // src/public/auth.ts function registerAuthModule(name, authModule) { diff --git a/chunks/YHKRUQRS.js b/chunks/JUVTHREC.js similarity index 90% rename from chunks/YHKRUQRS.js rename to chunks/JUVTHREC.js index ce38d02..1b98ce2 100644 --- a/chunks/YHKRUQRS.js +++ b/chunks/JUVTHREC.js @@ -449,6 +449,72 @@ function getOrCreateSharedSession(props) { sharedSessions[key] = sharedSessions[key] || createSharedSession(props); return sharedSessions[key]; } +function getExternalSession(externalApp, appSessionProps) { + const listeners = /* @__PURE__ */ new Set(); + const appSession = { + _listeners: listeners, + getDoc: () => externalApp, + onWebSocketEvent: (fn) => () => { + appSession._listeners.add(fn); + return () => { + appSession._listeners.delete(fn); + }; + }, + resume: () => Promise.resolve(), + close: () => Promise.resolve() + }; + const triggerEventListeners = (event) => { + for (const fn of globalEventListeners) { + fn(event); + } + for (const fn of appSession._listeners) { + fn(event); + } + }; + externalApp.then((app) => { + app.session.on("opened", (event) => { + const wsEvent = { + eventType: "opened", + ...appSessionProps, + ...event + }; + triggerEventListeners(wsEvent); + }); + app.session.on("closed", (event) => { + const wsEvent = { + eventType: "closed", + ...appSessionProps, + ...event + }; + triggerEventListeners(wsEvent); + }); + app.session.on("suspended", (event) => { + const wsEvent = { + eventType: "suspended", + ...appSessionProps, + ...event + }; + triggerEventListeners(wsEvent); + }); + app.session.on("resuming", (event) => { + const wsEvent = { + eventType: "resuming", + ...appSessionProps, + ...event + }; + triggerEventListeners(wsEvent); + }); + app.session.on("resumed", (event) => { + const wsEvent = { + eventType: "resumed", + ...appSessionProps, + ...event + }; + triggerEventListeners(wsEvent); + }); + }); + return appSession; +} // src/qix/qix-functions.ts async function createSessionApp() { @@ -491,13 +557,7 @@ function openAppSession(appIdOrProps) { const appSessionId = toGlobalAppSessionId(appSessionProps); const externalApp = externalApps[appSessionId]; if (externalApp) { - return { - getDoc: () => externalApp, - onWebSocketEvent: (fn) => () => { - }, - resume: () => Promise.resolve(), - close: () => Promise.resolve() - }; + return getExternalSession(externalApp, appSessionProps); } const sharedSession = getOrCreateSharedSession(appSessionProps); const listeners = /* @__PURE__ */ new Set(); diff --git a/chunks/GXMVBX45.js b/chunks/TXEL4LPW.js similarity index 98% rename from chunks/GXMVBX45.js rename to chunks/TXEL4LPW.js index a2aee91..630fcca 100644 --- a/chunks/GXMVBX45.js +++ b/chunks/TXEL4LPW.js @@ -1,6 +1,6 @@ import { getQixRuntimeModule -} from "./7IMOYFWE.js"; +} from "./AJZHO3JW.js"; // src/public/qix.ts function openAppSession(appSessionProps) { diff --git a/collections.js b/collections.js index 3fdf96f..3210f7b 100644 --- a/collections.js +++ b/collections.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/collections.ts diff --git a/csp-origins.js b/csp-origins.js index 51d808c..ecb1fb0 100644 --- a/csp-origins.js +++ b/csp-origins.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/csp-origins.ts diff --git a/data-assets.js b/data-assets.js index 26a8ca0..5c644a2 100644 --- a/data-assets.js +++ b/data-assets.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/data-assets.ts diff --git a/data-connections.js b/data-connections.js index cf10695..4ba1894 100644 --- a/data-connections.js +++ b/data-connections.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/data-connections.ts diff --git a/data-credentials.js b/data-credentials.js index 6bee378..28ff610 100644 --- a/data-credentials.js +++ b/data-credentials.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/data-credentials.ts diff --git a/data-files.js b/data-files.js index 78b9db9..2ff4dcc 100644 --- a/data-files.js +++ b/data-files.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/data-files.ts diff --git a/extensions.js b/extensions.js index 53ea5aa..d6108d7 100644 --- a/extensions.js +++ b/extensions.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/extensions.ts diff --git a/glossaries.js b/glossaries.js index 3cac12d..a536b13 100644 --- a/glossaries.js +++ b/glossaries.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/glossaries.ts diff --git a/groups.js b/groups.js index 2d14b6f..47825be 100644 --- a/groups.js +++ b/groups.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/groups.ts diff --git a/identity-providers.js b/identity-providers.js index 2203c45..7a3fc8d 100644 --- a/identity-providers.js +++ b/identity-providers.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/identity-providers.ts diff --git a/index.js b/index.js index 3a8bab9..984a256 100644 --- a/index.js +++ b/index.js @@ -1,14 +1,14 @@ import { qix_default -} from "./chunks/GXMVBX45.js"; +} from "./chunks/TXEL4LPW.js"; import { auth_default -} from "./chunks/6O3XBOLZ.js"; +} from "./chunks/GPIKV6PO.js"; import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/public-runtime-api-generator/public-runtime-api-generator.ts diff --git a/items.js b/items.js index f30c7b2..3571626 100644 --- a/items.js +++ b/items.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/items.ts diff --git a/licenses.js b/licenses.js index bfaea4f..28384bf 100644 --- a/licenses.js +++ b/licenses.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/licenses.ts diff --git a/qix.js b/qix.js index 42af98a..594e368 100644 --- a/qix.js +++ b/qix.js @@ -1,8 +1,8 @@ import { openAppSession, qix_default -} from "./chunks/GXMVBX45.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/TXEL4LPW.js"; +import "./chunks/AJZHO3JW.js"; export { qix_default as default, openAppSession diff --git a/quotas.js b/quotas.js index 8ec275b..b212c4d 100644 --- a/quotas.js +++ b/quotas.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/quotas.ts diff --git a/reload-tasks.js b/reload-tasks.js index f999fbc..c28c3f5 100644 --- a/reload-tasks.js +++ b/reload-tasks.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/reload-tasks.ts diff --git a/reloads.js b/reloads.js index 59f3ce6..558a235 100644 --- a/reloads.js +++ b/reloads.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/reloads.ts diff --git a/reports.js b/reports.js index 4a6cfe0..2ae608e 100644 --- a/reports.js +++ b/reports.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/reports.ts diff --git a/roles.js b/roles.js index 829a02d..21633ca 100644 --- a/roles.js +++ b/roles.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/roles.ts diff --git a/spaces.js b/spaces.js index 9c0bb05..4650344 100644 --- a/spaces.js +++ b/spaces.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/spaces.ts diff --git a/temp-contents.js b/temp-contents.js index 8388085..aced359 100644 --- a/temp-contents.js +++ b/temp-contents.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/temp-contents.ts diff --git a/tenants.js b/tenants.js index 386b147..52f9861 100644 --- a/tenants.js +++ b/tenants.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/tenants.ts diff --git a/themes.js b/themes.js index 8e8ba8c..edaa299 100644 --- a/themes.js +++ b/themes.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/themes.ts diff --git a/transports.js b/transports.js index bf285da..bd8a8ed 100644 --- a/transports.js +++ b/transports.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/transports.ts diff --git a/users.js b/users.js index f8601c4..af827e7 100644 --- a/users.js +++ b/users.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/users.ts diff --git a/web-integrations.js b/web-integrations.js index e450636..130f140 100644 --- a/web-integrations.js +++ b/web-integrations.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/web-integrations.ts diff --git a/web-notifications.js b/web-notifications.js index 0690b2b..c570d9d 100644 --- a/web-notifications.js +++ b/web-notifications.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/web-notifications.ts diff --git a/webhooks.js b/webhooks.js index 9e1b9e1..b433c1c 100644 --- a/webhooks.js +++ b/webhooks.js @@ -1,8 +1,8 @@ import { clearApiCache, invokeFetch -} from "./chunks/MFNOHOWH.js"; -import "./chunks/7IMOYFWE.js"; +} from "./chunks/3XUFIUKR.js"; +import "./chunks/AJZHO3JW.js"; import "./chunks/2ZQ3ZX7F.js"; // src/public/rest/webhooks.ts