Skip to content

Commit

Permalink
feat: qlik api updates (#79)
Browse files Browse the repository at this point in the history
Co-authored-by: qlikossbuild <[email protected]>
  • Loading branch information
qlikossbuild and qlikossbuild authored Aug 19, 2024
1 parent 54e825a commit e891f2b
Show file tree
Hide file tree
Showing 39 changed files with 141 additions and 81 deletions.
4 changes: 2 additions & 2 deletions api-keys.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions audits.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions automations.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions brands.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion chunks/MFNOHOWH.js → chunks/3XUFIUKR.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
getInvokeFetchRuntimeModule
} from "./7IMOYFWE.js";
} from "./AJZHO3JW.js";
import {
isBrowser
} from "./2ZQ3ZX7F.js";
Expand Down
2 changes: 1 addition & 1 deletion chunks/7IMOYFWE.js → chunks/AJZHO3JW.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
Expand Down
2 changes: 1 addition & 1 deletion chunks/6O3XBOLZ.js → chunks/GPIKV6PO.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
getAuthRuntimeModule
} from "./7IMOYFWE.js";
} from "./AJZHO3JW.js";

// src/public/auth.ts
function registerAuthModule(name, authModule) {
Expand Down
74 changes: 67 additions & 7 deletions chunks/YHKRUQRS.js → chunks/JUVTHREC.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion chunks/GXMVBX45.js → chunks/TXEL4LPW.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
getQixRuntimeModule
} from "./7IMOYFWE.js";
} from "./AJZHO3JW.js";

// src/public/qix.ts
function openAppSession(appSessionProps) {
Expand Down
4 changes: 2 additions & 2 deletions collections.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions csp-origins.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions data-assets.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions data-connections.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions data-credentials.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions data-files.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions extensions.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions glossaries.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions groups.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions identity-providers.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions items.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions licenses.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions qix.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions quotas.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions reload-tasks.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions reloads.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions reports.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading

0 comments on commit e891f2b

Please sign in to comment.