├── .github ├── CODEOWNERS └── workflows │ └── release.yaml ├── .gitignore ├── LICENSE ├── README.md ├── api-keys.d.ts ├── api-keys.js ├── apps.d.ts ├── apps.js ├── assistants.d.ts ├── assistants.js ├── audits.d.ts ├── audits.js ├── auth-types-Cj5bM3Yk.d.ts ├── auth.d.ts ├── auth.js ├── automation-connections.d.ts ├── automation-connections.js ├── automations.d.ts ├── automations.js ├── automl-deployments.d.ts ├── automl-deployments.js ├── automl-predictions.d.ts ├── automl-predictions.js ├── brands.d.ts ├── brands.js ├── chunks ├── 33GQY7N7.js ├── 62DXIH3S.js ├── 7MMXU6EL.js ├── ETNHFALU.js ├── GPRUNZV4.js ├── LIEZG7IM.js ├── OTIO4SEJ.js ├── PLVPW5IR.js ├── RP3EJGHG.js ├── SPATCXXU.js ├── XF3TPZKZ.js ├── YYZCS5PW.js └── ZCTVPXGO.js ├── collections.d.ts ├── collections.js ├── conditions.d.ts ├── conditions.js ├── consumption.d.ts ├── consumption.js ├── csp-origins.d.ts ├── csp-origins.js ├── csrf-token.d.ts ├── csrf-token.js ├── data-alerts.d.ts ├── data-alerts.js ├── data-assets.d.ts ├── data-assets.js ├── data-connections.d.ts ├── data-connections.js ├── data-credentials.d.ts ├── data-credentials.js ├── data-files.d.ts ├── data-files.js ├── data-qualities.d.ts ├── data-qualities.js ├── data-sets.d.ts ├── data-sets.js ├── data-sources.d.ts ├── data-sources.js ├── data-stores.d.ts ├── data-stores.js ├── dcaas.d.ts ├── dcaas.js ├── di-projects.d.ts ├── di-projects.js ├── direct-access-agents.d.ts ├── direct-access-agents.js ├── docs ├── authentication.md ├── examples.md ├── examples │ ├── create-app.md │ ├── create-session-app.md │ ├── fetch-spaces.md │ ├── open-without-data.md │ └── show-sheet-list.md ├── features.md ├── qix.md └── rest.md ├── encryption.d.ts ├── encryption.js ├── extensions.d.ts ├── extensions.js ├── glossaries.d.ts ├── glossaries.js ├── groups.d.ts ├── groups.js ├── identity-providers.d.ts ├── identity-providers.js ├── index.d.ts ├── index.js ├── interceptors.d.ts ├── interceptors.js ├── invoke-fetch-types-BYCD4pc9.d.ts ├── items.d.ts ├── items.js ├── knowledgebases.d.ts ├── knowledgebases.js ├── licenses.d.ts ├── licenses.js ├── lineage-graphs.d.ts ├── lineage-graphs.js ├── ml.d.ts ├── ml.js ├── notes.d.ts ├── notes.js ├── notifications.d.ts ├── notifications.js ├── oauth-clients.d.ts ├── oauth-clients.js ├── oauth-tokens.d.ts ├── oauth-tokens.js ├── package.json ├── qix.d.ts ├── qix.js ├── questions.d.ts ├── questions.js ├── quotas.d.ts ├── quotas.js ├── reload-tasks.d.ts ├── reload-tasks.js ├── reloads.d.ts ├── reloads.js ├── report-templates.d.ts ├── report-templates.js ├── reports.d.ts ├── reports.js ├── roles.d.ts ├── roles.js ├── sharing-tasks.d.ts ├── sharing-tasks.js ├── spaces.d.ts ├── spaces.js ├── tasks.d.ts ├── tasks.js ├── temp-contents.d.ts ├── temp-contents.js ├── tenants.d.ts ├── tenants.js ├── themes.d.ts ├── themes.js ├── transports.d.ts ├── transports.js ├── ui-config.d.ts ├── ui-config.js ├── users.d.ts ├── users.js ├── web-integrations.d.ts ├── web-integrations.js ├── web-notifications.d.ts ├── web-notifications.js ├── webhooks.d.ts └── webhooks.js /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in the repo. 2 | * @qlik-oss/frontend-core 3 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Publish NPM Package 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v*.*.*" 7 | 8 | jobs: 9 | publish-npm: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout code 13 | uses: actions/checkout@v4 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Set up Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '18' 21 | registry-url: 'https://registry.npmjs.org' 22 | 23 | - name: Set NPM Token 24 | run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_CI_TOKEN }}" > .npmrc 25 | 26 | - name: Set version and publish 27 | run: | 28 | VERSION=$(git describe --tags --abbrev=7 --match "v*") 29 | VERSION=${VERSION#v} 30 | echo "version is $VERSION" 31 | jq --arg version "$VERSION" '.version = $version' package.json > temp.json && mv temp.json package.json 32 | cat package.json 33 | # Set the default user-agent. 34 | ls ./chunks >/dev/null || (echo "Missing chunks directory!" && exit 1) 35 | find ./chunks -type f -exec sed -i.bak -e "s;defaultUserAgent = \"qlik-api/latest\";defaultUserAgent = \"qlik-api/$VERSION\";g" -- {} + 36 | rm -f ./chunks/*.bak 37 | # Publish npm package 38 | npm publish 39 | env: 40 | NODE_AUTH_TOKEN: ${{ secrets.NPM_CI_TOKEN }} 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | pnpm-lock.yaml 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2023 Qlik 4 | 5 | Permission to use, copy, modify, and/or distribute this software 6 | for any purpose with or without fee is hereby granted, provided 7 | that the above copyright notice and this permission notice appear 8 | in all copies. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 | WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 | WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 | AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 14 | CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 15 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 16 | NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 17 | CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @qlik/api 2 | 3 | [![npm version](https://img.shields.io/npm/v/@qlik/api.svg)](https://www.npmjs.com/package/@qlik/api) 4 | [![License](https://img.shields.io/badge/license-ISC-blue.svg)](https://opensource.org/licenses/ISC) 5 | 6 | This package provides a JavaScript API for interacting with Qlik Sense REST APIs including the QIX Engine from a single package that can be used in both Node.js and browser contexts. 7 | 8 | ## Table of Contents 9 | 10 | - [Getting Started](#getting-started) 11 | - [Module Structure](#module-structure) 12 | - [REST API](./docs/rest.md) 13 | - [QIX API](./docs/qix.md) 14 | - [Features](./docs/features.md) 15 | - [Authentication](./docs/authentication.md) 16 | - [Examples](./docs/examples.md) 17 | 18 | ## Getting Started 19 | 20 | For NodeJS applications or in the case of building a web app with a bundler use: 21 | 22 | ```sh 23 | npm install --save @qlik/api 24 | ``` 25 | 26 | If code will run in a browser it is recommended to load the code from a CDN. 27 | 28 | ```html 29 | 33 | ``` 34 | 35 | ### Module structure 36 | 37 | `@qlik/api` is a collection of javascript modules which each exposes an api built to make the integration process for javascript solutions as easy as possible. The library is built for both browser and NodeJS usage and will seamlessly integrate with `@qlik/embed` libraries. 38 | 39 | The modules can be imported in a few different ways. Either directly through a sub module 40 | 41 | ```ts 42 | import subModule, { namedExport, type NamedType } from "@qlik/api/sub-module"; 43 | ``` 44 | 45 | Or through the main module. If types from a sub module is needed they can only be imported directly from the sub module itself. They can't be imported from the main module. 46 | 47 | ```ts 48 | import { subModuleA, subModuleB } from "@qlik/api"; 49 | import type { SubModuleAType } from "@qlik/api/sub-module-a"; 50 | import type { SubModuleBType } from "@qlik/api/sub-module-b"; 51 | ``` 52 | 53 | `@qlik/api` also has a default export with each sub module as properties. 54 | 55 | ```ts 56 | import qlikApi from "@qlik/api"; 57 | 58 | qlikApi.subModuleA; 59 | qlikApi.subModuleB; 60 | ``` 61 | 62 | The modules that can be imported from `@qlik/api` are the rest entities, the `qix` sub module and an `auth` module. All described below. 63 | 64 | ## REST API 65 | 66 | `@qlik/api` library is generated from open-api specifications released from those Qlik Cloud services that exposes a restful API. The code generation tool runs using the specs building typescript for all api calls specified in the specs. One module per api is generated. 67 | 68 | More info can be found in the [rest](./docs/rest.md) section. 69 | 70 | ## QIX API 71 | 72 | One of the most important services available is Qlik's Analytics Engine Service which is also known as the QIX engine. `@qlik/api` offers a fully typed api for connecting to and consuming Qlik Sense Applications including "Qlik Sense mixins" which previously only was used internally by in-house Qlik developers. More info about QIX can be found in the [qix](./docs/qix.md) section. 73 | 74 | ## Authentication 75 | 76 | `@qlik/api` comes with several authentication options to make the integration experience as easy as possible for external users. Go to the [authentication](./docs/authentication.md) section for more. 77 | 78 | ## Features 79 | 80 | `@qlik/api` comes with some handy features to make the development experience as good as possible. Some of them are described in the [features](./docs/features.md) section. 81 | 82 | ## Examples 83 | 84 | Check out the [examples](./docs/examples.md) section. 85 | -------------------------------------------------------------------------------- /api-keys.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/api-keys.ts 9 | async function getApiKeys(query, options) { 10 | return invokeFetch("api-keys", { 11 | method: "get", 12 | pathTemplate: "/api/v1/api-keys", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createApiKey(body, options) { 18 | return invokeFetch("api-keys", { 19 | method: "post", 20 | pathTemplate: "/api/v1/api-keys", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function getApiKeysConfig(tenantId, options) { 27 | return invokeFetch("api-keys", { 28 | method: "get", 29 | pathTemplate: "/api/v1/api-keys/configs/{tenantId}", 30 | pathVariables: { tenantId }, 31 | options 32 | }); 33 | } 34 | async function patchApiKeysConfig(tenantId, body, options) { 35 | return invokeFetch("api-keys", { 36 | method: "patch", 37 | pathTemplate: "/api/v1/api-keys/configs/{tenantId}", 38 | pathVariables: { tenantId }, 39 | body, 40 | contentType: "application/json", 41 | options 42 | }); 43 | } 44 | async function deleteApiKey(id, options) { 45 | return invokeFetch("api-keys", { 46 | method: "delete", 47 | pathTemplate: "/api/v1/api-keys/{id}", 48 | pathVariables: { id }, 49 | options 50 | }); 51 | } 52 | async function getApiKey(id, options) { 53 | return invokeFetch("api-keys", { 54 | method: "get", 55 | pathTemplate: "/api/v1/api-keys/{id}", 56 | pathVariables: { id }, 57 | options 58 | }); 59 | } 60 | async function patchApiKey(id, body, options) { 61 | return invokeFetch("api-keys", { 62 | method: "patch", 63 | pathTemplate: "/api/v1/api-keys/{id}", 64 | pathVariables: { id }, 65 | body, 66 | contentType: "application/json", 67 | options 68 | }); 69 | } 70 | function clearCache() { 71 | return clearApiCache("api-keys"); 72 | } 73 | var apiKeysExport = { 74 | getApiKeys, 75 | createApiKey, 76 | getApiKeysConfig, 77 | patchApiKeysConfig, 78 | deleteApiKey, 79 | getApiKey, 80 | patchApiKey, 81 | clearCache 82 | }; 83 | var api_keys_default = apiKeysExport; 84 | export { 85 | clearCache, 86 | createApiKey, 87 | api_keys_default as default, 88 | deleteApiKey, 89 | getApiKey, 90 | getApiKeys, 91 | getApiKeysConfig, 92 | patchApiKey, 93 | patchApiKeysConfig 94 | }; 95 | -------------------------------------------------------------------------------- /audits.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/audits.ts 9 | async function getAudits(query, options) { 10 | return invokeFetch("audits", { 11 | method: "get", 12 | pathTemplate: "/api/v1/audits", 13 | query, 14 | options 15 | }); 16 | } 17 | async function getArchivedAudits(query, options) { 18 | return invokeFetch("audits", { 19 | method: "get", 20 | pathTemplate: "/api/v1/audits/archive", 21 | query, 22 | options 23 | }); 24 | } 25 | async function getAuditsSettings(options) { 26 | return invokeFetch("audits", { 27 | method: "get", 28 | pathTemplate: "/api/v1/audits/settings", 29 | options 30 | }); 31 | } 32 | async function getAuditSources(options) { 33 | return invokeFetch("audits", { 34 | method: "get", 35 | pathTemplate: "/api/v1/audits/sources", 36 | options 37 | }); 38 | } 39 | async function getAuditTypes(options) { 40 | return invokeFetch("audits", { 41 | method: "get", 42 | pathTemplate: "/api/v1/audits/types", 43 | options 44 | }); 45 | } 46 | async function getAudit(id, options) { 47 | return invokeFetch("audits", { 48 | method: "get", 49 | pathTemplate: "/api/v1/audits/{id}", 50 | pathVariables: { id }, 51 | options 52 | }); 53 | } 54 | function clearCache() { 55 | return clearApiCache("audits"); 56 | } 57 | var auditsExport = { 58 | getAudits, 59 | getArchivedAudits, 60 | getAuditsSettings, 61 | getAuditSources, 62 | getAuditTypes, 63 | getAudit, 64 | clearCache 65 | }; 66 | var audits_default = auditsExport; 67 | export { 68 | clearCache, 69 | audits_default as default, 70 | getArchivedAudits, 71 | getAudit, 72 | getAuditSources, 73 | getAuditTypes, 74 | getAudits, 75 | getAuditsSettings 76 | }; 77 | -------------------------------------------------------------------------------- /auth.d.ts: -------------------------------------------------------------------------------- 1 | import { A as AuthType, a as AuthModule, H as HostConfig, W as WebResourceAuthParams } from './auth-types-Cj5bM3Yk.js'; 2 | export { j as AuthTypeThatCanBeOmitted, g as AuthenticationErrorAction, C as Credentials, e as GetRemoteAuthDataProps, G as GetRestCallAuthParamsProps, d as GetWebResourceAuthParamsProps, b as GetWebSocketAuthParamsProps, f as HandleAuthenticationErrorProps, h as HostConfigCommon, R as RestCallAuthParams, c as WebSocketAuthParams, k as authTypesThatCanBeOmitted, i as hostConfigCommonProperties } from './auth-types-Cj5bM3Yk.js'; 3 | 4 | /** 5 | * Registers an auth module that can handle authentication. An auth module is used by specifying its name as authType in the HostConfig passed in to api calls. 6 | * @param name the name of the module 7 | * @param authModule the implementation of the AuthModule interface 8 | */ 9 | declare function registerAuthModule(name: A, authModule: AuthModule): void; 10 | /** 11 | * Logs out the user and sets `global.loggingOut` to true. 12 | * 13 | * **NOTE**: Does not abort pending requests. 14 | */ 15 | declare function logout(): void; 16 | /** 17 | * Sets the default host config that will be used for all qmfe api calls that do not inclue a HostConfig 18 | * @param hostConfig the default HostConfig to use 19 | */ 20 | declare function setDefaultHostConfig(hostConfig: HostConfig | undefined): void; 21 | /** 22 | * Registers a host config with the given name. 23 | * @param name The name of the host config to be used to reference the host config later. 24 | * @param hostConfig The host config to register. 25 | */ 26 | declare function registerHostConfig(name: string, hostConfig: HostConfig): void; 27 | /** 28 | * Unregisters a host config with the given name. 29 | * @param name The name of the host config to unregister. 30 | */ 31 | declare function unregisterHostConfig(name: string): void; 32 | /** 33 | * Returns an access token using the supplied host config. Typically used on the backend to supply the access token to the frontend 34 | */ 35 | declare function getAccessToken({ hostConfig }: { 36 | hostConfig?: HostConfig; 37 | }): Promise; 38 | /** 39 | * Returns a record of query parameters that needs to be added to resources requests, e.g. 40 | * image tags, etc. 41 | */ 42 | declare function getWebResourceAuthParams({ hostConfig, }: { 43 | hostConfig?: HostConfig; 44 | }): Promise; 45 | /** 46 | * The AuthAPI interface provides the public interface for the auth module. 47 | */ 48 | interface AuthAPI { 49 | /** 50 | * Registers an auth module that can handle authentication. An auth module is used by specifying its name as authType in the HostConfig passed in to api calls. 51 | * @param name the name of the module 52 | * @param authModule the implementation of the AuthModule interface 53 | */ 54 | registerAuthModule: typeof registerAuthModule; 55 | /** 56 | * Sets the default host config that will be used for all qmfe api calls that do not include a host config 57 | * @param hostConfig the default HostConfig to use 58 | */ 59 | setDefaultHostConfig: typeof setDefaultHostConfig; 60 | /** 61 | * Registers a host config with the given name. 62 | * @param name The name of the host config to be used to reference the host config later. 63 | * @param hostConfig The host config to register. 64 | */ 65 | registerHostConfig: typeof registerHostConfig; 66 | /** 67 | * Unregisters a host config with the given name. 68 | * @param name The name of the host config to unregister. 69 | */ 70 | unregisterHostConfig: typeof unregisterHostConfig; 71 | /** 72 | * Returns an access token using the supplied host config. Typically used on the backend to supply the access token to the frontend 73 | */ 74 | getAccessToken: typeof getAccessToken; 75 | /** 76 | * Returns a record of query parameters that needs to be added to resources requests, e.g. 77 | * image tags, etc. 78 | */ 79 | getWebResourceAuthParams: typeof getWebResourceAuthParams; 80 | } 81 | declare const _default: { 82 | registerAuthModule: typeof registerAuthModule; 83 | setDefaultHostConfig: typeof setDefaultHostConfig; 84 | registerHostConfig: typeof registerHostConfig; 85 | unregisterHostConfig: typeof unregisterHostConfig; 86 | getAccessToken: typeof getAccessToken; 87 | getWebResourceAuthParams: typeof getWebResourceAuthParams; 88 | }; 89 | 90 | export { type AuthAPI, AuthModule, AuthType, HostConfig, WebResourceAuthParams, _default as default, getAccessToken, getWebResourceAuthParams, logout, registerAuthModule, registerHostConfig, setDefaultHostConfig, unregisterHostConfig }; 91 | -------------------------------------------------------------------------------- /auth.js: -------------------------------------------------------------------------------- 1 | import { 2 | auth_default, 3 | getAccessToken, 4 | getWebResourceAuthParams, 5 | logout, 6 | registerAuthModule, 7 | registerHostConfig, 8 | setDefaultHostConfig, 9 | unregisterHostConfig 10 | } from "./chunks/SPATCXXU.js"; 11 | import "./chunks/GPRUNZV4.js"; 12 | export { 13 | auth_default as default, 14 | getAccessToken, 15 | getWebResourceAuthParams, 16 | logout, 17 | registerAuthModule, 18 | registerHostConfig, 19 | setDefaultHostConfig, 20 | unregisterHostConfig 21 | }; 22 | -------------------------------------------------------------------------------- /automation-connections.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/automation-connections.ts 9 | async function getAutomationConnections(query, options) { 10 | return invokeFetch("automation-connections", { 11 | method: "get", 12 | pathTemplate: "/api/v1/automation-connections", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createAutomationConnection(body, options) { 18 | return invokeFetch("automation-connections", { 19 | method: "post", 20 | pathTemplate: "/api/v1/automation-connections", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function deleteAutomationConnection(id, query, options) { 27 | return invokeFetch("automation-connections", { 28 | method: "delete", 29 | pathTemplate: "/api/v1/automation-connections/{id}", 30 | pathVariables: { id }, 31 | query, 32 | options 33 | }); 34 | } 35 | async function getAutomationConnection(id, options) { 36 | return invokeFetch("automation-connections", { 37 | method: "get", 38 | pathTemplate: "/api/v1/automation-connections/{id}", 39 | pathVariables: { id }, 40 | options 41 | }); 42 | } 43 | async function updateAutomationConnection(id, body, options) { 44 | return invokeFetch("automation-connections", { 45 | method: "put", 46 | pathTemplate: "/api/v1/automation-connections/{id}", 47 | pathVariables: { id }, 48 | body, 49 | contentType: "application/json", 50 | options 51 | }); 52 | } 53 | async function changeOwnerAutomationConnection(id, body, options) { 54 | return invokeFetch("automation-connections", { 55 | method: "post", 56 | pathTemplate: "/api/v1/automation-connections/{id}/actions/change-owner", 57 | pathVariables: { id }, 58 | body, 59 | contentType: "application/json", 60 | options 61 | }); 62 | } 63 | async function changeSpaceAutomationConnection(id, body, options) { 64 | return invokeFetch("automation-connections", { 65 | method: "post", 66 | pathTemplate: "/api/v1/automation-connections/{id}/actions/change-space", 67 | pathVariables: { id }, 68 | body, 69 | contentType: "application/json", 70 | options 71 | }); 72 | } 73 | async function checkAutomationConnection(id, options) { 74 | return invokeFetch("automation-connections", { 75 | method: "post", 76 | pathTemplate: "/api/v1/automation-connections/{id}/actions/check", 77 | pathVariables: { id }, 78 | options 79 | }); 80 | } 81 | function clearCache() { 82 | return clearApiCache("automation-connections"); 83 | } 84 | var automationConnectionsExport = { 85 | getAutomationConnections, 86 | createAutomationConnection, 87 | deleteAutomationConnection, 88 | getAutomationConnection, 89 | updateAutomationConnection, 90 | changeOwnerAutomationConnection, 91 | changeSpaceAutomationConnection, 92 | checkAutomationConnection, 93 | clearCache 94 | }; 95 | var automation_connections_default = automationConnectionsExport; 96 | export { 97 | changeOwnerAutomationConnection, 98 | changeSpaceAutomationConnection, 99 | checkAutomationConnection, 100 | clearCache, 101 | createAutomationConnection, 102 | automation_connections_default as default, 103 | deleteAutomationConnection, 104 | getAutomationConnection, 105 | getAutomationConnections, 106 | updateAutomationConnection 107 | }; 108 | -------------------------------------------------------------------------------- /automl-deployments.d.ts: -------------------------------------------------------------------------------- 1 | import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js'; 2 | import './auth-types-Cj5bM3Yk.js'; 3 | 4 | type AppErrorResponse = { 5 | errors?: Error[]; 6 | }; 7 | type Error = { 8 | /** The argument */ 9 | argument?: string; 10 | /** The unique code for the error */ 11 | code: string; 12 | /** The unique id of the error instance */ 13 | errorId?: string; 14 | /** The issue code */ 15 | issue?: string; 16 | meta?: { 17 | /** The argument */ 18 | argument?: string; 19 | /** Extra details for what may have caused the error */ 20 | details?: string; 21 | /** The unique id of the error instance */ 22 | errorId?: string; 23 | /** The resource type that the error occurred on */ 24 | resource?: string; 25 | /** The resource id that the error occurred on */ 26 | resourceId?: string; 27 | }; 28 | /** The resource type that the error occurred on */ 29 | resource?: string; 30 | /** The resource id that the error occurred on */ 31 | resourceId?: string; 32 | /** A summary of what went wrong */ 33 | title?: string; 34 | }; 35 | type RealTimePredictionInputSchema = { 36 | /** The name of a feature in the dataset. */ 37 | name?: string; 38 | }; 39 | type RealtimePredictionInput = { 40 | /** The rows of the dataset to produce predictions from. Date features must be in ISO 8601 format. */ 41 | rows?: string[][]; 42 | /** The schema of the input dataset. */ 43 | schema?: RealTimePredictionInputSchema[]; 44 | }; 45 | /** 46 | * Generates predictions in a synchronous request and response. 47 | * 48 | * @param deploymentId The ID of the ML deployed model that will be employed to produce predictions. 49 | * @param query an object with query parameters 50 | * @param body an object with the body content 51 | * @throws CreateAutomlDeploymentRealtimePredictionHttpError 52 | */ 53 | declare function createAutomlDeploymentRealtimePrediction(deploymentId: string, query: { 54 | /** If true, will include a column with the reason why a prediction was not produced. */ 55 | includeNotPredictedReason?: boolean; 56 | /** If true, the shapley values will be included in the response. */ 57 | includeShap?: boolean; 58 | /** If true, the source data will be included in the response */ 59 | includeSource?: boolean; 60 | /** The name of the feature in the source data to use as an index in the response data. The column will be included with its original name and values. This is intended to allow the caller to join results with source data. */ 61 | index?: string; 62 | }, body: RealtimePredictionInput, options?: ApiCallOptions): Promise; 63 | type CreateAutomlDeploymentRealtimePredictionHttpResponse = { 64 | data: void; 65 | headers: Headers; 66 | status: 200; 67 | }; 68 | type CreateAutomlDeploymentRealtimePredictionHttpError = { 69 | data: AppErrorResponse; 70 | headers: Headers; 71 | status: 400 | 401 | 403 | 404 | 409 | 503; 72 | }; 73 | /** 74 | * Clears the cache for automl-deployments api requests. 75 | */ 76 | declare function clearCache(): void; 77 | interface AutomlDeploymentsAPI { 78 | /** 79 | * Generates predictions in a synchronous request and response. 80 | * 81 | * @param deploymentId The ID of the ML deployed model that will be employed to produce predictions. 82 | * @param query an object with query parameters 83 | * @param body an object with the body content 84 | * @throws CreateAutomlDeploymentRealtimePredictionHttpError 85 | */ 86 | createAutomlDeploymentRealtimePrediction: typeof createAutomlDeploymentRealtimePrediction; 87 | /** 88 | * Clears the cache for automl-deployments api requests. 89 | */ 90 | clearCache: typeof clearCache; 91 | } 92 | /** 93 | * Functions for the automl-deployments api 94 | */ 95 | declare const automlDeploymentsExport: AutomlDeploymentsAPI; 96 | 97 | export { type AppErrorResponse, type AutomlDeploymentsAPI, type CreateAutomlDeploymentRealtimePredictionHttpError, type CreateAutomlDeploymentRealtimePredictionHttpResponse, type Error, type RealTimePredictionInputSchema, type RealtimePredictionInput, clearCache, createAutomlDeploymentRealtimePrediction, automlDeploymentsExport as default }; 98 | -------------------------------------------------------------------------------- /automl-deployments.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/automl-deployments.ts 9 | async function createAutomlDeploymentRealtimePrediction(deploymentId, query, body, options) { 10 | return invokeFetch("automl-deployments", { 11 | method: "post", 12 | pathTemplate: "/api/v1/automl-deployments/{deploymentId}/realtime-predictions", 13 | pathVariables: { deploymentId }, 14 | query, 15 | body, 16 | contentType: "application/json", 17 | options 18 | }); 19 | } 20 | function clearCache() { 21 | return clearApiCache("automl-deployments"); 22 | } 23 | var automlDeploymentsExport = { createAutomlDeploymentRealtimePrediction, clearCache }; 24 | var automl_deployments_default = automlDeploymentsExport; 25 | export { 26 | clearCache, 27 | createAutomlDeploymentRealtimePrediction, 28 | automl_deployments_default as default 29 | }; 30 | -------------------------------------------------------------------------------- /automl-predictions.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/automl-predictions.ts 9 | async function getAutomlPredictionCoordinateShap(predictionId, query, options) { 10 | return invokeFetch("automl-predictions", { 11 | method: "get", 12 | pathTemplate: "/api/v1/automl-predictions/{predictionId}/coordinate-shap", 13 | pathVariables: { predictionId }, 14 | query, 15 | options 16 | }); 17 | } 18 | async function createAutomlPredictionJob(predictionId, options) { 19 | return invokeFetch("automl-predictions", { 20 | method: "post", 21 | pathTemplate: "/api/v1/automl-predictions/{predictionId}/jobs", 22 | pathVariables: { predictionId }, 23 | options 24 | }); 25 | } 26 | async function getAutomlPredictionNotPredictedReasons(predictionId, query, options) { 27 | return invokeFetch("automl-predictions", { 28 | method: "get", 29 | pathTemplate: "/api/v1/automl-predictions/{predictionId}/not-predicted-reasons", 30 | pathVariables: { predictionId }, 31 | query, 32 | options 33 | }); 34 | } 35 | async function getAutomlPredictionPredictions(predictionId, query, options) { 36 | return invokeFetch("automl-predictions", { 37 | method: "get", 38 | pathTemplate: "/api/v1/automl-predictions/{predictionId}/predictions", 39 | pathVariables: { predictionId }, 40 | query, 41 | options 42 | }); 43 | } 44 | async function getAutomlPredictionShap(predictionId, query, options) { 45 | return invokeFetch("automl-predictions", { 46 | method: "get", 47 | pathTemplate: "/api/v1/automl-predictions/{predictionId}/shap", 48 | pathVariables: { predictionId }, 49 | query, 50 | options 51 | }); 52 | } 53 | async function getAutomlPredictionSource(predictionId, query, options) { 54 | return invokeFetch("automl-predictions", { 55 | method: "get", 56 | pathTemplate: "/api/v1/automl-predictions/{predictionId}/source", 57 | pathVariables: { predictionId }, 58 | query, 59 | options 60 | }); 61 | } 62 | function clearCache() { 63 | return clearApiCache("automl-predictions"); 64 | } 65 | var automlPredictionsExport = { 66 | getAutomlPredictionCoordinateShap, 67 | createAutomlPredictionJob, 68 | getAutomlPredictionNotPredictedReasons, 69 | getAutomlPredictionPredictions, 70 | getAutomlPredictionShap, 71 | getAutomlPredictionSource, 72 | clearCache 73 | }; 74 | var automl_predictions_default = automlPredictionsExport; 75 | export { 76 | clearCache, 77 | createAutomlPredictionJob, 78 | automl_predictions_default as default, 79 | getAutomlPredictionCoordinateShap, 80 | getAutomlPredictionNotPredictedReasons, 81 | getAutomlPredictionPredictions, 82 | getAutomlPredictionShap, 83 | getAutomlPredictionSource 84 | }; 85 | -------------------------------------------------------------------------------- /brands.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/brands.ts 9 | async function getBrands(query, options) { 10 | return invokeFetch("brands", { 11 | method: "get", 12 | pathTemplate: "/api/v1/brands", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createBrand(body, options) { 18 | return invokeFetch("brands", { 19 | method: "post", 20 | pathTemplate: "/api/v1/brands", 21 | body, 22 | contentType: "multipart/form-data", 23 | options 24 | }); 25 | } 26 | async function getActiveBrand(options) { 27 | return invokeFetch("brands", { 28 | method: "get", 29 | pathTemplate: "/api/v1/brands/active", 30 | options 31 | }); 32 | } 33 | async function deleteBrand(brandId, options) { 34 | return invokeFetch("brands", { 35 | method: "delete", 36 | pathTemplate: "/api/v1/brands/{brand-id}", 37 | pathVariables: { "brand-id": brandId }, 38 | options 39 | }); 40 | } 41 | async function getBrand(brandId, options) { 42 | return invokeFetch("brands", { 43 | method: "get", 44 | pathTemplate: "/api/v1/brands/{brand-id}", 45 | pathVariables: { "brand-id": brandId }, 46 | options 47 | }); 48 | } 49 | async function patchBrand(brandId, body, options) { 50 | return invokeFetch("brands", { 51 | method: "patch", 52 | pathTemplate: "/api/v1/brands/{brand-id}", 53 | pathVariables: { "brand-id": brandId }, 54 | body, 55 | contentType: "application/json", 56 | options 57 | }); 58 | } 59 | async function activateBrand(brandId, body, options) { 60 | return invokeFetch("brands", { 61 | method: "post", 62 | pathTemplate: "/api/v1/brands/{brand-id}/actions/activate", 63 | pathVariables: { "brand-id": brandId }, 64 | body, 65 | options 66 | }); 67 | } 68 | async function deactivateBrand(brandId, body, options) { 69 | return invokeFetch("brands", { 70 | method: "post", 71 | pathTemplate: "/api/v1/brands/{brand-id}/actions/deactivate", 72 | pathVariables: { "brand-id": brandId }, 73 | body, 74 | options 75 | }); 76 | } 77 | async function deleteBrandFile(brandId, brandFileId, options) { 78 | return invokeFetch("brands", { 79 | method: "delete", 80 | pathTemplate: "/api/v1/brands/{brand-id}/files/{brand-file-id}", 81 | pathVariables: { "brand-id": brandId, "brand-file-id": brandFileId }, 82 | options 83 | }); 84 | } 85 | async function getBrandFile(brandId, brandFileId, options) { 86 | return invokeFetch("brands", { 87 | method: "get", 88 | pathTemplate: "/api/v1/brands/{brand-id}/files/{brand-file-id}", 89 | pathVariables: { "brand-id": brandId, "brand-file-id": brandFileId }, 90 | options 91 | }); 92 | } 93 | async function createBrandFile(brandId, brandFileId, body, options) { 94 | return invokeFetch("brands", { 95 | method: "post", 96 | pathTemplate: "/api/v1/brands/{brand-id}/files/{brand-file-id}", 97 | pathVariables: { "brand-id": brandId, "brand-file-id": brandFileId }, 98 | body, 99 | contentType: "multipart/form-data", 100 | options 101 | }); 102 | } 103 | async function updateBrandFile(brandId, brandFileId, body, options) { 104 | return invokeFetch("brands", { 105 | method: "put", 106 | pathTemplate: "/api/v1/brands/{brand-id}/files/{brand-file-id}", 107 | pathVariables: { "brand-id": brandId, "brand-file-id": brandFileId }, 108 | body, 109 | contentType: "multipart/form-data", 110 | options 111 | }); 112 | } 113 | function clearCache() { 114 | return clearApiCache("brands"); 115 | } 116 | var brandsExport = { 117 | getBrands, 118 | createBrand, 119 | getActiveBrand, 120 | deleteBrand, 121 | getBrand, 122 | patchBrand, 123 | activateBrand, 124 | deactivateBrand, 125 | deleteBrandFile, 126 | getBrandFile, 127 | createBrandFile, 128 | updateBrandFile, 129 | clearCache 130 | }; 131 | var brands_default = brandsExport; 132 | export { 133 | activateBrand, 134 | clearCache, 135 | createBrand, 136 | createBrandFile, 137 | deactivateBrand, 138 | brands_default as default, 139 | deleteBrand, 140 | deleteBrandFile, 141 | getActiveBrand, 142 | getBrand, 143 | getBrandFile, 144 | getBrands, 145 | patchBrand, 146 | updateBrandFile 147 | }; 148 | -------------------------------------------------------------------------------- /chunks/33GQY7N7.js: -------------------------------------------------------------------------------- 1 | import { 2 | getQixRuntimeModule 3 | } from "./GPRUNZV4.js"; 4 | 5 | // src/public/qix.ts 6 | function openAppSession(appSessionProps) { 7 | const appSessionPromise = getQixRuntimeModule(appSessionProps.hostConfig).then( 8 | (impl) => impl.openAppSession(appSessionProps) 9 | ); 10 | const appSessionProxy = { 11 | /** 12 | * Returns a promise of the Qix Doc object with a set of client-side Api extensions. 13 | * Note that while the AppSession object is returned immediately this promise might take a while 14 | * to resolve for bigger apps. 15 | */ 16 | async getDoc() { 17 | return (await appSessionPromise).getDoc(); 18 | }, 19 | /** 20 | * @experimental 21 | * Add an event-listener for this app-session. 22 | */ 23 | onWebSocketEvent(listener) { 24 | const returnedFnPromise = appSessionPromise.then((appSession) => appSession.onWebSocketEvent(listener)); 25 | return () => { 26 | void returnedFnPromise.then((fn) => fn()); 27 | }; 28 | }, 29 | /** 30 | * @experimental 31 | * Resume a suspended session. This will resume exactly 32 | * once if the session is currently suspended, otherwise 33 | * nothing will be done. 34 | */ 35 | async resume() { 36 | return (await appSessionPromise).resume(); 37 | }, 38 | /** 39 | * When the app session is no longer in use it must be closed using this function. 40 | * If the same underlying enigma websocket is used somewhere else in the browser 41 | * this is basically a no op, but if this is the last/only usage 42 | * of the underlying enigma websocket that websocket will be closed. 43 | */ 44 | async close(props) { 45 | return (await appSessionPromise).close(props); 46 | } 47 | }; 48 | return appSessionProxy; 49 | } 50 | function withHostConfig(hostConfig) { 51 | return { 52 | openAppSession: (openAppSessionProps) => openAppSession( 53 | typeof openAppSessionProps === "string" ? { hostConfig, appId: openAppSessionProps } : { hostConfig, ...openAppSessionProps } 54 | ) 55 | }; 56 | } 57 | var qix = { 58 | openAppSession, 59 | withHostConfig 60 | }; 61 | var qix_default = qix; 62 | 63 | export { 64 | openAppSession, 65 | withHostConfig, 66 | qix_default 67 | }; 68 | -------------------------------------------------------------------------------- /chunks/7MMXU6EL.js: -------------------------------------------------------------------------------- 1 | // src/utils/utils.ts 2 | function isBrowser() { 3 | if (typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.self !== "undefined") { 4 | return true; 5 | } 6 | return false; 7 | } 8 | function isNode() { 9 | if (typeof process !== "undefined" && process.version && process.versions.node) { 10 | return true; 11 | } 12 | return false; 13 | } 14 | function isPlainObject(value) { 15 | return typeof value === "object" && value !== null && value.constructor === Object; 16 | } 17 | function sortKeys(obj) { 18 | if (Array.isArray(obj)) { 19 | return obj.map(sortKeys); 20 | } else if (isPlainObject(obj)) { 21 | const sortedObj = {}; 22 | for (const key of Object.keys(obj).sort()) { 23 | sortedObj[key] = sortKeys(obj[key]); 24 | } 25 | return sortedObj; 26 | } 27 | return obj; 28 | } 29 | function cleanFalsyValues(obj) { 30 | if (Array.isArray(obj)) { 31 | return obj.map((item) => typeof item === "object" && item !== null ? cleanFalsyValues(item) : item).filter((item) => { 32 | if (typeof item === "object" && item !== null) { 33 | return Object.keys(item).length > 0; 34 | } 35 | return item !== null && item !== void 0 && item !== ""; 36 | }); 37 | } else if (typeof obj === "object" && obj !== null) { 38 | const cleaned = {}; 39 | for (const key of Object.keys(obj)) { 40 | const value = obj[key]; 41 | switch (typeof value) { 42 | case "undefined": 43 | break; 44 | case "boolean": 45 | if (value) cleaned[key] = value; 46 | break; 47 | case "string": { 48 | const trimmed = value.trim(); 49 | if (trimmed !== "") cleaned[key] = trimmed; 50 | break; 51 | } 52 | case "object": { 53 | if (value === null) break; 54 | const cleanedValue = cleanFalsyValues(value); 55 | if (cleanedValue) { 56 | if (Array.isArray(cleanedValue) && cleanedValue.length > 0 || typeof cleanedValue === "object" && Object.keys(cleanedValue).length > 0) { 57 | cleaned[key] = cleanedValue; 58 | } else if (!Array.isArray(cleanedValue) && typeof cleanedValue === "object") { 59 | } 60 | } 61 | break; 62 | } 63 | case "function": 64 | case "number": 65 | cleaned[key] = value; 66 | break; 67 | default: 68 | console.warn(`Unexpected type for key "${key}": ${typeof value}`); 69 | cleaned[key] = value; 70 | break; 71 | } 72 | } 73 | if (Object.keys(cleaned).length === 0) { 74 | return void 0; 75 | } 76 | return cleaned; 77 | } 78 | return obj; 79 | } 80 | 81 | export { 82 | isBrowser, 83 | isNode, 84 | sortKeys, 85 | cleanFalsyValues 86 | }; 87 | -------------------------------------------------------------------------------- /chunks/ETNHFALU.js: -------------------------------------------------------------------------------- 1 | // src/qix/session/websocket-errors.ts 2 | var closeCodeEngineTerminating = 4003; 3 | var closeCodeEngineProxyGeneric = 4200; 4 | var closeCodeClientTimeout = 4201; 5 | var closeCodeBadRequest = 4202; 6 | var closeCodePermissions = 4203; 7 | var closeCodeNotFound = 4204; 8 | var closeCodeTooManyRequests = 4205; 9 | var closeCodeNetwork = 4206; 10 | var closeCodeDependencyGeneric = 4210; 11 | var closeCodeDependencyUnavailable = 4211; 12 | var closeCodeEngineGeneric = 4220; 13 | var closeCodeEntitlement = 4230; 14 | var closeCodeNoEnginesAvailable = 4240; 15 | var CloseCodeSessionReservationMissing = 4222; 16 | var closeCodeMessages = { 17 | 1e3: "Connection closed normally.", 18 | 1001: "Going away.", 19 | 1002: "Protocol error.", 20 | 1003: "Unsupported data.", 21 | 1005: "No status received.", 22 | 1006: "Abnormal closure.", 23 | 1007: "Invalid frame payload data.", 24 | 1008: "Policy violation.", 25 | 1009: "Message too big.", 26 | 1010: "Mandatory extension missing.", 27 | 1011: "Server internal error.", 28 | 1012: "Service restart.", 29 | 1013: "Try again later.", 30 | 1014: "Bad gateway.", 31 | 1015: "TLS handshake failure.", 32 | [closeCodeEngineTerminating]: "The engine is in terminating state", 33 | [closeCodeEngineProxyGeneric]: "A problem occurred in engine-proxy", 34 | [closeCodeClientTimeout]: "The client has closed the connection", 35 | [closeCodeBadRequest]: "The provided request is invalid and/or malformed", 36 | [closeCodePermissions]: "No permission to open the app", 37 | [closeCodeNotFound]: "App not found", 38 | [closeCodeTooManyRequests]: "Too many requests have been sent in a given amount of time", 39 | [closeCodeNetwork]: "Networking issues", 40 | [closeCodeDependencyGeneric]: "A problem occurred in a dependency of engine-proxy", 41 | [closeCodeDependencyUnavailable]: "A dependency is unavailable and not serving any requests", 42 | [closeCodeEngineGeneric]: "A problem occurred in an engine", 43 | [closeCodeEntitlement]: "You are not entitled to perform that operation", 44 | [closeCodeNoEnginesAvailable]: "There are currently no engines available", 45 | [CloseCodeSessionReservationMissing]: "The reserved session is missing" 46 | }; 47 | var uknownCloseErrorMessage = "websocket closed for unknown reason"; 48 | function getHumanReadableSocketClosedErrorMessage(err, { appId, hostConfig }) { 49 | const closeCode = err?.original?.code || err?.code; 50 | const reason = err?.original?.reason || err?.reason; 51 | const closeMessage = closeCode && closeCodeMessages[closeCode] || reason || err.message || uknownCloseErrorMessage; 52 | if (hostConfig?.host) { 53 | return `Failed to open app ${appId} on ${hostConfig?.host}: ${closeMessage}`; 54 | } else { 55 | return `Failed to open app ${appId}: ${closeMessage}`; 56 | } 57 | } 58 | 59 | export { 60 | getHumanReadableSocketClosedErrorMessage 61 | }; 62 | -------------------------------------------------------------------------------- /chunks/GPRUNZV4.js: -------------------------------------------------------------------------------- 1 | // src/public/public-runtime-modules.ts 2 | function getAuthRuntimeModule(hostConfig) { 3 | const isNode = !!globalThis.process?.argv; 4 | return isNode ? import("./XF3TPZKZ.js") : import("./PLVPW5IR.js").then( 5 | (mod) => mod.importRuntimeModule("auth@v1", hostConfig) 6 | ); 7 | } 8 | async function getQixRuntimeModule(hostConfig) { 9 | await getAuthRuntimeModule(hostConfig); 10 | const isNode = !!globalThis.process?.argv; 11 | return isNode ? import("./RP3EJGHG.js") : import("./PLVPW5IR.js").then( 12 | (mod) => mod.importRuntimeModule("qix@v1", hostConfig) 13 | ); 14 | } 15 | async function getInvokeFetchRuntimeModule(hostConfig) { 16 | await getAuthRuntimeModule(hostConfig); 17 | const isNode = !!globalThis.process?.argv; 18 | return isNode ? import("./YYZCS5PW.js") : import("./PLVPW5IR.js").then( 19 | (mod) => mod.importRuntimeModule("invoke-fetch@v1", hostConfig) 20 | ); 21 | } 22 | 23 | export { 24 | getAuthRuntimeModule, 25 | getQixRuntimeModule, 26 | getInvokeFetchRuntimeModule 27 | }; 28 | -------------------------------------------------------------------------------- /chunks/LIEZG7IM.js: -------------------------------------------------------------------------------- 1 | import { 2 | getInvokeFetchRuntimeModule 3 | } from "./GPRUNZV4.js"; 4 | import { 5 | isBrowser 6 | } from "./7MMXU6EL.js"; 7 | 8 | // src/public/invoke-fetch.ts 9 | var defaultUserAgent = "qlik-api/latest"; 10 | async function invokeFetch(api, props) { 11 | const hostConfig = props.options?.hostConfig; 12 | let userAgent; 13 | if (props?.userAgent) { 14 | userAgent = props.userAgent; 15 | } else if (isBrowser()) { 16 | userAgent = `${window.navigator.userAgent} ${defaultUserAgent}`; 17 | } else { 18 | userAgent = defaultUserAgent; 19 | } 20 | return (await getInvokeFetchRuntimeModule(hostConfig)).invokeFetch(api, { ...props, userAgent }); 21 | } 22 | function clearApiCache(api) { 23 | void getInvokeFetchRuntimeModule().then((runtimeModule) => runtimeModule.clearApiCache(api)); 24 | } 25 | 26 | export { 27 | invokeFetch, 28 | clearApiCache 29 | }; 30 | -------------------------------------------------------------------------------- /chunks/PLVPW5IR.js: -------------------------------------------------------------------------------- 1 | // node_modules/.pnpm/@qlik+runtime-module-loader@1.0.21/node_modules/@qlik/runtime-module-loader/dist/index.js 2 | window.__qlikMainPrivateResolvers = window.__qlikMainPrivateResolvers || {}; 3 | window.__qlikMainPrivateResolvers.mainUrlPromise = window.__qlikMainPrivateResolvers.mainUrlPromise || new Promise((resolve) => { 4 | window.__qlikMainPrivateResolvers.resolveMainJsUrl = (value) => resolve(value); 5 | }); 6 | window.__qlikMainPrivateResolvers.qlikMainPromise = window.__qlikMainPrivateResolvers.qlikMainPromise || (async () => { 7 | if (window.QlikMain) { 8 | return window.QlikMain; 9 | } 10 | const noHostWarningTimer = setTimeout(() => { 11 | console.warn("Waiting for a host parameter pointing to a Qlik runtime system"); 12 | }, 5e3); 13 | const url = await window.__qlikMainPrivateResolvers.mainUrlPromise; 14 | clearTimeout(noHostWarningTimer); 15 | return new Promise((resolve) => { 16 | if (window.QlikMain) { 17 | resolve(window.QlikMain); 18 | } else { 19 | const script = window.document.createElement("script"); 20 | script.src = url; 21 | script.addEventListener("error", () => { 22 | console.error(`Qlik runtime system not found: ${url}`); 23 | }); 24 | script.addEventListener("load", () => { 25 | if (window.QlikMain) { 26 | resolve(window.QlikMain); 27 | } 28 | }); 29 | window.document.head.appendChild(script); 30 | } 31 | }); 32 | })(); 33 | function provideHostConfigForMainJsUrl(hostConfig) { 34 | const trailingSlashes = /\/+$/; 35 | function toMainJsUrl(hc) { 36 | const url = hc?.embedRuntimeUrl || hc?.url || hc?.host; 37 | if (!url) { 38 | return void 0; 39 | } 40 | let locationUrl; 41 | if (url.toLowerCase().startsWith("https://") || url.toLowerCase().startsWith("http://")) { 42 | locationUrl = url; 43 | } else { 44 | locationUrl = `https://${url}`; 45 | } 46 | locationUrl = locationUrl.replace(trailingSlashes, ""); 47 | return `${locationUrl}/qlik-embed/main.js`; 48 | } 49 | const potentialMainJsUrl = toMainJsUrl(hostConfig); 50 | if (potentialMainJsUrl) { 51 | window.__qlikMainPrivateResolvers.resolveMainJsUrl(potentialMainJsUrl); 52 | } 53 | } 54 | async function importRuntimeModule(name, hostConfig) { 55 | if (hostConfig?.runtimeModuleMocks?.[name]) { 56 | return hostConfig?.runtimeModuleMocks?.[name]; 57 | } 58 | provideHostConfigForMainJsUrl(hostConfig); 59 | return importFromCdn(name); 60 | } 61 | async function importUnsupportedAndUnstableRuntimeModule(name) { 62 | return importFromCdn(name); 63 | } 64 | async function importFromCdn(name) { 65 | return (await window.__qlikMainPrivateResolvers.qlikMainPromise).import(name); 66 | } 67 | export { 68 | importRuntimeModule, 69 | importUnsupportedAndUnstableRuntimeModule 70 | }; 71 | -------------------------------------------------------------------------------- /chunks/SPATCXXU.js: -------------------------------------------------------------------------------- 1 | import { 2 | getAuthRuntimeModule 3 | } from "./GPRUNZV4.js"; 4 | 5 | // src/public/auth.ts 6 | function registerAuthModule(name, authModule) { 7 | void getAuthRuntimeModule().then((impl) => impl.registerAuthModule(name, authModule)); 8 | } 9 | function logout() { 10 | void getAuthRuntimeModule().then((impl) => impl.logout()); 11 | } 12 | function setDefaultHostConfig(hostConfig) { 13 | void getAuthRuntimeModule(hostConfig).then((impl) => impl.setDefaultHostConfig(hostConfig)); 14 | } 15 | function registerHostConfig(name, hostConfig) { 16 | void getAuthRuntimeModule(hostConfig).then((impl) => impl.registerHostConfig(name, hostConfig)); 17 | } 18 | function unregisterHostConfig(name) { 19 | void getAuthRuntimeModule().then((impl) => impl.unregisterHostConfig(name)); 20 | } 21 | async function getAccessToken({ hostConfig }) { 22 | return getAuthRuntimeModule(hostConfig).then((impl) => impl.getAccessToken({ hostConfig })); 23 | } 24 | async function getWebResourceAuthParams({ 25 | hostConfig 26 | }) { 27 | return getAuthRuntimeModule(hostConfig).then((impl) => impl.getWebResourceAuthParams({ hostConfig })); 28 | } 29 | var auth_default = { 30 | registerAuthModule, 31 | setDefaultHostConfig, 32 | registerHostConfig, 33 | unregisterHostConfig, 34 | getAccessToken, 35 | getWebResourceAuthParams 36 | }; 37 | 38 | export { 39 | registerAuthModule, 40 | logout, 41 | setDefaultHostConfig, 42 | registerHostConfig, 43 | unregisterHostConfig, 44 | getAccessToken, 45 | getWebResourceAuthParams, 46 | auth_default 47 | }; 48 | -------------------------------------------------------------------------------- /chunks/XF3TPZKZ.js: -------------------------------------------------------------------------------- 1 | import { 2 | AuthorizationError, 3 | InvalidAuthTypeError, 4 | InvalidHostConfigError, 5 | UnexpectedAuthTypeError, 6 | determineAuthType, 7 | getRestCallAuthParams, 8 | getWebResourceAuthParams, 9 | getWebSocketAuthParams, 10 | handleAuthenticationError, 11 | isHostCrossOrigin, 12 | isWindows, 13 | logout, 14 | registerAuthModule, 15 | registerHostConfig, 16 | serializeHostConfig, 17 | setDefaultHostConfig, 18 | toValidLocationUrl, 19 | toValidWebsocketLocationUrl, 20 | unregisterHostConfig 21 | } from "./OTIO4SEJ.js"; 22 | import "./ZCTVPXGO.js"; 23 | import "./7MMXU6EL.js"; 24 | 25 | // src/auth/auth.ts 26 | var auth = { 27 | determineAuthType, 28 | getRestCallAuthParams, 29 | getWebResourceAuthParams, 30 | getWebSocketAuthParams, 31 | handleAuthenticationError, 32 | isHostCrossOrigin, 33 | isWindows, 34 | logout, 35 | registerAuthModule, 36 | registerHostConfig, 37 | serializeHostConfig, 38 | setDefaultHostConfig, 39 | toValidLocationUrl, 40 | toValidWebsocketLocationUrl, 41 | unregisterHostConfig 42 | }; 43 | var auth_default = auth; 44 | export { 45 | AuthorizationError, 46 | InvalidAuthTypeError, 47 | InvalidHostConfigError, 48 | UnexpectedAuthTypeError, 49 | auth_default as default, 50 | determineAuthType, 51 | getRestCallAuthParams, 52 | getWebResourceAuthParams, 53 | getWebSocketAuthParams, 54 | handleAuthenticationError, 55 | isHostCrossOrigin, 56 | isWindows, 57 | logout, 58 | registerAuthModule, 59 | registerHostConfig, 60 | serializeHostConfig, 61 | setDefaultHostConfig, 62 | toValidLocationUrl, 63 | toValidWebsocketLocationUrl, 64 | unregisterHostConfig 65 | }; 66 | -------------------------------------------------------------------------------- /chunks/YYZCS5PW.js: -------------------------------------------------------------------------------- 1 | import { 2 | EncodingError, 3 | InvokeFetchError, 4 | clearApiCache, 5 | invokeFetch, 6 | parseFetchResponse 7 | } from "./OTIO4SEJ.js"; 8 | import "./ZCTVPXGO.js"; 9 | import "./7MMXU6EL.js"; 10 | 11 | // src/invoke-fetch/invoke-fetch.ts 12 | var invokeFetchExp = { 13 | invokeFetch, 14 | clearApiCache, 15 | parseFetchResponse 16 | }; 17 | var invoke_fetch_default = invokeFetchExp; 18 | export { 19 | EncodingError, 20 | InvokeFetchError, 21 | clearApiCache, 22 | invoke_fetch_default as default, 23 | invokeFetch, 24 | parseFetchResponse 25 | }; 26 | -------------------------------------------------------------------------------- /chunks/ZCTVPXGO.js: -------------------------------------------------------------------------------- 1 | import { 2 | isBrowser 3 | } from "./7MMXU6EL.js"; 4 | 5 | // src/interceptors/interceptors.ts 6 | var GLOBAL_INTERCEPTORS; 7 | function createInterceptors() { 8 | const startingInterceptors = GLOBAL_INTERCEPTORS?.getInterceptors() || []; 9 | const interceptors2 = [...startingInterceptors]; 10 | return { 11 | /** 12 | * Adds an interceptor to the global interceptor stack 13 | * Returns the newly added interceptor 14 | * @param interceptor the interceptor to add 15 | * @returns the newly added interceptor 16 | */ 17 | addInterceptor: (interceptor) => { 18 | interceptors2.push(interceptor); 19 | return interceptor; 20 | }, 21 | /** 22 | * Removes an interceptor from the global interceptor stack 23 | * Returns null if the interceptor was not found 24 | * @param interceptor the interceptor remove 25 | * @returns the removed interceptor or null if not found 26 | */ 27 | removeInterceptor: (interceptor) => { 28 | const index = interceptors2.indexOf(interceptor); 29 | let removed; 30 | if (index !== -1) { 31 | removed = interceptors2.splice(index, 1)[0]; 32 | } 33 | return removed || null; 34 | }, 35 | /** 36 | * Gets all registered interceptors 37 | */ 38 | getInterceptors: () => interceptors2 39 | }; 40 | } 41 | var addDefaultInterceptorsRun = false; 42 | function addDefaultInterceptors() { 43 | if (addDefaultInterceptorsRun) { 44 | return; 45 | } 46 | if (isBrowser()) { 47 | const readFlagsFromUrlQuery = () => { 48 | const params = new URLSearchParams(window.location.search); 49 | const featuresParam = params.get("features"); 50 | if (!featuresParam) { 51 | return {}; 52 | } 53 | const features = featuresParam.split(",").map((item) => item.trim()); 54 | const urlFeatures = features.reduce((map, obj) => { 55 | const value = !obj.startsWith("!"); 56 | const key = value ? obj : obj.substring(1); 57 | map[key] = value; 58 | return map; 59 | }, {}); 60 | return urlFeatures; 61 | }; 62 | const readFlagsFromLocalStorage = () => { 63 | try { 64 | const featuresParam = localStorage.getItem("qcs-features"); 65 | if (featuresParam) { 66 | return JSON.parse(featuresParam); 67 | } 68 | return {}; 69 | } catch { 70 | return {}; 71 | } 72 | }; 73 | const flagsFromUrl = readFlagsFromUrlQuery(); 74 | const flagsFromLocalStorage = readFlagsFromLocalStorage(); 75 | const interceptor = async (request, proceed) => { 76 | let resultPromise; 77 | if (request.pathTemplate === "/api/v1/features") { 78 | resultPromise = proceed(request); 79 | const result = await resultPromise; 80 | return { ...result, data: { ...result.data || {}, ...flagsFromLocalStorage, ...flagsFromUrl } }; 81 | } 82 | return proceed(request); 83 | }; 84 | GLOBAL_INTERCEPTORS.addInterceptor(interceptor); 85 | } 86 | addDefaultInterceptorsRun = true; 87 | } 88 | GLOBAL_INTERCEPTORS = createInterceptors(); 89 | function addInterceptor(interceptor) { 90 | return GLOBAL_INTERCEPTORS.addInterceptor(interceptor); 91 | } 92 | function removeInterceptor(interceptor) { 93 | return GLOBAL_INTERCEPTORS.removeInterceptor(interceptor); 94 | } 95 | function getInterceptors() { 96 | return GLOBAL_INTERCEPTORS.getInterceptors(); 97 | } 98 | var interceptors = { 99 | addInterceptor, 100 | removeInterceptor, 101 | getInterceptors, 102 | createInterceptors 103 | }; 104 | var interceptors_default = interceptors; 105 | 106 | export { 107 | createInterceptors, 108 | addDefaultInterceptors, 109 | addInterceptor, 110 | removeInterceptor, 111 | getInterceptors, 112 | interceptors_default 113 | }; 114 | -------------------------------------------------------------------------------- /collections.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/collections.ts 9 | async function getCollections(query, options) { 10 | return invokeFetch("collections", { 11 | method: "get", 12 | pathTemplate: "/api/v1/collections", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createCollection(body, options) { 18 | return invokeFetch("collections", { 19 | method: "post", 20 | pathTemplate: "/api/v1/collections", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function getFavoritesCollection(options) { 27 | return invokeFetch("collections", { 28 | method: "get", 29 | pathTemplate: "/api/v1/collections/favorites", 30 | options 31 | }); 32 | } 33 | async function deleteCollection(collectionId, options) { 34 | return invokeFetch("collections", { 35 | method: "delete", 36 | pathTemplate: "/api/v1/collections/{collectionId}", 37 | pathVariables: { collectionId }, 38 | options 39 | }); 40 | } 41 | async function getCollection(collectionId, options) { 42 | return invokeFetch("collections", { 43 | method: "get", 44 | pathTemplate: "/api/v1/collections/{collectionId}", 45 | pathVariables: { collectionId }, 46 | options 47 | }); 48 | } 49 | async function patchCollection(collectionId, body, options) { 50 | return invokeFetch("collections", { 51 | method: "patch", 52 | pathTemplate: "/api/v1/collections/{collectionId}", 53 | pathVariables: { collectionId }, 54 | body, 55 | contentType: "application/json", 56 | options 57 | }); 58 | } 59 | async function updateCollection(collectionId, body, options) { 60 | return invokeFetch("collections", { 61 | method: "put", 62 | pathTemplate: "/api/v1/collections/{collectionId}", 63 | pathVariables: { collectionId }, 64 | body, 65 | contentType: "application/json", 66 | options 67 | }); 68 | } 69 | async function getCollectionItems(collectionId, query, options) { 70 | return invokeFetch("collections", { 71 | method: "get", 72 | pathTemplate: "/api/v1/collections/{collectionId}/items", 73 | pathVariables: { collectionId }, 74 | query, 75 | options 76 | }); 77 | } 78 | async function addCollectionItem(collectionId, body, options) { 79 | return invokeFetch("collections", { 80 | method: "post", 81 | pathTemplate: "/api/v1/collections/{collectionId}/items", 82 | pathVariables: { collectionId }, 83 | body, 84 | contentType: "application/json", 85 | options 86 | }); 87 | } 88 | async function deleteCollectionItem(collectionId, itemId, options) { 89 | return invokeFetch("collections", { 90 | method: "delete", 91 | pathTemplate: "/api/v1/collections/{collectionId}/items/{itemId}", 92 | pathVariables: { collectionId, itemId }, 93 | options 94 | }); 95 | } 96 | async function getCollectionItem(collectionId, itemId, options) { 97 | return invokeFetch("collections", { 98 | method: "get", 99 | pathTemplate: "/api/v1/collections/{collectionId}/items/{itemId}", 100 | pathVariables: { collectionId, itemId }, 101 | options 102 | }); 103 | } 104 | function clearCache() { 105 | return clearApiCache("collections"); 106 | } 107 | var collectionsExport = { 108 | getCollections, 109 | createCollection, 110 | getFavoritesCollection, 111 | deleteCollection, 112 | getCollection, 113 | patchCollection, 114 | updateCollection, 115 | getCollectionItems, 116 | addCollectionItem, 117 | deleteCollectionItem, 118 | getCollectionItem, 119 | clearCache 120 | }; 121 | var collections_default = collectionsExport; 122 | export { 123 | addCollectionItem, 124 | clearCache, 125 | createCollection, 126 | collections_default as default, 127 | deleteCollection, 128 | deleteCollectionItem, 129 | getCollection, 130 | getCollectionItem, 131 | getCollectionItems, 132 | getCollections, 133 | getFavoritesCollection, 134 | patchCollection, 135 | updateCollection 136 | }; 137 | -------------------------------------------------------------------------------- /conditions.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/conditions.ts 9 | async function createCondition(body, options) { 10 | return invokeFetch("conditions", { 11 | method: "post", 12 | pathTemplate: "/api/v1/conditions", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function createConditionPreview(body, options) { 19 | return invokeFetch("conditions", { 20 | method: "post", 21 | pathTemplate: "/api/v1/conditions/previews", 22 | body, 23 | contentType: "application/json", 24 | options 25 | }); 26 | } 27 | async function getConditionPreview(id, options) { 28 | return invokeFetch("conditions", { 29 | method: "get", 30 | pathTemplate: "/api/v1/conditions/previews/{id}", 31 | pathVariables: { id }, 32 | options 33 | }); 34 | } 35 | async function getConditionsSettings(options) { 36 | return invokeFetch("conditions", { 37 | method: "get", 38 | pathTemplate: "/api/v1/conditions/settings", 39 | options 40 | }); 41 | } 42 | async function setConditionsSettings(body, options) { 43 | return invokeFetch("conditions", { 44 | method: "put", 45 | pathTemplate: "/api/v1/conditions/settings", 46 | body, 47 | contentType: "application/json", 48 | options 49 | }); 50 | } 51 | async function deleteCondition(id, options) { 52 | return invokeFetch("conditions", { 53 | method: "delete", 54 | pathTemplate: "/api/v1/conditions/{id}", 55 | pathVariables: { id }, 56 | options 57 | }); 58 | } 59 | async function getCondition(id, options) { 60 | return invokeFetch("conditions", { 61 | method: "get", 62 | pathTemplate: "/api/v1/conditions/{id}", 63 | pathVariables: { id }, 64 | options 65 | }); 66 | } 67 | async function patchCondition(id, body, options) { 68 | return invokeFetch("conditions", { 69 | method: "patch", 70 | pathTemplate: "/api/v1/conditions/{id}", 71 | pathVariables: { id }, 72 | body, 73 | contentType: "application/json", 74 | options 75 | }); 76 | } 77 | async function createConditionEvaluation(id, body, options) { 78 | return invokeFetch("conditions", { 79 | method: "post", 80 | pathTemplate: "/api/v1/conditions/{id}/evaluations", 81 | pathVariables: { id }, 82 | body, 83 | contentType: "application/json", 84 | options 85 | }); 86 | } 87 | async function deleteConditionEvaluation(id, evaluationId, options) { 88 | return invokeFetch("conditions", { 89 | method: "delete", 90 | pathTemplate: "/api/v1/conditions/{id}/evaluations/{evaluationId}", 91 | pathVariables: { id, evaluationId }, 92 | options 93 | }); 94 | } 95 | async function getConditionEvaluation(id, evaluationId, options) { 96 | return invokeFetch("conditions", { 97 | method: "get", 98 | pathTemplate: "/api/v1/conditions/{id}/evaluations/{evaluationId}", 99 | pathVariables: { id, evaluationId }, 100 | options 101 | }); 102 | } 103 | function clearCache() { 104 | return clearApiCache("conditions"); 105 | } 106 | var conditionsExport = { 107 | createCondition, 108 | createConditionPreview, 109 | getConditionPreview, 110 | getConditionsSettings, 111 | setConditionsSettings, 112 | deleteCondition, 113 | getCondition, 114 | patchCondition, 115 | createConditionEvaluation, 116 | deleteConditionEvaluation, 117 | getConditionEvaluation, 118 | clearCache 119 | }; 120 | var conditions_default = conditionsExport; 121 | export { 122 | clearCache, 123 | createCondition, 124 | createConditionEvaluation, 125 | createConditionPreview, 126 | conditions_default as default, 127 | deleteCondition, 128 | deleteConditionEvaluation, 129 | getCondition, 130 | getConditionEvaluation, 131 | getConditionPreview, 132 | getConditionsSettings, 133 | patchCondition, 134 | setConditionsSettings 135 | }; 136 | -------------------------------------------------------------------------------- /consumption.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/consumption.ts 9 | async function getConsumptionExecutions(query, options) { 10 | return invokeFetch("consumption", { 11 | method: "get", 12 | pathTemplate: "/api/v1/consumption/executions", 13 | query, 14 | options 15 | }); 16 | } 17 | function clearCache() { 18 | return clearApiCache("consumption"); 19 | } 20 | var consumptionExport = { getConsumptionExecutions, clearCache }; 21 | var consumption_default = consumptionExport; 22 | export { 23 | clearCache, 24 | consumption_default as default, 25 | getConsumptionExecutions 26 | }; 27 | -------------------------------------------------------------------------------- /csp-origins.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/csp-origins.ts 9 | async function getCSPEntries(query, options) { 10 | return invokeFetch("csp-origins", { 11 | method: "get", 12 | pathTemplate: "/api/v1/csp-origins", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createCSPEntry(body, options) { 18 | return invokeFetch("csp-origins", { 19 | method: "post", 20 | pathTemplate: "/api/v1/csp-origins", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function getCSPHeader(options) { 27 | return invokeFetch("csp-origins", { 28 | method: "get", 29 | pathTemplate: "/api/v1/csp-origins/actions/generate-header", 30 | options 31 | }); 32 | } 33 | async function deleteCSPEntry(id, options) { 34 | return invokeFetch("csp-origins", { 35 | method: "delete", 36 | pathTemplate: "/api/v1/csp-origins/{id}", 37 | pathVariables: { id }, 38 | options 39 | }); 40 | } 41 | async function getCSPEntry(id, options) { 42 | return invokeFetch("csp-origins", { 43 | method: "get", 44 | pathTemplate: "/api/v1/csp-origins/{id}", 45 | pathVariables: { id }, 46 | options 47 | }); 48 | } 49 | async function updateCSPEntry(id, body, options) { 50 | return invokeFetch("csp-origins", { 51 | method: "put", 52 | pathTemplate: "/api/v1/csp-origins/{id}", 53 | pathVariables: { id }, 54 | body, 55 | contentType: "application/json", 56 | options 57 | }); 58 | } 59 | function clearCache() { 60 | return clearApiCache("csp-origins"); 61 | } 62 | var cspOriginsExport = { 63 | getCSPEntries, 64 | createCSPEntry, 65 | getCSPHeader, 66 | deleteCSPEntry, 67 | getCSPEntry, 68 | updateCSPEntry, 69 | clearCache 70 | }; 71 | var csp_origins_default = cspOriginsExport; 72 | export { 73 | clearCache, 74 | createCSPEntry, 75 | csp_origins_default as default, 76 | deleteCSPEntry, 77 | getCSPEntries, 78 | getCSPEntry, 79 | getCSPHeader, 80 | updateCSPEntry 81 | }; 82 | -------------------------------------------------------------------------------- /csrf-token.d.ts: -------------------------------------------------------------------------------- 1 | import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js'; 2 | import './auth-types-Cj5bM3Yk.js'; 3 | 4 | /** 5 | * An error object. 6 | */ 7 | type Error = { 8 | /** The error code. */ 9 | code: string; 10 | /** The detailed error message */ 11 | detail?: string; 12 | /** Non-standard information about the error */ 13 | meta?: unknown; 14 | /** The http status code. */ 15 | status?: string; 16 | /** The error title. */ 17 | title: string; 18 | }; 19 | /** 20 | * A representation of the errors encountered from the HTTP request. 21 | */ 22 | type Errors = { 23 | errors?: Error[]; 24 | }; 25 | /** 26 | * Returns CSRF token via the qlik-csrf-token header. 27 | * 28 | * @throws GetCsrfTokenHttpError 29 | */ 30 | declare function getCsrfToken(options?: ApiCallOptions): Promise; 31 | type GetCsrfTokenHttpResponse = { 32 | data: void; 33 | headers: Headers; 34 | status: 204; 35 | }; 36 | type GetCsrfTokenHttpError = { 37 | data: Errors & unknown; 38 | headers: Headers; 39 | status: 400 | 404; 40 | }; 41 | /** 42 | * Clears the cache for csrf-token api requests. 43 | */ 44 | declare function clearCache(): void; 45 | interface CsrfTokenAPI { 46 | /** 47 | * Returns CSRF token via the qlik-csrf-token header. 48 | * 49 | * @throws GetCsrfTokenHttpError 50 | */ 51 | getCsrfToken: typeof getCsrfToken; 52 | /** 53 | * Clears the cache for csrf-token api requests. 54 | */ 55 | clearCache: typeof clearCache; 56 | } 57 | /** 58 | * Functions for the csrf-token api 59 | */ 60 | declare const csrfTokenExport: CsrfTokenAPI; 61 | 62 | export { type CsrfTokenAPI, type Error, type Errors, type GetCsrfTokenHttpError, type GetCsrfTokenHttpResponse, clearCache, csrfTokenExport as default, getCsrfToken }; 63 | -------------------------------------------------------------------------------- /csrf-token.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/csrf-token.ts 9 | async function getCsrfToken(options) { 10 | return invokeFetch("csrf-token", { 11 | method: "get", 12 | pathTemplate: "/api/v1/csrf-token", 13 | options 14 | }); 15 | } 16 | function clearCache() { 17 | return clearApiCache("csrf-token"); 18 | } 19 | var csrfTokenExport = { getCsrfToken, clearCache }; 20 | var csrf_token_default = csrfTokenExport; 21 | export { 22 | clearCache, 23 | csrf_token_default as default, 24 | getCsrfToken 25 | }; 26 | -------------------------------------------------------------------------------- /data-alerts.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/data-alerts.ts 9 | async function getDataAlerts(query, options) { 10 | return invokeFetch("data-alerts", { 11 | method: "get", 12 | pathTemplate: "/api/v1/data-alerts", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createDataAlert(body, options) { 18 | return invokeFetch("data-alerts", { 19 | method: "post", 20 | pathTemplate: "/api/v1/data-alerts", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function triggerDataAlerts(body, options) { 27 | return invokeFetch("data-alerts", { 28 | method: "post", 29 | pathTemplate: "/api/v1/data-alerts/actions/trigger", 30 | body, 31 | contentType: "application/json", 32 | options 33 | }); 34 | } 35 | async function validateDataAlerts(body, options) { 36 | return invokeFetch("data-alerts", { 37 | method: "post", 38 | pathTemplate: "/api/v1/data-alerts/actions/validate", 39 | body, 40 | contentType: "application/json", 41 | options 42 | }); 43 | } 44 | async function getDataAlertsSettings(options) { 45 | return invokeFetch("data-alerts", { 46 | method: "get", 47 | pathTemplate: "/api/v1/data-alerts/settings", 48 | options 49 | }); 50 | } 51 | async function setDataAlertsSettings(body, options) { 52 | return invokeFetch("data-alerts", { 53 | method: "put", 54 | pathTemplate: "/api/v1/data-alerts/settings", 55 | body, 56 | contentType: "application/json", 57 | options 58 | }); 59 | } 60 | async function deleteDataAlert(alertId, options) { 61 | return invokeFetch("data-alerts", { 62 | method: "delete", 63 | pathTemplate: "/api/v1/data-alerts/{alertId}", 64 | pathVariables: { alertId }, 65 | options 66 | }); 67 | } 68 | async function getDataAlert(alertId, options) { 69 | return invokeFetch("data-alerts", { 70 | method: "get", 71 | pathTemplate: "/api/v1/data-alerts/{alertId}", 72 | pathVariables: { alertId }, 73 | options 74 | }); 75 | } 76 | async function patchDataAlert(alertId, body, options) { 77 | return invokeFetch("data-alerts", { 78 | method: "patch", 79 | pathTemplate: "/api/v1/data-alerts/{alertId}", 80 | pathVariables: { alertId }, 81 | body, 82 | contentType: "application/json", 83 | options 84 | }); 85 | } 86 | async function getDataAlertCondition(alertId, options) { 87 | return invokeFetch("data-alerts", { 88 | method: "get", 89 | pathTemplate: "/api/v1/data-alerts/{alertId}/condition", 90 | pathVariables: { alertId }, 91 | options 92 | }); 93 | } 94 | async function deleteDataAlertExecution(alertId, executionId, options) { 95 | return invokeFetch("data-alerts", { 96 | method: "delete", 97 | pathTemplate: "/api/v1/data-alerts/{alertId}/executions/{executionId}", 98 | pathVariables: { alertId, executionId }, 99 | options 100 | }); 101 | } 102 | async function getDataAlertExecution(alertId, executionId, options) { 103 | return invokeFetch("data-alerts", { 104 | method: "get", 105 | pathTemplate: "/api/v1/data-alerts/{alertId}/executions/{executionId}", 106 | pathVariables: { alertId, executionId }, 107 | options 108 | }); 109 | } 110 | async function getDataAlertRecipientStats(alertId, query, options) { 111 | return invokeFetch("data-alerts", { 112 | method: "get", 113 | pathTemplate: "/api/v1/data-alerts/{alertId}/recipient-stats", 114 | pathVariables: { alertId }, 115 | query, 116 | options 117 | }); 118 | } 119 | async function getDataAlertExecutions(taskId, query, options) { 120 | return invokeFetch("data-alerts", { 121 | method: "get", 122 | pathTemplate: "/api/v1/data-alerts/{taskId}/executions", 123 | pathVariables: { taskId }, 124 | query, 125 | options 126 | }); 127 | } 128 | async function getDataAlertExecutionsStats(taskId, query, options) { 129 | return invokeFetch("data-alerts", { 130 | method: "get", 131 | pathTemplate: "/api/v1/data-alerts/{taskId}/executions/stats", 132 | pathVariables: { taskId }, 133 | query, 134 | options 135 | }); 136 | } 137 | async function getDataAlertExecutionEvaluations(taskId, executionId, options) { 138 | return invokeFetch("data-alerts", { 139 | method: "get", 140 | pathTemplate: "/api/v1/data-alerts/{taskId}/executions/{executionId}/evaluations", 141 | pathVariables: { taskId, executionId }, 142 | options 143 | }); 144 | } 145 | function clearCache() { 146 | return clearApiCache("data-alerts"); 147 | } 148 | var dataAlertsExport = { 149 | getDataAlerts, 150 | createDataAlert, 151 | triggerDataAlerts, 152 | validateDataAlerts, 153 | getDataAlertsSettings, 154 | setDataAlertsSettings, 155 | deleteDataAlert, 156 | getDataAlert, 157 | patchDataAlert, 158 | getDataAlertCondition, 159 | deleteDataAlertExecution, 160 | getDataAlertExecution, 161 | getDataAlertRecipientStats, 162 | getDataAlertExecutions, 163 | getDataAlertExecutionsStats, 164 | getDataAlertExecutionEvaluations, 165 | clearCache 166 | }; 167 | var data_alerts_default = dataAlertsExport; 168 | export { 169 | clearCache, 170 | createDataAlert, 171 | data_alerts_default as default, 172 | deleteDataAlert, 173 | deleteDataAlertExecution, 174 | getDataAlert, 175 | getDataAlertCondition, 176 | getDataAlertExecution, 177 | getDataAlertExecutionEvaluations, 178 | getDataAlertExecutions, 179 | getDataAlertExecutionsStats, 180 | getDataAlertRecipientStats, 181 | getDataAlerts, 182 | getDataAlertsSettings, 183 | patchDataAlert, 184 | setDataAlertsSettings, 185 | triggerDataAlerts, 186 | validateDataAlerts 187 | }; 188 | -------------------------------------------------------------------------------- /data-assets.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/data-assets.ts 9 | async function deleteDataAssets(body, options) { 10 | return invokeFetch("data-assets", { 11 | method: "delete", 12 | pathTemplate: "/api/v1/data-assets", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function createDataAsset(body, options) { 19 | return invokeFetch("data-assets", { 20 | method: "post", 21 | pathTemplate: "/api/v1/data-assets", 22 | body, 23 | contentType: "application/json", 24 | options 25 | }); 26 | } 27 | async function getDataAsset(dataAssetId, query, options) { 28 | return invokeFetch("data-assets", { 29 | method: "get", 30 | pathTemplate: "/api/v1/data-assets/{data-asset-id}", 31 | pathVariables: { "data-asset-id": dataAssetId }, 32 | query, 33 | options 34 | }); 35 | } 36 | async function patchDataAsset(dataAssetId, body, options) { 37 | return invokeFetch("data-assets", { 38 | method: "patch", 39 | pathTemplate: "/api/v1/data-assets/{data-asset-id}", 40 | pathVariables: { "data-asset-id": dataAssetId }, 41 | body, 42 | contentType: "application/json", 43 | options 44 | }); 45 | } 46 | async function updateDataAsset(dataAssetId, body, options) { 47 | return invokeFetch("data-assets", { 48 | method: "put", 49 | pathTemplate: "/api/v1/data-assets/{data-asset-id}", 50 | pathVariables: { "data-asset-id": dataAssetId }, 51 | body, 52 | contentType: "application/json", 53 | options 54 | }); 55 | } 56 | function clearCache() { 57 | return clearApiCache("data-assets"); 58 | } 59 | var dataAssetsExport = { 60 | deleteDataAssets, 61 | createDataAsset, 62 | getDataAsset, 63 | patchDataAsset, 64 | updateDataAsset, 65 | clearCache 66 | }; 67 | var data_assets_default = dataAssetsExport; 68 | export { 69 | clearCache, 70 | createDataAsset, 71 | data_assets_default as default, 72 | deleteDataAssets, 73 | getDataAsset, 74 | patchDataAsset, 75 | updateDataAsset 76 | }; 77 | -------------------------------------------------------------------------------- /data-connections.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/data-connections.ts 9 | async function getDataConnections(query, options) { 10 | return invokeFetch("data-connections", { 11 | method: "get", 12 | pathTemplate: "/api/v1/data-connections", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createDataConnection(body, options) { 18 | return invokeFetch("data-connections", { 19 | method: "post", 20 | pathTemplate: "/api/v1/data-connections", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function deleteDataConnections(body, options) { 27 | return invokeFetch("data-connections", { 28 | method: "post", 29 | pathTemplate: "/api/v1/data-connections/actions/delete", 30 | body, 31 | contentType: "application/json", 32 | options 33 | }); 34 | } 35 | async function duplicateDataAConnection(body, options) { 36 | return invokeFetch("data-connections", { 37 | method: "post", 38 | pathTemplate: "/api/v1/data-connections/actions/duplicate", 39 | body, 40 | contentType: "application/json", 41 | options 42 | }); 43 | } 44 | async function updateDataConnections(body, options) { 45 | return invokeFetch("data-connections", { 46 | method: "post", 47 | pathTemplate: "/api/v1/data-connections/actions/update", 48 | body, 49 | contentType: "application/json", 50 | options 51 | }); 52 | } 53 | async function deleteDataConnection(qID, query, options) { 54 | return invokeFetch("data-connections", { 55 | method: "delete", 56 | pathTemplate: "/api/v1/data-connections/{qID}", 57 | pathVariables: { qID }, 58 | query, 59 | options 60 | }); 61 | } 62 | async function getDataConnection(qID, query, options) { 63 | return invokeFetch("data-connections", { 64 | method: "get", 65 | pathTemplate: "/api/v1/data-connections/{qID}", 66 | pathVariables: { qID }, 67 | query, 68 | options 69 | }); 70 | } 71 | async function patchDataConnection(qID, query, body, options) { 72 | return invokeFetch("data-connections", { 73 | method: "patch", 74 | pathTemplate: "/api/v1/data-connections/{qID}", 75 | pathVariables: { qID }, 76 | query, 77 | body, 78 | contentType: "application/json", 79 | options 80 | }); 81 | } 82 | async function updateDataConnection(qID, query, body, options) { 83 | return invokeFetch("data-connections", { 84 | method: "put", 85 | pathTemplate: "/api/v1/data-connections/{qID}", 86 | pathVariables: { qID }, 87 | query, 88 | body, 89 | contentType: "application/json", 90 | options 91 | }); 92 | } 93 | function clearCache() { 94 | return clearApiCache("data-connections"); 95 | } 96 | var dataConnectionsExport = { 97 | getDataConnections, 98 | createDataConnection, 99 | deleteDataConnections, 100 | duplicateDataAConnection, 101 | updateDataConnections, 102 | deleteDataConnection, 103 | getDataConnection, 104 | patchDataConnection, 105 | updateDataConnection, 106 | clearCache 107 | }; 108 | var data_connections_default = dataConnectionsExport; 109 | export { 110 | clearCache, 111 | createDataConnection, 112 | data_connections_default as default, 113 | deleteDataConnection, 114 | deleteDataConnections, 115 | duplicateDataAConnection, 116 | getDataConnection, 117 | getDataConnections, 118 | patchDataConnection, 119 | updateDataConnection, 120 | updateDataConnections 121 | }; 122 | -------------------------------------------------------------------------------- /data-credentials.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/data-credentials.ts 9 | async function filterOrphanedDataCredentials(body, options) { 10 | return invokeFetch("data-credentials", { 11 | method: "post", 12 | pathTemplate: "/api/v1/data-credentials/actions/filter-orphan", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function deleteDataCredential(qID, query, options) { 19 | return invokeFetch("data-credentials", { 20 | method: "delete", 21 | pathTemplate: "/api/v1/data-credentials/{qID}", 22 | pathVariables: { qID }, 23 | query, 24 | options 25 | }); 26 | } 27 | async function getDataCredential(qID, query, options) { 28 | return invokeFetch("data-credentials", { 29 | method: "get", 30 | pathTemplate: "/api/v1/data-credentials/{qID}", 31 | pathVariables: { qID }, 32 | query, 33 | options 34 | }); 35 | } 36 | async function patchDataCredential(qID, query, body, options) { 37 | return invokeFetch("data-credentials", { 38 | method: "patch", 39 | pathTemplate: "/api/v1/data-credentials/{qID}", 40 | pathVariables: { qID }, 41 | query, 42 | body, 43 | contentType: "application/json", 44 | options 45 | }); 46 | } 47 | async function updateDataCredential(qID, query, body, options) { 48 | return invokeFetch("data-credentials", { 49 | method: "put", 50 | pathTemplate: "/api/v1/data-credentials/{qID}", 51 | pathVariables: { qID }, 52 | query, 53 | body, 54 | contentType: "application/json", 55 | options 56 | }); 57 | } 58 | function clearCache() { 59 | return clearApiCache("data-credentials"); 60 | } 61 | var dataCredentialsExport = { 62 | filterOrphanedDataCredentials, 63 | deleteDataCredential, 64 | getDataCredential, 65 | patchDataCredential, 66 | updateDataCredential, 67 | clearCache 68 | }; 69 | var data_credentials_default = dataCredentialsExport; 70 | export { 71 | clearCache, 72 | data_credentials_default as default, 73 | deleteDataCredential, 74 | filterOrphanedDataCredentials, 75 | getDataCredential, 76 | patchDataCredential, 77 | updateDataCredential 78 | }; 79 | -------------------------------------------------------------------------------- /data-files.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/data-files.ts 9 | async function getDataFiles(query, options) { 10 | return invokeFetch("data-files", { 11 | method: "get", 12 | pathTemplate: "/api/v1/data-files", 13 | query, 14 | options 15 | }); 16 | } 17 | async function uploadDataFile(body, options) { 18 | return invokeFetch("data-files", { 19 | method: "post", 20 | pathTemplate: "/api/v1/data-files", 21 | body, 22 | contentType: "multipart/form-data", 23 | options 24 | }); 25 | } 26 | async function moveDataFiles(body, options) { 27 | return invokeFetch("data-files", { 28 | method: "post", 29 | pathTemplate: "/api/v1/data-files/actions/change-space", 30 | body, 31 | contentType: "application/json", 32 | options 33 | }); 34 | } 35 | async function deleteDataFiles(body, options) { 36 | return invokeFetch("data-files", { 37 | method: "post", 38 | pathTemplate: "/api/v1/data-files/actions/delete", 39 | body, 40 | contentType: "application/json", 41 | options 42 | }); 43 | } 44 | async function getDataFilesConnections(query, options) { 45 | return invokeFetch("data-files", { 46 | method: "get", 47 | pathTemplate: "/api/v1/data-files/connections", 48 | query, 49 | options 50 | }); 51 | } 52 | async function getDataFileConnection(id, options) { 53 | return invokeFetch("data-files", { 54 | method: "get", 55 | pathTemplate: "/api/v1/data-files/connections/{id}", 56 | pathVariables: { id }, 57 | options 58 | }); 59 | } 60 | async function getDataFilesQuotas(options) { 61 | return invokeFetch("data-files", { 62 | method: "get", 63 | pathTemplate: "/api/v1/data-files/quotas", 64 | options 65 | }); 66 | } 67 | async function deleteDataFile(id, options) { 68 | return invokeFetch("data-files", { 69 | method: "delete", 70 | pathTemplate: "/api/v1/data-files/{id}", 71 | pathVariables: { id }, 72 | options 73 | }); 74 | } 75 | async function getDataFile(id, options) { 76 | return invokeFetch("data-files", { 77 | method: "get", 78 | pathTemplate: "/api/v1/data-files/{id}", 79 | pathVariables: { id }, 80 | options 81 | }); 82 | } 83 | async function reuploadDataFile(id, body, options) { 84 | return invokeFetch("data-files", { 85 | method: "put", 86 | pathTemplate: "/api/v1/data-files/{id}", 87 | pathVariables: { id }, 88 | body, 89 | contentType: "multipart/form-data", 90 | options 91 | }); 92 | } 93 | async function changeDataFileOwner(id, body, options) { 94 | return invokeFetch("data-files", { 95 | method: "post", 96 | pathTemplate: "/api/v1/data-files/{id}/actions/change-owner", 97 | pathVariables: { id }, 98 | body, 99 | contentType: "application/json", 100 | options 101 | }); 102 | } 103 | async function moveDataFile(id, body, options) { 104 | return invokeFetch("data-files", { 105 | method: "post", 106 | pathTemplate: "/api/v1/data-files/{id}/actions/change-space", 107 | pathVariables: { id }, 108 | body, 109 | contentType: "application/json", 110 | options 111 | }); 112 | } 113 | function clearCache() { 114 | return clearApiCache("data-files"); 115 | } 116 | var dataFilesExport = { 117 | getDataFiles, 118 | uploadDataFile, 119 | moveDataFiles, 120 | deleteDataFiles, 121 | getDataFilesConnections, 122 | getDataFileConnection, 123 | getDataFilesQuotas, 124 | deleteDataFile, 125 | getDataFile, 126 | reuploadDataFile, 127 | changeDataFileOwner, 128 | moveDataFile, 129 | clearCache 130 | }; 131 | var data_files_default = dataFilesExport; 132 | export { 133 | changeDataFileOwner, 134 | clearCache, 135 | data_files_default as default, 136 | deleteDataFile, 137 | deleteDataFiles, 138 | getDataFile, 139 | getDataFileConnection, 140 | getDataFiles, 141 | getDataFilesConnections, 142 | getDataFilesQuotas, 143 | moveDataFile, 144 | moveDataFiles, 145 | reuploadDataFile, 146 | uploadDataFile 147 | }; 148 | -------------------------------------------------------------------------------- /data-qualities.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/data-qualities.ts 9 | async function triggerDataQualitiesComputation(body, options) { 10 | return invokeFetch("data-qualities", { 11 | method: "post", 12 | pathTemplate: "/api/v1/data-qualities/computations", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function getDataQualitiesComputation(computationId, options) { 19 | return invokeFetch("data-qualities", { 20 | method: "get", 21 | pathTemplate: "/api/v1/data-qualities/computations/{computationId}", 22 | pathVariables: { computationId }, 23 | options 24 | }); 25 | } 26 | async function getDataQualitiesGlobalResults(query, options) { 27 | return invokeFetch("data-qualities", { 28 | method: "get", 29 | pathTemplate: "/api/v1/data-qualities/global-results", 30 | query, 31 | options 32 | }); 33 | } 34 | function clearCache() { 35 | return clearApiCache("data-qualities"); 36 | } 37 | var dataQualitiesExport = { 38 | triggerDataQualitiesComputation, 39 | getDataQualitiesComputation, 40 | getDataQualitiesGlobalResults, 41 | clearCache 42 | }; 43 | var data_qualities_default = dataQualitiesExport; 44 | export { 45 | clearCache, 46 | data_qualities_default as default, 47 | getDataQualitiesComputation, 48 | getDataQualitiesGlobalResults, 49 | triggerDataQualitiesComputation 50 | }; 51 | -------------------------------------------------------------------------------- /data-sets.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/data-sets.ts 9 | async function deleteDataSets(body, options) { 10 | return invokeFetch("data-sets", { 11 | method: "delete", 12 | pathTemplate: "/api/v1/data-sets", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function createDataSet(body, options) { 19 | return invokeFetch("data-sets", { 20 | method: "post", 21 | pathTemplate: "/api/v1/data-sets", 22 | body, 23 | contentType: "application/json", 24 | options 25 | }); 26 | } 27 | async function getDataSet(dataSetId, query, options) { 28 | return invokeFetch("data-sets", { 29 | method: "get", 30 | pathTemplate: "/api/v1/data-sets/{data-set-id}", 31 | pathVariables: { "data-set-id": dataSetId }, 32 | query, 33 | options 34 | }); 35 | } 36 | async function patchDataSet(dataSetId, body, options) { 37 | return invokeFetch("data-sets", { 38 | method: "patch", 39 | pathTemplate: "/api/v1/data-sets/{data-set-id}", 40 | pathVariables: { "data-set-id": dataSetId }, 41 | body, 42 | contentType: "application/json", 43 | options 44 | }); 45 | } 46 | async function updateDataSet(dataSetId, body, options) { 47 | return invokeFetch("data-sets", { 48 | method: "put", 49 | pathTemplate: "/api/v1/data-sets/{data-set-id}", 50 | pathVariables: { "data-set-id": dataSetId }, 51 | body, 52 | contentType: "application/json", 53 | options 54 | }); 55 | } 56 | async function getDataSetProfiles(dataSetId, query, options) { 57 | return invokeFetch("data-sets", { 58 | method: "get", 59 | pathTemplate: "/api/v1/data-sets/{data-set-id}/profiles", 60 | pathVariables: { "data-set-id": dataSetId }, 61 | query, 62 | options 63 | }); 64 | } 65 | function clearCache() { 66 | return clearApiCache("data-sets"); 67 | } 68 | var dataSetsExport = { 69 | deleteDataSets, 70 | createDataSet, 71 | getDataSet, 72 | patchDataSet, 73 | updateDataSet, 74 | getDataSetProfiles, 75 | clearCache 76 | }; 77 | var data_sets_default = dataSetsExport; 78 | export { 79 | clearCache, 80 | createDataSet, 81 | data_sets_default as default, 82 | deleteDataSets, 83 | getDataSet, 84 | getDataSetProfiles, 85 | patchDataSet, 86 | updateDataSet 87 | }; 88 | -------------------------------------------------------------------------------- /data-sources.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/data-sources.ts 9 | async function getDataSources(query, options) { 10 | return invokeFetch("data-sources", { 11 | method: "get", 12 | pathTemplate: "/api/v1/data-sources", 13 | query, 14 | options 15 | }); 16 | } 17 | async function getDataSourceApiSpecs(dataSourceId, options) { 18 | return invokeFetch("data-sources", { 19 | method: "get", 20 | pathTemplate: "/api/v1/data-sources/{dataSourceId}/api-specs", 21 | pathVariables: { dataSourceId }, 22 | options 23 | }); 24 | } 25 | async function getDataSourceGateways(dataSourceId, query, options) { 26 | return invokeFetch("data-sources", { 27 | method: "get", 28 | pathTemplate: "/api/v1/data-sources/{dataSourceId}/gateways", 29 | pathVariables: { dataSourceId }, 30 | query, 31 | options 32 | }); 33 | } 34 | function clearCache() { 35 | return clearApiCache("data-sources"); 36 | } 37 | var dataSourcesExport = { getDataSources, getDataSourceApiSpecs, getDataSourceGateways, clearCache }; 38 | var data_sources_default = dataSourcesExport; 39 | export { 40 | clearCache, 41 | data_sources_default as default, 42 | getDataSourceApiSpecs, 43 | getDataSourceGateways, 44 | getDataSources 45 | }; 46 | -------------------------------------------------------------------------------- /data-stores.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/data-stores.ts 9 | async function deleteDataStores(body, options) { 10 | return invokeFetch("data-stores", { 11 | method: "delete", 12 | pathTemplate: "/api/v1/data-stores", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function getDataStores(query, options) { 19 | return invokeFetch("data-stores", { 20 | method: "get", 21 | pathTemplate: "/api/v1/data-stores", 22 | query, 23 | options 24 | }); 25 | } 26 | async function createDataStore(body, options) { 27 | return invokeFetch("data-stores", { 28 | method: "post", 29 | pathTemplate: "/api/v1/data-stores", 30 | body, 31 | contentType: "application/json", 32 | options 33 | }); 34 | } 35 | async function deleteDataStoreDataAssets(dataStoreIds, options) { 36 | return invokeFetch("data-stores", { 37 | method: "delete", 38 | pathTemplate: "/api/v1/data-stores/{data-store-ids}/data-assets", 39 | pathVariables: { "data-store-ids": dataStoreIds }, 40 | options 41 | }); 42 | } 43 | async function getDataStoreDataAssets(dataStoreIds, query, options) { 44 | return invokeFetch("data-stores", { 45 | method: "get", 46 | pathTemplate: "/api/v1/data-stores/{data-store-ids}/data-assets", 47 | pathVariables: { "data-store-ids": dataStoreIds }, 48 | query, 49 | options 50 | }); 51 | } 52 | async function deleteDataStoreDataAssetDataSets(dataStoreIds, dataAssetIds, options) { 53 | return invokeFetch("data-stores", { 54 | method: "delete", 55 | pathTemplate: "/api/v1/data-stores/{data-store-ids}/data-assets/{data-asset-ids}/data-sets", 56 | pathVariables: { "data-store-ids": dataStoreIds, "data-asset-ids": dataAssetIds }, 57 | options 58 | }); 59 | } 60 | async function getDataStoreDataAssetDataSets(dataStoreIds, dataAssetIds, query, options) { 61 | return invokeFetch("data-stores", { 62 | method: "get", 63 | pathTemplate: "/api/v1/data-stores/{data-store-ids}/data-assets/{data-asset-ids}/data-sets", 64 | pathVariables: { "data-store-ids": dataStoreIds, "data-asset-ids": dataAssetIds }, 65 | query, 66 | options 67 | }); 68 | } 69 | async function getDataStore(dataStoreId, query, options) { 70 | return invokeFetch("data-stores", { 71 | method: "get", 72 | pathTemplate: "/api/v1/data-stores/{data-store-id}", 73 | pathVariables: { "data-store-id": dataStoreId }, 74 | query, 75 | options 76 | }); 77 | } 78 | async function patchDataStore(dataStoreId, body, options) { 79 | return invokeFetch("data-stores", { 80 | method: "patch", 81 | pathTemplate: "/api/v1/data-stores/{data-store-id}", 82 | pathVariables: { "data-store-id": dataStoreId }, 83 | body, 84 | contentType: "application/json", 85 | options 86 | }); 87 | } 88 | async function updateDataStore(dataStoreId, body, options) { 89 | return invokeFetch("data-stores", { 90 | method: "put", 91 | pathTemplate: "/api/v1/data-stores/{data-store-id}", 92 | pathVariables: { "data-store-id": dataStoreId }, 93 | body, 94 | contentType: "application/json", 95 | options 96 | }); 97 | } 98 | function clearCache() { 99 | return clearApiCache("data-stores"); 100 | } 101 | var dataStoresExport = { 102 | deleteDataStores, 103 | getDataStores, 104 | createDataStore, 105 | deleteDataStoreDataAssets, 106 | getDataStoreDataAssets, 107 | deleteDataStoreDataAssetDataSets, 108 | getDataStoreDataAssetDataSets, 109 | getDataStore, 110 | patchDataStore, 111 | updateDataStore, 112 | clearCache 113 | }; 114 | var data_stores_default = dataStoresExport; 115 | export { 116 | clearCache, 117 | createDataStore, 118 | data_stores_default as default, 119 | deleteDataStoreDataAssetDataSets, 120 | deleteDataStoreDataAssets, 121 | deleteDataStores, 122 | getDataStore, 123 | getDataStoreDataAssetDataSets, 124 | getDataStoreDataAssets, 125 | getDataStores, 126 | patchDataStore, 127 | updateDataStore 128 | }; 129 | -------------------------------------------------------------------------------- /dcaas.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/dcaas.ts 9 | async function dataConnectionsDcaas(body, options) { 10 | return invokeFetch("dcaas", { 11 | method: "post", 12 | pathTemplate: "/api/v1/dcaas/actions/data-connections", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function dataConnectionsDcaasApiSpecs(query, options) { 19 | return invokeFetch("dcaas", { 20 | method: "get", 21 | pathTemplate: "/api/v1/dcaas/actions/data-connections/api-specs", 22 | query, 23 | options 24 | }); 25 | } 26 | async function dataConnectionsDcaa(connectionId, options) { 27 | return invokeFetch("dcaas", { 28 | method: "get", 29 | pathTemplate: "/api/v1/dcaas/actions/data-connections/{connectionId}", 30 | pathVariables: { connectionId }, 31 | options 32 | }); 33 | } 34 | function clearCache() { 35 | return clearApiCache("dcaas"); 36 | } 37 | var dcaasExport = { dataConnectionsDcaas, dataConnectionsDcaasApiSpecs, dataConnectionsDcaa, clearCache }; 38 | var dcaas_default = dcaasExport; 39 | export { 40 | clearCache, 41 | dataConnectionsDcaa, 42 | dataConnectionsDcaas, 43 | dataConnectionsDcaasApiSpecs, 44 | dcaas_default as default 45 | }; 46 | -------------------------------------------------------------------------------- /direct-access-agents.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/direct-access-agents.ts 9 | async function restartDirectAccessAgent(agentId, agentAction, options) { 10 | return invokeFetch("direct-access-agents", { 11 | method: "post", 12 | pathTemplate: "/api/v1/direct-access-agents/{agentId}/actions/{agentAction}", 13 | pathVariables: { agentId, agentAction }, 14 | options 15 | }); 16 | } 17 | async function getDirectAccessAgentConfiguration(agentId, query, options) { 18 | return invokeFetch("direct-access-agents", { 19 | method: "get", 20 | pathTemplate: "/api/v1/direct-access-agents/{agentId}/configurations", 21 | pathVariables: { agentId }, 22 | query, 23 | options 24 | }); 25 | } 26 | async function patchDirectAccessAgentConfiguration(agentId, body, options) { 27 | return invokeFetch("direct-access-agents", { 28 | method: "patch", 29 | pathTemplate: "/api/v1/direct-access-agents/{agentId}/configurations", 30 | pathVariables: { agentId }, 31 | body, 32 | contentType: "application/json", 33 | options 34 | }); 35 | } 36 | async function getDirectAccessAgentConnectorFiles(agentId, connectorType, query, options) { 37 | return invokeFetch("direct-access-agents", { 38 | method: "get", 39 | pathTemplate: "/api/v1/direct-access-agents/{agentId}/connectors/{connectorType}/files", 40 | pathVariables: { agentId, connectorType }, 41 | query, 42 | options 43 | }); 44 | } 45 | async function getDirectAccessAgentConnectorFilesWithoutQuery(agentId, connectorType, options) { 46 | return invokeFetch("direct-access-agents", { 47 | method: "get", 48 | pathTemplate: "/api/v1/direct-access-agents/{agentId}/connectors/{connectorType}/files", 49 | pathVariables: { agentId, connectorType }, 50 | options 51 | }); 52 | } 53 | async function getDirectAccessAgentConnectorFile(agentId, connectorType, fileType, options) { 54 | return invokeFetch("direct-access-agents", { 55 | method: "get", 56 | pathTemplate: "/api/v1/direct-access-agents/{agentId}/connectors/{connectorType}/files/{fileType}", 57 | pathVariables: { agentId, connectorType, fileType }, 58 | options 59 | }); 60 | } 61 | async function updateDirectAccessAgentConnectorFile(agentId, connectorType, fileType, query, body, options) { 62 | return invokeFetch("direct-access-agents", { 63 | method: "put", 64 | pathTemplate: "/api/v1/direct-access-agents/{agentId}/connectors/{connectorType}/files/{fileType}", 65 | pathVariables: { agentId, connectorType, fileType }, 66 | query, 67 | body, 68 | contentType: "application/json", 69 | options 70 | }); 71 | } 72 | async function updateDirectAccessAgentConnectorFileWithoutQuery(agentId, connectorType, fileType, body, options) { 73 | return invokeFetch("direct-access-agents", { 74 | method: "put", 75 | pathTemplate: "/api/v1/direct-access-agents/{agentId}/connectors/{connectorType}/files/{fileType}", 76 | pathVariables: { agentId, connectorType, fileType }, 77 | body, 78 | contentType: "application/json", 79 | options 80 | }); 81 | } 82 | function clearCache() { 83 | return clearApiCache("direct-access-agents"); 84 | } 85 | var directAccessAgentsExport = { 86 | restartDirectAccessAgent, 87 | getDirectAccessAgentConfiguration, 88 | patchDirectAccessAgentConfiguration, 89 | getDirectAccessAgentConnectorFiles, 90 | getDirectAccessAgentConnectorFilesWithoutQuery, 91 | getDirectAccessAgentConnectorFile, 92 | updateDirectAccessAgentConnectorFile, 93 | updateDirectAccessAgentConnectorFileWithoutQuery, 94 | clearCache 95 | }; 96 | var direct_access_agents_default = directAccessAgentsExport; 97 | export { 98 | clearCache, 99 | direct_access_agents_default as default, 100 | getDirectAccessAgentConfiguration, 101 | getDirectAccessAgentConnectorFile, 102 | getDirectAccessAgentConnectorFiles, 103 | getDirectAccessAgentConnectorFilesWithoutQuery, 104 | patchDirectAccessAgentConfiguration, 105 | restartDirectAccessAgent, 106 | updateDirectAccessAgentConnectorFile, 107 | updateDirectAccessAgentConnectorFileWithoutQuery 108 | }; 109 | -------------------------------------------------------------------------------- /docs/examples.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | ◁ [Back to overview](../README.md) 4 | 5 | Heres's some examples on common scenarios on how to interact with Qlik API's using `@qlik/api` 6 | 7 | The code in the examples use ES Module Syntax. It is possible to use CommonJS format for the NodeJS examples, but we recommend using ES Modules since it's where the whole Javascript EcoSystem is moving towards. The code you write can also easily be ported between browsers and NodeJS when using ES Modules. 8 | 9 | - [Fetching spaces](./examples/fetch-spaces.md) 10 | - [Show Sheet List in an app](./examples/show-sheet-list.md) 11 | - [Create an app](./examples/create-app.md) 12 | - [Create session app](./examples/create-session-app.md) 13 | - [Open app without data](./examples/open-without-data.md) 14 | -------------------------------------------------------------------------------- /docs/examples/create-app.md: -------------------------------------------------------------------------------- 1 | # Create an app and add some data 2 | 3 | ◁ [Back to examples](../examples.md) 4 | 5 | This examples shows how to: 6 | 7 | - Create an app with the `apps` api 8 | - Connect to the app 9 | - Add a load script 10 | - Reload the data 11 | - Run a calculation with a qix engine expression. 12 | 13 | ```ts 14 | import { apps, auth, qix } from "@qlik/api"; 15 | 16 | const hostConfig = { 17 | host: "your-tenant.region.qlikcloud.com", 18 | authType: "apikey", 19 | apiKey: "", 20 | }; 21 | 22 | auth.setDefaultHostConfig(hostConfig); 23 | 24 | async function main() { 25 | try { 26 | const { data } = await apps.createApp({ attributes: { name: "Anders App" } }); 27 | const appId = data.attributes?.id; 28 | console.log("We have created:", appId); 29 | // do stuff with the app 30 | const session = qix.openAppSession({ appId }); 31 | const app = await session.getDoc(); 32 | console.log("Setting up some data"); 33 | await app.setScript("Load RecNo() as N autogenerate(100);"); 34 | await app.doReload(); 35 | console.log("Reloaded data done"); 36 | const evalResult = await app.evaluate("SUM([N])"); 37 | console.log(`Eval result: ${evalResult}`); 38 | if (appId) { 39 | await apps.deleteApp(appId); 40 | console.log("We have now deleted:", appId); 41 | } 42 | session.close(); 43 | } catch (e) { 44 | console.error(e); 45 | } 46 | } 47 | 48 | await main(); 49 | ``` 50 | 51 | ◁ [Back to examples](../examples.md) 52 | -------------------------------------------------------------------------------- /docs/examples/create-session-app.md: -------------------------------------------------------------------------------- 1 | # Create a session app 2 | 3 | ◁ [Back to examples](../examples.md) 4 | 5 | This examples shows how to: 6 | 7 | - create a session app by opening a qix session to an app with a random id that starts with "SessionApp\_" 8 | - connect to the app and add some data to it 9 | - create an object and setup an event listener to when hypercube changes 10 | - reload the data to trigger the changed event. 11 | 12 | ```ts 13 | import { auth, qix } from "@qlik/api"; 14 | 15 | auth.setDefaultHostConfig({ 16 | host: "your-tenant.region.qlikcloud.com", 17 | authType: "apikey", 18 | apiKey: "", 19 | 20 | async function main() { 21 | try { 22 | // Create a session app 23 | const randomId = Math.random().toString(32).substring(3); 24 | const appId = `SessionApp_${randomId}`; 25 | // if appId starts with SessionApp_ and have a unique id it will become a session app. 26 | 27 | // Open a websocket session with the session app id 28 | const session = qix.openAppSession({ appId }); 29 | // Get the app object 30 | const app = await session.getDoc(); 31 | 32 | // Set a script in the app 33 | const script = ` 34 | TempTable: 35 | Load 36 | RecNo() as ID, 37 | Rand() as Value 38 | AutoGenerate 100 39 | `; 40 | await app.setScript(script); 41 | 42 | // Create an object with a hypercube using fields in the data model 43 | const properties = { 44 | qInfo: { 45 | qType: "my-straight-hypercube", 46 | }, 47 | qHyperCubeDef: { 48 | qDimensions: [ 49 | { 50 | qDef: { qFieldDefs: ["ID"] }, 51 | }, 52 | ], 53 | qMeasures: [ 54 | { 55 | qDef: { qDef: "=Sum(Value)" }, 56 | }, 57 | ], 58 | qInitialDataFetch: [ 59 | { 60 | qHeight: 5, 61 | qWidth: 2, 62 | }, 63 | ], 64 | }, 65 | }; 66 | const hypercube = await app.createObject(properties); 67 | await hypercube.getLayout(); 68 | 69 | // Register an event listener for change events 70 | hypercube.on("changed", () => { 71 | console.log("changed ✅"); 72 | }); 73 | 74 | console.log("performing reload, expect a change to the hypercube object to happen"); 75 | // Do a reload of the app 76 | await app.doReload(); 77 | 78 | // Close session 79 | await session.close(); 80 | } catch (e) { 81 | console.error(e); 82 | } 83 | } 84 | 85 | main(); 86 | ``` 87 | 88 | ◁ [Back to examples](../examples.md) 89 | -------------------------------------------------------------------------------- /docs/examples/fetch-spaces.md: -------------------------------------------------------------------------------- 1 | # Fetch Spaces in a Qlik Tenant 2 | 3 | ◁ [Back to examples](../examples.md) 4 | 5 | ## NodeJS using an API Key 6 | 7 | This examples shows how to fetch the space list from a tenant. 8 | 9 | ```typescript 10 | import { auth, spaces } from "@qlik/api"; 11 | 12 | const x = { 13 | host: "your-tenant.region.qlikcloud.com", 14 | authType: "apikey", 15 | apiKey: "", 16 | }; 17 | 18 | auth.setDefaultHostConfig(x); 19 | 20 | async function main() { 21 | const { data: mySpaces } = await spaces.getSpaces({}); 22 | console.log(mySpaces.data); // the data response (list of spaces) 23 | } 24 | 25 | await main(); 26 | ``` 27 | 28 | ## NodeJS using Oauth2 29 | 30 | ```typescript 31 | import { auth, spaces } from "@qlik/api"; 32 | 33 | const hostConfig = { 34 | host: "your-tenant.region.qlikcloud.com", 35 | authType: "oauth2", 36 | clientId: "", 37 | clientSecret: "", 38 | }; 39 | 40 | auth.setDefaultHostConfig(hostConfig); 41 | 42 | async function main() { 43 | const { data: mySpaces } = await spaces.getSpaces({}); 44 | console.log(mySpaces.data); // the data response (list of spaces) 45 | } 46 | 47 | await main(); 48 | ``` 49 | 50 | ## Browser using cookies 51 | 52 | When using a browser you can load the library files from a CDN provider. It is also possible to use npm and a bundler to get the code into your application. In the html below we are making an api call to fetch the spaces from a tenant and we add the names of the spaces as div elements in the dom. 53 | 54 | ```html 55 | 56 | 57 | 58 | Fetching spaces with @qlik/api 59 | 60 | 61 |
62 |
Spaces:
63 | 64 |
65 | 82 | 83 | 84 | ``` 85 | 86 | ## Browser using Oauth2 87 | 88 | Use the same example as above but change the host config to use [Oauth2](authentication.md#oauth2) 89 | 90 | ◁ [Back to examples](../examples.md) 91 | -------------------------------------------------------------------------------- /docs/examples/open-without-data.md: -------------------------------------------------------------------------------- 1 | # Open app without data 2 | 3 | ◁ [Back to examples](../examples.md) 4 | 5 | This examples shows how to: 6 | 7 | - Open an app without data 8 | 9 | Sometimes when apps are big they open slowly in qix engine and if you only want to read or write some metadata in the app it's faster to open the app without the data. 10 | 11 | ```ts 12 | import { apps, auth, qix } from "@qlik/api"; 13 | 14 | const hostConfig = { 15 | host: "your-tenant.region.qlikcloud.com", 16 | authType: "apikey", 17 | apiKey: "", 18 | }; 19 | 20 | auth.setDefaultHostConfig(hostConfig); 21 | 22 | async function main() { 23 | try { 24 | const appId = ""; // <- replace this with an appid 25 | 26 | const session = qix.openAppSession({ appId, withoutData: true }); 27 | const app = await session.getDoc(); 28 | const appLayout = await app.getLayout(); 29 | console.log(appLayout); 30 | } catch (e) { 31 | console.error(e); 32 | } finally { 33 | session.close(); 34 | } 35 | } 36 | 37 | await main(); 38 | ``` 39 | 40 | ◁ [Back to examples](../examples.md) 41 | -------------------------------------------------------------------------------- /docs/examples/show-sheet-list.md: -------------------------------------------------------------------------------- 1 | # Show Sheet List in a Qlik Sense Application 2 | 3 | ◁ [Back to examples](../examples.md) 4 | 5 | For this example the id of a Qlik Sense Application that you have access to is needed. To get the id of an app, click on the "More actions" button on the app from the Qlik Cloud Hub and click on "details". There the app id is visible. Another option is to open the app and look at the URL. The app id is located as `/sense//` in the url. 6 | 7 | ## NodeJS using an API Key 8 | 9 | ```ts 10 | import { auth, qix } from "@qlik/api"; 11 | 12 | const hostConfig = { 13 | authType = "apikey", 14 | host: "your-tenant.region.qlikcloud.com", 15 | apiKey: "", 16 | }; 17 | 18 | // to use "Oauth2" auth module switch hostConfig to oauth2 and set clientId 19 | // and clientSecret instead of apiKey. 20 | 21 | const appId = ""; 22 | 23 | auth.setDefaultHostConfig(hostConfig); 24 | 25 | async function main() { 26 | const session = qix.openAppSession({ appId }); 27 | const app = await session.getDoc(); 28 | 29 | const sheetList = await app.getSheetList(); 30 | console.log(sheetList); 31 | session.close(); 32 | } 33 | 34 | main(); 35 | ``` 36 | 37 | In this example we're using the api method `app.getSheetList()` which comes from a "sense mixin" which is an extension of the official QIX API used for Qlik Sense Applications. In `@qlik/api` all "sense mixins" have been included to easily interact with Qlik Sense Applications in the same way in-house Qlik Developers do. 38 | 39 | ## Browser using Cookies 40 | 41 | When using a browser you can load the library files from a CDN provider. It is also possible to use npm and a bundler to get the code into your application. In the html below we are making an api call to fetch the sheet list from a Qlik Sense App and we add the sheet titles as div elements in the dom. 42 | 43 | ```html 44 | 45 | 46 | 47 | Fetching sheet list from an app with @qlik/api 48 | 49 | 50 |
51 |
Sheets:
52 | 53 |
54 | 73 | 74 | 75 | ``` 76 | 77 | ## Browser using Oauth2 78 | 79 | Use the same example as above but change the host config to use [Oauth2](authentication.md#oauth2) 80 | 81 | ◁ [Back to examples](../examples.md) 82 | -------------------------------------------------------------------------------- /docs/features.md: -------------------------------------------------------------------------------- 1 | # Features 2 | 3 | ◁ [Back to overview](../README.md) 4 | 5 | - [Typed API calls](#typed-api-calls) 6 | - [Caching](#caching) 7 | - [Paging](#paging) 8 | 9 | ## Typed API Calls 10 | 11 | Each API comes with full typescript support which will greatly help the developer experience. Use the types to understand how the API works by going into the type definition. In most editors (for example vscode) you can CMD+click (mac) or CTRL+click (windows) on an api-call to see the type definition of parameters, return structures etc etc. 12 | 13 | ## Caching 14 | 15 | Request responses are cached in the browser so requests can be fired away without being concerned about causing unnecessary traffic. Ongoing requests are also re-used if two equal requests go out at the same time. A request can be forced by adding an option to the call `{ noCache: true }`. Clearing cache can be automatically handled as shown [below](#automatic-cache-clearing-and-auto-csrf). 16 | 17 | ```ts 18 | import { getItems } from "@qlik/api/items"; 19 | 20 | try { 21 | await getItems(); 22 | await getItems(); 23 | await getItems(); 24 | await getItems(); 25 | // the 4 requests above will result in only one request over network 26 | 27 | // empty query object as 1st parameter, 2nd parameter is the ApiCallOptions 28 | await getItems({}, { noCache: true }); 29 | // this request above will result in a network call because of the noCache option 30 | } catch (e) { 31 | // something went wrong 32 | } 33 | ``` 34 | 35 | ### Automatic cache clearing and auto csrf 36 | 37 | Requests that need parameters are all using documented types inherited from the spec files. Requests that require a valid csrf-token automatically fetch it (once if needed) and add it to the outgoing requests headers. Requests that change resources (for example POST/PUT) automatically clear the cache. 38 | 39 | ```ts 40 | import { getSpaces, createSpace } from "@qlik/api/spaces"; 41 | 42 | try { 43 | let { data: spaceList } = await getSpaces({}); 44 | // spaceList has 2 items 45 | const { data: space } = await createSpace({ name: "My space", description: "description", type: "shared" }); 46 | // the call above automatically adds a csrf-token header. If no csrf-token has been fetched yet it will first fetch it. 47 | // space now has the Space type and your editor will show the types e.g: 48 | // space.id; 49 | // space.createdAt; 50 | 51 | { data: spaceList } = await getSpaces(); // cached response has automatically been cleared because of createSpace call above 52 | // spaceList has 3 items 53 | } catch (e) { 54 | // something went wrong 55 | } 56 | ``` 57 | 58 | ### Manual cache clearing 59 | 60 | The cache for an api can be cleared with the `clearCache` method. This clears all cached responses for that specific api. It is recommended to use the [automatic cache clearing](#automatic-cache-clearing-and-auto-csrf). 61 | 62 | ```ts 63 | import { getSpaces, clearCache: clearSpaceCache } from "@qlik/api/spaces"; 64 | 65 | try { 66 | await getSpaces(); 67 | clearSpaceCache(); // clears all cached responses for the space api. 68 | await getSpaces(); 69 | // the 2 requests above will both go out on the network 70 | } catch (e) { 71 | // something went wrong 72 | } 73 | ``` 74 | 75 | **note** `clearCache` only affects one api, all other api caches are unaffected. 76 | 77 | ## Paging 78 | 79 | Many "list" APIs return links to the next and previous page in the list GET response body. If the API follows the conventions and declares this in the OpenAPI spec next and prev functions will be available in the API response type. Note that the next and prev functions are only defined when there actually is a next and prev page. 80 | 81 | ◁ [Back to overview](../README.md) 82 | -------------------------------------------------------------------------------- /docs/qix.md: -------------------------------------------------------------------------------- 1 | # QIX 2 | 3 | ◁ [Back to overview](../README.md) 4 | 5 | The `@qlik/api/qix` module gives you a fully typed API to the QIX engine and to Qlik Sense Applications. This is built for ease of use and also comes with the same "Sense Mixins" that Qlik's in-house developers use for building the Qlik Sense Client application. This means that it is easier to get the different list objects from Qlik Sense Applications. Simply setup a host config and connect to an app. 6 | 7 | ## Can this be used instead of `enigma.js`? 8 | 9 | [enigma.js](https://github.com/qlik-oss/enigma.js) is a library that can be used to set up a websocket connection to a Qlik Sense Engine and get programmatic interfaces to Qlik Sense App's object models. The library provide events to data updates and has some handy features such as suspending and resuming sessions. 10 | 11 | `@qlik/api` provides the same features, but with a lot simpler interface. It also comes with types for the QIX api including GenericObjects, HyperCubes etc etc. So in most cases `@qlik/api` can be used instead of `enigma.js`. Only when you have very specific configuration needs and don't want to use the "sense mixins" `enigma.js` can be used. 12 | 13 | ## Features 14 | 15 | ### Re-using sessions 16 | 17 | `@qlik/api/qix` will re-use existing websocket sessions if they are found. It also integrates seamlessly with `@qlik/embed` libraries and will hook into any websocket session already opened by any `@qlik/embed` library. 18 | 19 | ### Auto suspend/resume and re-connect 20 | 21 | When a session gets a suspend event `@qlik/api` will automatically handle the suspend/resume logic and attempt to re-connect to the same engine session. Hopefully a user will never even notice that the websocket was closed for a little while. 22 | 23 | ## The App session 24 | 25 | An app session in qix means a websocket connected to one app by one user in qix engine. 26 | 27 | ```js 28 | qix.openAppSession({ ...appSessionProps }); 29 | ``` 30 | 31 | The app sesssion settings have the following properties. 32 | 33 | - `appId` - Required string to open an App 34 | - `identity` - Optional string to open an individual session to the same app that is different from the default. Useful if different selection states are needed simultaneously. 35 | - `hostConfig` - Optional Hostconfig to connect to a URL and authenticate an app session. Only needed if default HostConfig has not been set, or if connection should be different from the default. 36 | - `withoutData` - Optional boolean, set to true if app should be opened without loading the data blob 37 | 38 | **_note_** - when using `withoutData: true` and no `identity` it is likely that engine throws error "App is opened in a different mode" if the app has already been opened with data or if the app is opened in `Qlik Sense` after script has been run without data. So it is _strongly recommended_ to use the `identity` parameter when opening the app without data. E.g `qix.openAppSession({ appId: "app-id", identity: "no-data", withoutData: true, ... })` 39 | 40 | ## Usage example 41 | 42 | ```ts 43 | import { openAppSession } from "@qlik/api/qix"; 44 | import { setDefaultHostConfig } from "@qlik/api/auth"; 45 | 46 | setDefaultHostConfig({ ... }); 47 | 48 | // sets up a session to a Qix Engine App 49 | appSession = openAppSession({ appId: , identity: , hostConfig: , withoutData: " }); 50 | // or use the shorthand 51 | // appSession = openAppSession(); 52 | 53 | // get the "qix document (qlik app)" 54 | const app = await appSession.getDoc(); 55 | 56 | // app is now fully typed including sense-client mixins 57 | const sheetlist = await app.getSheetList(); 58 | 59 | // sheetlist is now of the type SheetListItem[], that type is included in the package. 60 | ``` 61 | 62 | React example of getting the sheet list from a Qlik Sense app. 63 | 64 | ```tsx 65 | import { type HostConfig } from "@qlik/api/auth"; 66 | import { openAppSession, type Doc } from "@qlik/api/qix"; 67 | import React from "react"; 68 | import usePromise from "react-use-promise"; 69 | 70 | const hostConfig: HostConfig = { 71 | ..., // add host config values here 72 | }; 73 | 74 | 75 | /** 76 | * Use App Hook 77 | */ 78 | function useApp(appId: string): Doc | undefined { 79 | const [app, setApp] = React.useState(undefined); 80 | React.useEffect(() => { 81 | // open a websocket using the specified hostConfig. If `setDefaultHostConfig` has been used, 82 | // passing host config here is not needed here. 83 | const appSession = openAppSession({ appId, hostConfig }); 84 | appSession.getDoc().then((x) => { 85 | setApp(x); 86 | }); 87 | return () => { 88 | if (appSession) { 89 | appSession.close(); 90 | } 91 | }; 92 | }, [appId]); 93 | return app; 94 | } 95 | 96 | type SheetListProps = { 97 | appId: string; 98 | }; 99 | 100 | const SheetList = ({ appId }: SheetListProps): JSX.Element | null => { 101 | const app = useApp(appId); 102 | 103 | // this could be nicely wrapped in your own local getSheetList hook similar to the useApp hook above 104 | const [sheetList] = usePromise(async () => app && app.getSheetList(), [app]); 105 | // getSheetList above is coming from mixins, fully typed 106 | if (!sheetList) { 107 | return
Loading
; 108 | } 109 | return ( 110 |
111 |
Sheets:
112 | {sheetList.map((item) => ( 113 |
{item.qData?.title}
114 | ))} 115 |
116 | ); 117 | }; 118 | 119 | export default SheetList; 120 | ``` 121 | 122 | More examples can be found in the [examples](examples.md) section. 123 | 124 | ◁ [Back to overview](../README.md) 125 | -------------------------------------------------------------------------------- /docs/rest.md: -------------------------------------------------------------------------------- 1 | # REST 2 | 3 | ◁ [Back to overview](../README.md) 4 | 5 | Each rest entity is exposed as it's own javascript module. It contains all api calls and types exposed by the entity service. They can be imported from `@qlik/api` as a sub module of the package like `/spaces` in the example below. These modules both has named exports and a default export. Types are always named exports. 6 | 7 | ```ts 8 | import spaces, { type Spaces } from "@qlik/api/spaces"; 9 | await { data: mySpaces } = await spaces.getSpaces(); 10 | 11 | // mySpaces now has the type Spaces 12 | ``` 13 | 14 | Each module can also be imported directly from `@qlik/api`. 15 | 16 | ```ts 17 | import { spaces, users } from "@qlik/api"; 18 | ``` 19 | 20 | These modules are the default exports from each respective sub module. The types from the sub modules are not exposed here since they would introduce name conflicts. The types need to be imported from the respective sub modules. 21 | 22 | Info about these entities and their api's can be found [here](https://qlik.dev/apis/#rest). 23 | 24 | ## HTTP Calls 25 | 26 | The http calls uses the native fetch api. Each http call with a response status in the 200 range will resolve to an object with structure `{ status, headers, data }`. If status is in the >=300 range an error will be thrown. 27 | 28 | ```ts 29 | import { getSpaces } from "@qlik/api/spaces"; 30 | 31 | try { 32 | const { status, headers, data: spaces } = await getSpaces(); 33 | // status < 300 34 | if (spaces.data) { 35 | // the spaces list is returned as "data" 36 | // There are spaces 37 | } 38 | } catch (e) { 39 | // status >= 300 40 | // something went wrong 41 | } 42 | ``` 43 | 44 | ## Error handling 45 | 46 | Every http response that has a status over 300 is considered to be an error and the promise is rejected. To handle this in typescript you can do the following: 47 | 48 | ```ts 49 | import { deleteExtension, type DeleteExtensionHttpError } from "@qlik/qmfe/extensions"; 50 | 51 | try { 52 | const { status } = await deleteExtension(""); 53 | ... 54 | } catch (e as DeleteExtensionHttpError) { 55 | if (e.status === 404) { 56 | // DeleteEndpoint404HttpError 57 | e.data // < -- body of error 58 | } 59 | } 60 | ``` 61 | 62 | ## Caching 63 | 64 | Every GET request is cached so that subsequent calls to the same api will resolve immediately from the cache. Read more about caching [here](features.md#caching). 65 | 66 | ## Rest Interceptors 67 | 68 | Interceptors can be added to allow custom functionality to happen before or after an api call. They run globally always on every request. The format is: 69 | 70 | ```ts 71 | // the interceptor format 72 | const interceptor = async (request, proceed) => { 73 | // do things before the request 74 | const result = await proceed(request); 75 | // do things after the request 76 | return result; 77 | }; 78 | ``` 79 | 80 | > [!WARNING] 81 | > Use Interceptors with caution. They affect every request made by the library and can introduce strange side effects that are hard to discover and debug. 82 | 83 | #### Examples 84 | 85 | ```ts 86 | import { addInterceptor, removeInterceptor } from "@qlik/api/interceptors"; 87 | 88 | // add a logging interceptor, which logs all requests, responses and errors 89 | addInterceptor(async (request, proceed) => { 90 | try { 91 | console.log("-->", request.method, request.pathTemplate, request.pathVariables, request.query, request.body); 92 | const result = await proceed(request); 93 | console.log("<--", result.data); 94 | return result; 95 | } catch (err) { 96 | console.log("<-*", err); 97 | throw err; 98 | } 99 | }); 100 | 101 | // add additional header to a request 102 | const headerInterceptor = addInterceptor(async (request, proceed) => { 103 | // make sure headers object exists 104 | (request.options = request.options || {}).headers = request.options.headers || {}; 105 | request.options.headers["x-another-header"] = "foobarvalue"; 106 | return proceed(request); 107 | }); 108 | 109 | // remove an interceptor 110 | removeInterceptor(headerInterceptor); 111 | ``` 112 | -------------------------------------------------------------------------------- /encryption.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/encryption.ts 9 | async function getEncryptionKeyproviders(options) { 10 | return invokeFetch("encryption", { 11 | method: "get", 12 | pathTemplate: "/api/v1/encryption/keyproviders", 13 | options 14 | }); 15 | } 16 | async function createEncryptionKeyprovider(body, options) { 17 | return invokeFetch("encryption", { 18 | method: "post", 19 | pathTemplate: "/api/v1/encryption/keyproviders", 20 | body, 21 | contentType: "application/json", 22 | options 23 | }); 24 | } 25 | async function listEncryptionKeyproviders(options) { 26 | return invokeFetch("encryption", { 27 | method: "get", 28 | pathTemplate: "/api/v1/encryption/keyproviders/actions/list", 29 | options 30 | }); 31 | } 32 | async function resetEncryptionKeyproviders(options) { 33 | return invokeFetch("encryption", { 34 | method: "post", 35 | pathTemplate: "/api/v1/encryption/keyproviders/actions/reset-to-default-provider", 36 | options 37 | }); 38 | } 39 | async function getEncryptionKeyprovidersMigrationDetails(options) { 40 | return invokeFetch("encryption", { 41 | method: "get", 42 | pathTemplate: "/api/v1/encryption/keyproviders/migration/actions/details", 43 | options 44 | }); 45 | } 46 | async function deleteEncryptionKeyprovider(arnFingerPrint, options) { 47 | return invokeFetch("encryption", { 48 | method: "delete", 49 | pathTemplate: "/api/v1/encryption/keyproviders/{arnFingerPrint}", 50 | pathVariables: { arnFingerPrint }, 51 | options 52 | }); 53 | } 54 | async function getEncryptionKeyprovider(arnFingerPrint, options) { 55 | return invokeFetch("encryption", { 56 | method: "get", 57 | pathTemplate: "/api/v1/encryption/keyproviders/{arnFingerPrint}", 58 | pathVariables: { arnFingerPrint }, 59 | options 60 | }); 61 | } 62 | async function patchEncryptionKeyprovider(arnFingerPrint, body, options) { 63 | return invokeFetch("encryption", { 64 | method: "patch", 65 | pathTemplate: "/api/v1/encryption/keyproviders/{arnFingerPrint}", 66 | pathVariables: { arnFingerPrint }, 67 | body, 68 | contentType: "application/json", 69 | options 70 | }); 71 | } 72 | async function migrateEncryptionKeyprovider(arnFingerPrint, options) { 73 | return invokeFetch("encryption", { 74 | method: "post", 75 | pathTemplate: "/api/v1/encryption/keyproviders/{arnFingerPrint}/actions/migrate", 76 | pathVariables: { arnFingerPrint }, 77 | options 78 | }); 79 | } 80 | async function testEncryptionKeyprovider(arnFingerPrint, options) { 81 | return invokeFetch("encryption", { 82 | method: "post", 83 | pathTemplate: "/api/v1/encryption/keyproviders/{arnFingerPrint}/actions/test", 84 | pathVariables: { arnFingerPrint }, 85 | options 86 | }); 87 | } 88 | function clearCache() { 89 | return clearApiCache("encryption"); 90 | } 91 | var encryptionExport = { 92 | getEncryptionKeyproviders, 93 | createEncryptionKeyprovider, 94 | listEncryptionKeyproviders, 95 | resetEncryptionKeyproviders, 96 | getEncryptionKeyprovidersMigrationDetails, 97 | deleteEncryptionKeyprovider, 98 | getEncryptionKeyprovider, 99 | patchEncryptionKeyprovider, 100 | migrateEncryptionKeyprovider, 101 | testEncryptionKeyprovider, 102 | clearCache 103 | }; 104 | var encryption_default = encryptionExport; 105 | export { 106 | clearCache, 107 | createEncryptionKeyprovider, 108 | encryption_default as default, 109 | deleteEncryptionKeyprovider, 110 | getEncryptionKeyprovider, 111 | getEncryptionKeyproviders, 112 | getEncryptionKeyprovidersMigrationDetails, 113 | listEncryptionKeyproviders, 114 | migrateEncryptionKeyprovider, 115 | patchEncryptionKeyprovider, 116 | resetEncryptionKeyproviders, 117 | testEncryptionKeyprovider 118 | }; 119 | -------------------------------------------------------------------------------- /extensions.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/extensions.ts 9 | async function getExtensions(options) { 10 | return invokeFetch("extensions", { 11 | method: "get", 12 | pathTemplate: "/api/v1/extensions", 13 | options 14 | }); 15 | } 16 | async function uploadExtension(body, options) { 17 | return invokeFetch("extensions", { 18 | method: "post", 19 | pathTemplate: "/api/v1/extensions", 20 | body, 21 | contentType: "multipart/form-data", 22 | options 23 | }); 24 | } 25 | async function deleteExtension(id, options) { 26 | return invokeFetch("extensions", { 27 | method: "delete", 28 | pathTemplate: "/api/v1/extensions/{id}", 29 | pathVariables: { id }, 30 | options 31 | }); 32 | } 33 | async function getExtension(id, options) { 34 | return invokeFetch("extensions", { 35 | method: "get", 36 | pathTemplate: "/api/v1/extensions/{id}", 37 | pathVariables: { id }, 38 | options 39 | }); 40 | } 41 | async function patchExtension(id, body, options) { 42 | return invokeFetch("extensions", { 43 | method: "patch", 44 | pathTemplate: "/api/v1/extensions/{id}", 45 | pathVariables: { id }, 46 | body, 47 | contentType: "multipart/form-data", 48 | options 49 | }); 50 | } 51 | async function downloadExtension(id, options) { 52 | return invokeFetch("extensions", { 53 | method: "get", 54 | pathTemplate: "/api/v1/extensions/{id}/file", 55 | pathVariables: { id }, 56 | options 57 | }); 58 | } 59 | async function downloadFileFromExtension(id, filepath, options) { 60 | return invokeFetch("extensions", { 61 | method: "get", 62 | pathTemplate: "/api/v1/extensions/{id}/file/{filepath}", 63 | pathVariables: { id, filepath }, 64 | options 65 | }); 66 | } 67 | function clearCache() { 68 | return clearApiCache("extensions"); 69 | } 70 | var extensionsExport = { 71 | getExtensions, 72 | uploadExtension, 73 | deleteExtension, 74 | getExtension, 75 | patchExtension, 76 | downloadExtension, 77 | downloadFileFromExtension, 78 | clearCache 79 | }; 80 | var extensions_default = extensionsExport; 81 | export { 82 | clearCache, 83 | extensions_default as default, 84 | deleteExtension, 85 | downloadExtension, 86 | downloadFileFromExtension, 87 | getExtension, 88 | getExtensions, 89 | patchExtension, 90 | uploadExtension 91 | }; 92 | -------------------------------------------------------------------------------- /groups.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/groups.ts 9 | async function getGroups(query, options) { 10 | return invokeFetch("groups", { 11 | method: "get", 12 | pathTemplate: "/api/v1/groups", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createGroup(body, options) { 18 | return invokeFetch("groups", { 19 | method: "post", 20 | pathTemplate: "/api/v1/groups", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function filterGroups(query, body, options) { 27 | return invokeFetch("groups", { 28 | method: "post", 29 | pathTemplate: "/api/v1/groups/actions/filter", 30 | query, 31 | body, 32 | contentType: "application/json", 33 | options 34 | }); 35 | } 36 | async function getGroupsSettings(options) { 37 | return invokeFetch("groups", { 38 | method: "get", 39 | pathTemplate: "/api/v1/groups/settings", 40 | options 41 | }); 42 | } 43 | async function patchGroupsSettings(body, options) { 44 | return invokeFetch("groups", { 45 | method: "patch", 46 | pathTemplate: "/api/v1/groups/settings", 47 | body, 48 | contentType: "application/json", 49 | options 50 | }); 51 | } 52 | async function deleteGroup(groupId, options) { 53 | return invokeFetch("groups", { 54 | method: "delete", 55 | pathTemplate: "/api/v1/groups/{groupId}", 56 | pathVariables: { groupId }, 57 | options 58 | }); 59 | } 60 | async function getGroup(groupId, options) { 61 | return invokeFetch("groups", { 62 | method: "get", 63 | pathTemplate: "/api/v1/groups/{groupId}", 64 | pathVariables: { groupId }, 65 | options 66 | }); 67 | } 68 | async function patchGroup(groupId, body, options) { 69 | return invokeFetch("groups", { 70 | method: "patch", 71 | pathTemplate: "/api/v1/groups/{groupId}", 72 | pathVariables: { groupId }, 73 | body, 74 | contentType: "application/json", 75 | options 76 | }); 77 | } 78 | function clearCache() { 79 | return clearApiCache("groups"); 80 | } 81 | var groupsExport = { 82 | getGroups, 83 | createGroup, 84 | filterGroups, 85 | getGroupsSettings, 86 | patchGroupsSettings, 87 | deleteGroup, 88 | getGroup, 89 | patchGroup, 90 | clearCache 91 | }; 92 | var groups_default = groupsExport; 93 | export { 94 | clearCache, 95 | createGroup, 96 | groups_default as default, 97 | deleteGroup, 98 | filterGroups, 99 | getGroup, 100 | getGroups, 101 | getGroupsSettings, 102 | patchGroup, 103 | patchGroupsSettings 104 | }; 105 | -------------------------------------------------------------------------------- /identity-providers.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/identity-providers.ts 9 | async function getIdps(query, options) { 10 | return invokeFetch("identity-providers", { 11 | method: "get", 12 | pathTemplate: "/api/v1/identity-providers", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createIdp(body, options) { 18 | return invokeFetch("identity-providers", { 19 | method: "post", 20 | pathTemplate: "/api/v1/identity-providers", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function getIdpWellKnownMetaData(options) { 27 | return invokeFetch("identity-providers", { 28 | method: "get", 29 | pathTemplate: "/api/v1/identity-providers/.well-known/metadata.json", 30 | options 31 | }); 32 | } 33 | async function getMyIdpMeta(options) { 34 | return invokeFetch("identity-providers", { 35 | method: "get", 36 | pathTemplate: "/api/v1/identity-providers/me/meta", 37 | options 38 | }); 39 | } 40 | async function getIdpStatuses(options) { 41 | return invokeFetch("identity-providers", { 42 | method: "get", 43 | pathTemplate: "/api/v1/identity-providers/status", 44 | options 45 | }); 46 | } 47 | async function deleteIdp(id, options) { 48 | return invokeFetch("identity-providers", { 49 | method: "delete", 50 | pathTemplate: "/api/v1/identity-providers/{id}", 51 | pathVariables: { id }, 52 | options 53 | }); 54 | } 55 | async function getIdp(id, options) { 56 | return invokeFetch("identity-providers", { 57 | method: "get", 58 | pathTemplate: "/api/v1/identity-providers/{id}", 59 | pathVariables: { id }, 60 | options 61 | }); 62 | } 63 | async function patchIdp(id, body, options) { 64 | return invokeFetch("identity-providers", { 65 | method: "patch", 66 | pathTemplate: "/api/v1/identity-providers/{id}", 67 | pathVariables: { id }, 68 | body, 69 | contentType: "application/json", 70 | options 71 | }); 72 | } 73 | function clearCache() { 74 | return clearApiCache("identity-providers"); 75 | } 76 | var identityProvidersExport = { 77 | getIdps, 78 | createIdp, 79 | getIdpWellKnownMetaData, 80 | getMyIdpMeta, 81 | getIdpStatuses, 82 | deleteIdp, 83 | getIdp, 84 | patchIdp, 85 | clearCache 86 | }; 87 | var identity_providers_default = identityProvidersExport; 88 | export { 89 | clearCache, 90 | createIdp, 91 | identity_providers_default as default, 92 | deleteIdp, 93 | getIdp, 94 | getIdpStatuses, 95 | getIdpWellKnownMetaData, 96 | getIdps, 97 | getMyIdpMeta, 98 | patchIdp 99 | }; 100 | -------------------------------------------------------------------------------- /interceptors.d.ts: -------------------------------------------------------------------------------- 1 | import { I as InvokeFetchResponse, a as InvokeFetchProperties } from './invoke-fetch-types-BYCD4pc9.js'; 2 | import './auth-types-Cj5bM3Yk.js'; 3 | 4 | /** 5 | * This module provides a way to intercept requests and responses in the qmfe-api. 6 | * It allows you to modify the request before it is sent and the response before it is returned. 7 | * This is useful for adding headers, modifying the request body, or handling errors. 8 | * @module interceptors 9 | */ 10 | 11 | /** 12 | * The RestInterceptor type is a function that can be used to intercept requests and responses 13 | */ 14 | type RestInterceptor = (request: InvokeFetchProperties, proceed: (props: InvokeFetchProperties) => Promise, id?: string) => Promise; 15 | declare function createInterceptors(): InterceptorsAPI; 16 | declare function addDefaultInterceptors(): void; 17 | /** 18 | * Adds an interceptor to the global interceptor stack 19 | * Returns the newly added interceptor 20 | * @param interceptor the interceptor to add 21 | * @returns the newly added interceptor 22 | */ 23 | declare function addInterceptor(interceptor: RestInterceptor): RestInterceptor; 24 | /** 25 | * Removes an interceptor from the global interceptor stack 26 | * @param interceptor the interceptor remove 27 | */ 28 | declare function removeInterceptor(interceptor: RestInterceptor): RestInterceptor | null; 29 | /** 30 | * Gets all registered interceptors 31 | */ 32 | declare function getInterceptors(): RestInterceptor[]; 33 | interface InterceptorsAPI { 34 | /** 35 | * Adds an interceptor to the global interceptor stack 36 | * Returns the newly added interceptor 37 | * @param interceptor the interceptor to add 38 | * @returns the newly added interceptor 39 | */ 40 | addInterceptor: typeof addInterceptor; 41 | /** 42 | * Removes an interceptor from the global interceptor stack 43 | * @param interceptor the interceptor remove 44 | */ 45 | removeInterceptor: typeof removeInterceptor; 46 | /** 47 | * Gets all registered interceptors 48 | */ 49 | getInterceptors: typeof getInterceptors; 50 | } 51 | /** 52 | * The interceptors API 53 | */ 54 | declare const interceptors: InterceptorsAPI & { 55 | createInterceptors: typeof createInterceptors; 56 | }; 57 | 58 | export { type InterceptorsAPI, type RestInterceptor, addDefaultInterceptors, addInterceptor, createInterceptors, interceptors as default, getInterceptors, removeInterceptor }; 59 | -------------------------------------------------------------------------------- /interceptors.js: -------------------------------------------------------------------------------- 1 | import { 2 | addDefaultInterceptors, 3 | addInterceptor, 4 | createInterceptors, 5 | getInterceptors, 6 | interceptors_default, 7 | removeInterceptor 8 | } from "./chunks/ZCTVPXGO.js"; 9 | import "./chunks/7MMXU6EL.js"; 10 | export { 11 | addDefaultInterceptors, 12 | addInterceptor, 13 | createInterceptors, 14 | interceptors_default as default, 15 | getInterceptors, 16 | removeInterceptor 17 | }; 18 | -------------------------------------------------------------------------------- /invoke-fetch-types-BYCD4pc9.d.ts: -------------------------------------------------------------------------------- 1 | import { H as HostConfig } from './auth-types-Cj5bM3Yk.js'; 2 | 3 | /** The typical base return type of a fetch call */ 4 | type InvokeFetchResponse = { 5 | status: number; 6 | headers: Headers; 7 | data: unknown; 8 | prev?: () => Promise; 9 | next?: () => Promise; 10 | }; 11 | /** Additional options for an api call done with invoke-fetch */ 12 | type ApiCallOptions = { 13 | /** Additional headers to pass on to the request. */ 14 | headers?: Record; 15 | /** if set to true the call will not use a cached result */ 16 | noCache?: boolean; 17 | /** 18 | * Only used cached results whose age in milliseconds are less than that or equal to `maxCacheAge`. 19 | */ 20 | maxCacheAge?: number | undefined; 21 | /** 22 | * Only results cached on or after the `ifCachedSince` timestamp are used. 23 | */ 24 | useCacheIfAfter?: Date; 25 | /** 26 | * Specify the host configif the api call is a cross-domain request. Typically used in embedding and mashups 27 | */ 28 | hostConfig?: HostConfig; 29 | /** 30 | * Set the amount of time to wait for a response. 31 | * If the timeout is exceeded the request is aborted. 32 | * If both timeoutMs and signal is present, timeoutMs will have no effect, as 33 | * there is already an abort-signal specified. 34 | */ 35 | timeoutMs?: number; 36 | /** 37 | * An abort-signal lets you abort an ongoing fetch request. The abort-signal is created 38 | * by taking the .signal property of an AbortController. 39 | */ 40 | signal?: AbortSignal; 41 | /** 42 | * Ensure that the request is kept alive even if the page that initiated it is unloaded 43 | * before the request is completed. 44 | */ 45 | keepalive?: boolean; 46 | /** 47 | * Options for progress-reporting. Specify any combination of the callbacks `onUpload` 48 | * and `onDownload`. Progress will be reported continuously. 49 | */ 50 | progress?: ProgressOptions; 51 | }; 52 | type InvokeFetchProperties = { 53 | /** http method */ 54 | method: string; 55 | /** data passed to api call */ 56 | body?: unknown; 57 | /** additional api call options */ 58 | options?: ApiCallOptions; 59 | /** override default RequestInit options */ 60 | requestInitOverrides?: RequestInit; 61 | /** path to api endpoint, can be in a template format e.g. /api/v1/space/{spaceId} */ 62 | pathTemplate: string; 63 | /** path variables to be used in the path template */ 64 | pathVariables?: Record; 65 | /** additional query to url */ 66 | query?: Record; 67 | /** specify what content-type to send, if omitted "application/json" is assumed */ 68 | contentType?: string; 69 | /** override the default user-agent with this value. This will also override any browser's UA. */ 70 | userAgent?: string; 71 | }; 72 | type DownloadableBlob = Blob & { 73 | /** download the blob in a using the specified filename */ 74 | download: (filename: string) => Promise; 75 | }; 76 | /** The callback options for reporting progress. */ 77 | type ProgressOptions = { 78 | /** upload callback, called repeatedly when upload-progress is available */ 79 | onUpload?: (event: PartialProgressEvent) => void; 80 | /** download callback, called repeatedly when upload-progress is available */ 81 | onDownload?: (event: PartialProgressEvent) => void; 82 | }; 83 | /** Represents the current upload or download progress a API-call. 84 | * 85 | * It contains the number of loaded bytes and, if computable, the total payload size. 86 | * If the total size cannot be determined, `total` will be undefined. 87 | * 88 | * 89 | * See MDN: {@link https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent} 90 | */ 91 | type PartialProgressEvent = { 92 | /** Number of bytes currently loaded. */ 93 | loaded: ProgressEvent["loaded"]; 94 | /** The total size of the payload, if computable. */ 95 | total?: ProgressEvent["total"]; 96 | }; 97 | 98 | export type { ApiCallOptions as A, DownloadableBlob as D, InvokeFetchResponse as I, InvokeFetchProperties as a }; 99 | -------------------------------------------------------------------------------- /items.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/items.ts 9 | async function getItems(query, options) { 10 | return invokeFetch("items", { 11 | method: "get", 12 | pathTemplate: "/api/v1/items", 13 | query, 14 | options 15 | }); 16 | } 17 | async function getItemsSettings(options) { 18 | return invokeFetch("items", { 19 | method: "get", 20 | pathTemplate: "/api/v1/items/settings", 21 | options 22 | }); 23 | } 24 | async function patchItemsSettings(body, options) { 25 | return invokeFetch("items", { 26 | method: "patch", 27 | pathTemplate: "/api/v1/items/settings", 28 | body, 29 | contentType: "application/json", 30 | options 31 | }); 32 | } 33 | async function deleteItem(itemId, options) { 34 | return invokeFetch("items", { 35 | method: "delete", 36 | pathTemplate: "/api/v1/items/{itemId}", 37 | pathVariables: { itemId }, 38 | options 39 | }); 40 | } 41 | async function getItem(itemId, options) { 42 | return invokeFetch("items", { 43 | method: "get", 44 | pathTemplate: "/api/v1/items/{itemId}", 45 | pathVariables: { itemId }, 46 | options 47 | }); 48 | } 49 | async function updateItem(itemId, body, options) { 50 | return invokeFetch("items", { 51 | method: "put", 52 | pathTemplate: "/api/v1/items/{itemId}", 53 | pathVariables: { itemId }, 54 | body, 55 | contentType: "application/json", 56 | options 57 | }); 58 | } 59 | async function getItemCollections(itemId, query, options) { 60 | return invokeFetch("items", { 61 | method: "get", 62 | pathTemplate: "/api/v1/items/{itemId}/collections", 63 | pathVariables: { itemId }, 64 | query, 65 | options 66 | }); 67 | } 68 | async function getPublishedItems(itemId, query, options) { 69 | return invokeFetch("items", { 70 | method: "get", 71 | pathTemplate: "/api/v1/items/{itemId}/publisheditems", 72 | pathVariables: { itemId }, 73 | query, 74 | options 75 | }); 76 | } 77 | function clearCache() { 78 | return clearApiCache("items"); 79 | } 80 | var itemsExport = { 81 | getItems, 82 | getItemsSettings, 83 | patchItemsSettings, 84 | deleteItem, 85 | getItem, 86 | updateItem, 87 | getItemCollections, 88 | getPublishedItems, 89 | clearCache 90 | }; 91 | var items_default = itemsExport; 92 | export { 93 | clearCache, 94 | items_default as default, 95 | deleteItem, 96 | getItem, 97 | getItemCollections, 98 | getItems, 99 | getItemsSettings, 100 | getPublishedItems, 101 | patchItemsSettings, 102 | updateItem 103 | }; 104 | -------------------------------------------------------------------------------- /licenses.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/licenses.ts 9 | async function getLicenseAssignments(query, options) { 10 | return invokeFetch("licenses", { 11 | method: "get", 12 | pathTemplate: "/api/v1/licenses/assignments", 13 | query, 14 | options 15 | }); 16 | } 17 | async function addLicenseAssignments(body, options) { 18 | return invokeFetch("licenses", { 19 | method: "post", 20 | pathTemplate: "/api/v1/licenses/assignments/actions/add", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function deleteLicenseAssignments(body, options) { 27 | return invokeFetch("licenses", { 28 | method: "post", 29 | pathTemplate: "/api/v1/licenses/assignments/actions/delete", 30 | body, 31 | contentType: "application/json", 32 | options 33 | }); 34 | } 35 | async function updateLicenseAssignments(body, options) { 36 | return invokeFetch("licenses", { 37 | method: "post", 38 | pathTemplate: "/api/v1/licenses/assignments/actions/update", 39 | body, 40 | contentType: "application/json", 41 | options 42 | }); 43 | } 44 | async function getLicenseConsumption(query, options) { 45 | return invokeFetch("licenses", { 46 | method: "get", 47 | pathTemplate: "/api/v1/licenses/consumption", 48 | query, 49 | options 50 | }); 51 | } 52 | async function getLicenseOverview(options) { 53 | return invokeFetch("licenses", { 54 | method: "get", 55 | pathTemplate: "/api/v1/licenses/overview", 56 | options 57 | }); 58 | } 59 | async function getLicenseSettings(options) { 60 | return invokeFetch("licenses", { 61 | method: "get", 62 | pathTemplate: "/api/v1/licenses/settings", 63 | options 64 | }); 65 | } 66 | async function updateLicenseSettings(body, options) { 67 | return invokeFetch("licenses", { 68 | method: "put", 69 | pathTemplate: "/api/v1/licenses/settings", 70 | body, 71 | contentType: "application/json", 72 | options 73 | }); 74 | } 75 | async function getLicenseStatus(options) { 76 | return invokeFetch("licenses", { 77 | method: "get", 78 | pathTemplate: "/api/v1/licenses/status", 79 | options 80 | }); 81 | } 82 | function clearCache() { 83 | return clearApiCache("licenses"); 84 | } 85 | var licensesExport = { 86 | getLicenseAssignments, 87 | addLicenseAssignments, 88 | deleteLicenseAssignments, 89 | updateLicenseAssignments, 90 | getLicenseConsumption, 91 | getLicenseOverview, 92 | getLicenseSettings, 93 | updateLicenseSettings, 94 | getLicenseStatus, 95 | clearCache 96 | }; 97 | var licenses_default = licensesExport; 98 | export { 99 | addLicenseAssignments, 100 | clearCache, 101 | licenses_default as default, 102 | deleteLicenseAssignments, 103 | getLicenseAssignments, 104 | getLicenseConsumption, 105 | getLicenseOverview, 106 | getLicenseSettings, 107 | getLicenseStatus, 108 | updateLicenseAssignments, 109 | updateLicenseSettings 110 | }; 111 | -------------------------------------------------------------------------------- /lineage-graphs.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/lineage-graphs.ts 9 | async function expandLineageGraphImpact(id, query, options) { 10 | return invokeFetch("lineage-graphs", { 11 | method: "get", 12 | pathTemplate: "/api/v1/lineage-graphs/impact/{id}/actions/expand", 13 | pathVariables: { id }, 14 | query, 15 | options 16 | }); 17 | } 18 | async function searchLineageGraphImpact(id, query, options) { 19 | return invokeFetch("lineage-graphs", { 20 | method: "get", 21 | pathTemplate: "/api/v1/lineage-graphs/impact/{id}/actions/search", 22 | pathVariables: { id }, 23 | query, 24 | options 25 | }); 26 | } 27 | async function getLineageGraphImpactOverview(id, query, options) { 28 | return invokeFetch("lineage-graphs", { 29 | method: "get", 30 | pathTemplate: "/api/v1/lineage-graphs/impact/{id}/overview", 31 | pathVariables: { id }, 32 | query, 33 | options 34 | }); 35 | } 36 | async function getLineageGraphImpactSource(id, options) { 37 | return invokeFetch("lineage-graphs", { 38 | method: "get", 39 | pathTemplate: "/api/v1/lineage-graphs/impact/{id}/source", 40 | pathVariables: { id }, 41 | options 42 | }); 43 | } 44 | async function getLineageGraphNode(id, query, options) { 45 | return invokeFetch("lineage-graphs", { 46 | method: "get", 47 | pathTemplate: "/api/v1/lineage-graphs/nodes/{id}", 48 | pathVariables: { id }, 49 | query, 50 | options 51 | }); 52 | } 53 | async function expandLineageGraphNode(id, query, options) { 54 | return invokeFetch("lineage-graphs", { 55 | method: "get", 56 | pathTemplate: "/api/v1/lineage-graphs/nodes/{id}/actions/expand", 57 | pathVariables: { id }, 58 | query, 59 | options 60 | }); 61 | } 62 | async function searchLineageGraphNode(id, query, options) { 63 | return invokeFetch("lineage-graphs", { 64 | method: "get", 65 | pathTemplate: "/api/v1/lineage-graphs/nodes/{id}/actions/search", 66 | pathVariables: { id }, 67 | query, 68 | options 69 | }); 70 | } 71 | async function createLineageGraphNodeOverview(id, query, body, options) { 72 | return invokeFetch("lineage-graphs", { 73 | method: "post", 74 | pathTemplate: "/api/v1/lineage-graphs/nodes/{id}/overview", 75 | pathVariables: { id }, 76 | query, 77 | body, 78 | contentType: "application/json", 79 | options 80 | }); 81 | } 82 | function clearCache() { 83 | return clearApiCache("lineage-graphs"); 84 | } 85 | var lineageGraphsExport = { 86 | expandLineageGraphImpact, 87 | searchLineageGraphImpact, 88 | getLineageGraphImpactOverview, 89 | getLineageGraphImpactSource, 90 | getLineageGraphNode, 91 | expandLineageGraphNode, 92 | searchLineageGraphNode, 93 | createLineageGraphNodeOverview, 94 | clearCache 95 | }; 96 | var lineage_graphs_default = lineageGraphsExport; 97 | export { 98 | clearCache, 99 | createLineageGraphNodeOverview, 100 | lineage_graphs_default as default, 101 | expandLineageGraphImpact, 102 | expandLineageGraphNode, 103 | getLineageGraphImpactOverview, 104 | getLineageGraphImpactSource, 105 | getLineageGraphNode, 106 | searchLineageGraphImpact, 107 | searchLineageGraphNode 108 | }; 109 | -------------------------------------------------------------------------------- /notes.d.ts: -------------------------------------------------------------------------------- 1 | import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js'; 2 | import './auth-types-Cj5bM3Yk.js'; 3 | 4 | /** 5 | * The possible states for the status of notes configuration GET or POST operation 6 | */ 7 | type ConfigReasonCode = "deployment" | "toggle" | "license"; 8 | type Error = { 9 | /** Error code specific to notes broker service. */ 10 | readonly code?: string; 11 | /** Error cause. */ 12 | readonly detail?: string; 13 | /** Error title. */ 14 | readonly title?: string; 15 | }; 16 | /** 17 | * @example 18 | * { 19 | * errors: [ 20 | * { 21 | * code: "HTTP-123", 22 | * title: "short error message" 23 | * } 24 | * ], 25 | * traceId: "7326ce0d-1946-41d0-b890-609865cc42ea" 26 | * } 27 | */ 28 | type Errors = { 29 | errors?: Error[]; 30 | /** An optional traceId */ 31 | traceId?: string; 32 | }; 33 | type NoteSettingsPutPayload = { 34 | /** pass 'true' to enable the note toggle for the tenant, 'false' to disable the toggle (other values are ignore). */ 35 | toggledOn?: boolean; 36 | }; 37 | type NoteSettingsPutResponse = { 38 | /** 'true' if the note feature is enabled for this tenant and user otherwise 'false'. */ 39 | toggleOn?: boolean; 40 | }; 41 | type NotesUserSettings = { 42 | /** 'true' if the note feature is enabled for this tenant and user otherwise 'false'. */ 43 | available: boolean; 44 | /** The timestamp for the last time this users notes settings were fetched from downstream services. */ 45 | lastFetch?: string; 46 | /** The possible states for the status of notes configuration GET or POST operation */ 47 | reason?: ConfigReasonCode; 48 | }; 49 | /** 50 | * Get the enablement status of the notes feature set for this tenant and user. 51 | * 52 | * @throws GetNotesSettingsHttpError 53 | */ 54 | declare function getNotesSettings(options?: ApiCallOptions): Promise; 55 | type GetNotesSettingsHttpResponse = { 56 | data: NotesUserSettings; 57 | headers: Headers; 58 | status: 200; 59 | }; 60 | type GetNotesSettingsHttpError = { 61 | data: Errors; 62 | headers: Headers; 63 | status: number; 64 | }; 65 | /** 66 | * update the settings 67 | * 68 | * @param body an object with the body content 69 | * @throws SetNotesSettingsHttpError 70 | */ 71 | declare function setNotesSettings(body: NoteSettingsPutPayload, options?: ApiCallOptions): Promise; 72 | type SetNotesSettingsHttpResponse = { 73 | data: NoteSettingsPutResponse; 74 | headers: Headers; 75 | status: 200; 76 | }; 77 | type SetNotesSettingsHttpError = { 78 | data: Errors; 79 | headers: Headers; 80 | status: number; 81 | }; 82 | /** 83 | * Clears the cache for notes api requests. 84 | */ 85 | declare function clearCache(): void; 86 | interface NotesAPI { 87 | /** 88 | * Get the enablement status of the notes feature set for this tenant and user. 89 | * 90 | * @throws GetNotesSettingsHttpError 91 | */ 92 | getNotesSettings: typeof getNotesSettings; 93 | /** 94 | * update the settings 95 | * 96 | * @param body an object with the body content 97 | * @throws SetNotesSettingsHttpError 98 | */ 99 | setNotesSettings: typeof setNotesSettings; 100 | /** 101 | * Clears the cache for notes api requests. 102 | */ 103 | clearCache: typeof clearCache; 104 | } 105 | /** 106 | * Functions for the notes api 107 | */ 108 | declare const notesExport: NotesAPI; 109 | 110 | export { type ConfigReasonCode, type Error, type Errors, type GetNotesSettingsHttpError, type GetNotesSettingsHttpResponse, type NoteSettingsPutPayload, type NoteSettingsPutResponse, type NotesAPI, type NotesUserSettings, type SetNotesSettingsHttpError, type SetNotesSettingsHttpResponse, clearCache, notesExport as default, getNotesSettings, setNotesSettings }; 111 | -------------------------------------------------------------------------------- /notes.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/notes.ts 9 | async function getNotesSettings(options) { 10 | return invokeFetch("notes", { 11 | method: "get", 12 | pathTemplate: "/api/v1/notes/settings", 13 | options 14 | }); 15 | } 16 | async function setNotesSettings(body, options) { 17 | return invokeFetch("notes", { 18 | method: "put", 19 | pathTemplate: "/api/v1/notes/settings", 20 | body, 21 | contentType: "application/json", 22 | options 23 | }); 24 | } 25 | function clearCache() { 26 | return clearApiCache("notes"); 27 | } 28 | var notesExport = { getNotesSettings, setNotesSettings, clearCache }; 29 | var notes_default = notesExport; 30 | export { 31 | clearCache, 32 | notes_default as default, 33 | getNotesSettings, 34 | setNotesSettings 35 | }; 36 | -------------------------------------------------------------------------------- /notifications.d.ts: -------------------------------------------------------------------------------- 1 | import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js'; 2 | import './auth-types-Cj5bM3Yk.js'; 3 | 4 | /** 5 | * An error object. 6 | */ 7 | type Error = { 8 | /** The error code. */ 9 | code: string; 10 | /** A human-readable explanation specific to this occurrence of the problem. */ 11 | detail?: string; 12 | /** Summary of the problem. */ 13 | title: string; 14 | }; 15 | /** 16 | * Notification result item 17 | */ 18 | type NotificationItem = { 19 | /** Indicates if the notification can be managed in the hub. If true, the object will also contain 'subscriptionInfo' object and a 'presentationInfo' object with a non-empty scopes array. */ 20 | isManageableInHub?: boolean; 21 | /** Indicates if the notification can be subscribed to by users. If true, the object will also contain 'subscriptionInfo' object */ 22 | isSubscribable: boolean; 23 | /** Notification name pattern that will trigger this notification e.g resource.action */ 24 | notificationNamePattern: string; 25 | /** Object containing information pertaining to the presentaion of a notification in the UI */ 26 | presentationInfo?: { 27 | /** Localized, human-readable string representing the name of the notification suitable to use in a UI */ 28 | friendlyName?: string; 29 | /** Friendly name to be displayed for each scope. */ 30 | scopeFriendlyNames?: Record; 31 | /** Information about the scopes to which this notification applies. Helps determine the placement of the notification in the UI */ 32 | scopes?: string[]; 33 | }; 34 | /** Object indicating what properties to use to subscribe to this notification via the 'Subscriptions' service. For info about its properties, refer to the Subscription sevice's API doc. */ 35 | subscriptionInfo?: { 36 | action: string; 37 | resourceId?: string; 38 | resourceSubType?: string; 39 | resourceType: string; 40 | target?: string; 41 | }; 42 | /** Type of Transport e.g. Email, Notification, Slack message etc... */ 43 | transports: string[]; 44 | }; 45 | /** 46 | * Object containing array representing list of supported notifications 47 | */ 48 | type NotificationsObject = { 49 | /** list of notifications */ 50 | notifications: NotificationItem[]; 51 | }; 52 | /** 53 | * List all supported notifications 54 | * 55 | * @param query an object with query parameters 56 | * @throws GetNotificationsHttpError 57 | */ 58 | declare function getNotifications(query: { 59 | /** If present, idenfies the language of the returned 'friendlyName' property. */ 60 | locale?: string; 61 | /** If present, represents the 'manageableInHub' value to filter by. */ 62 | manageableInHub?: true | false; 63 | /** If present, represents the 'subscribable' value to filter by. */ 64 | subscribable?: true | false; 65 | }, options?: ApiCallOptions): Promise; 66 | type GetNotificationsHttpResponse = { 67 | data: NotificationsObject; 68 | headers: Headers; 69 | status: 200; 70 | }; 71 | type GetNotificationsHttpError = { 72 | data: Error; 73 | headers: Headers; 74 | status: number; 75 | }; 76 | /** 77 | * Clears the cache for notifications api requests. 78 | */ 79 | declare function clearCache(): void; 80 | interface NotificationsAPI { 81 | /** 82 | * List all supported notifications 83 | * 84 | * @param query an object with query parameters 85 | * @throws GetNotificationsHttpError 86 | */ 87 | getNotifications: typeof getNotifications; 88 | /** 89 | * Clears the cache for notifications api requests. 90 | */ 91 | clearCache: typeof clearCache; 92 | } 93 | /** 94 | * Functions for the notifications api 95 | */ 96 | declare const notificationsExport: NotificationsAPI; 97 | 98 | export { type Error, type GetNotificationsHttpError, type GetNotificationsHttpResponse, type NotificationItem, type NotificationsAPI, type NotificationsObject, clearCache, notificationsExport as default, getNotifications }; 99 | -------------------------------------------------------------------------------- /notifications.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/notifications.ts 9 | async function getNotifications(query, options) { 10 | return invokeFetch("notifications", { 11 | method: "get", 12 | pathTemplate: "/api/v1/notifications", 13 | query, 14 | options 15 | }); 16 | } 17 | function clearCache() { 18 | return clearApiCache("notifications"); 19 | } 20 | var notificationsExport = { getNotifications, clearCache }; 21 | var notifications_default = notificationsExport; 22 | export { 23 | clearCache, 24 | notifications_default as default, 25 | getNotifications 26 | }; 27 | -------------------------------------------------------------------------------- /oauth-clients.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/oauth-clients.ts 9 | async function getOAuthClients(query, options) { 10 | return invokeFetch("oauth-clients", { 11 | method: "get", 12 | pathTemplate: "/api/v1/oauth-clients", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createOAuthClient(body, options) { 18 | return invokeFetch("oauth-clients", { 19 | method: "post", 20 | pathTemplate: "/api/v1/oauth-clients", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function deleteOAuthClient(id, options) { 27 | return invokeFetch("oauth-clients", { 28 | method: "delete", 29 | pathTemplate: "/api/v1/oauth-clients/{id}", 30 | pathVariables: { id }, 31 | options 32 | }); 33 | } 34 | async function getOAuthClient(id, options) { 35 | return invokeFetch("oauth-clients", { 36 | method: "get", 37 | pathTemplate: "/api/v1/oauth-clients/{id}", 38 | pathVariables: { id }, 39 | options 40 | }); 41 | } 42 | async function patchOAuthClient(id, body, options) { 43 | return invokeFetch("oauth-clients", { 44 | method: "patch", 45 | pathTemplate: "/api/v1/oauth-clients/{id}", 46 | pathVariables: { id }, 47 | body, 48 | contentType: "application/json", 49 | options 50 | }); 51 | } 52 | async function publishOAuthClient(id, options) { 53 | return invokeFetch("oauth-clients", { 54 | method: "post", 55 | pathTemplate: "/api/v1/oauth-clients/{id}/actions/publish", 56 | pathVariables: { id }, 57 | options 58 | }); 59 | } 60 | async function createOAuthClientSecret(id, options) { 61 | return invokeFetch("oauth-clients", { 62 | method: "post", 63 | pathTemplate: "/api/v1/oauth-clients/{id}/client-secrets", 64 | pathVariables: { id }, 65 | options 66 | }); 67 | } 68 | async function deleteOAuthClientSecret(id, hint, options) { 69 | return invokeFetch("oauth-clients", { 70 | method: "delete", 71 | pathTemplate: "/api/v1/oauth-clients/{id}/client-secrets/{hint}", 72 | pathVariables: { id, hint }, 73 | options 74 | }); 75 | } 76 | async function deleteOAuthClientConnectionConfig(id, options) { 77 | return invokeFetch("oauth-clients", { 78 | method: "delete", 79 | pathTemplate: "/api/v1/oauth-clients/{id}/connection-configs/me", 80 | pathVariables: { id }, 81 | options 82 | }); 83 | } 84 | async function getOAuthClientConnectionConfig(id, options) { 85 | return invokeFetch("oauth-clients", { 86 | method: "get", 87 | pathTemplate: "/api/v1/oauth-clients/{id}/connection-configs/me", 88 | pathVariables: { id }, 89 | options 90 | }); 91 | } 92 | async function patchOAuthClientConnectionConfig(id, body, options) { 93 | return invokeFetch("oauth-clients", { 94 | method: "patch", 95 | pathTemplate: "/api/v1/oauth-clients/{id}/connection-configs/me", 96 | pathVariables: { id }, 97 | body, 98 | contentType: "application/json", 99 | options 100 | }); 101 | } 102 | function clearCache() { 103 | return clearApiCache("oauth-clients"); 104 | } 105 | var oauthClientsExport = { 106 | getOAuthClients, 107 | createOAuthClient, 108 | deleteOAuthClient, 109 | getOAuthClient, 110 | patchOAuthClient, 111 | publishOAuthClient, 112 | createOAuthClientSecret, 113 | deleteOAuthClientSecret, 114 | deleteOAuthClientConnectionConfig, 115 | getOAuthClientConnectionConfig, 116 | patchOAuthClientConnectionConfig, 117 | clearCache 118 | }; 119 | var oauth_clients_default = oauthClientsExport; 120 | export { 121 | clearCache, 122 | createOAuthClient, 123 | createOAuthClientSecret, 124 | oauth_clients_default as default, 125 | deleteOAuthClient, 126 | deleteOAuthClientConnectionConfig, 127 | deleteOAuthClientSecret, 128 | getOAuthClient, 129 | getOAuthClientConnectionConfig, 130 | getOAuthClients, 131 | patchOAuthClient, 132 | patchOAuthClientConnectionConfig, 133 | publishOAuthClient 134 | }; 135 | -------------------------------------------------------------------------------- /oauth-tokens.d.ts: -------------------------------------------------------------------------------- 1 | import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js'; 2 | import './auth-types-Cj5bM3Yk.js'; 3 | 4 | /** 5 | * An error object. 6 | */ 7 | type Error = { 8 | /** The error code. */ 9 | code: string; 10 | /** The detailed error message. */ 11 | detail?: string; 12 | /** Non-standard information about the error. */ 13 | meta?: unknown; 14 | /** The http status code. */ 15 | status?: string; 16 | /** The error title. */ 17 | title: string; 18 | }; 19 | /** 20 | * A representation of the errors encountered from the HTTP request. 21 | */ 22 | type Errors = { 23 | /** List of errors and their properties. */ 24 | errors?: Error[]; 25 | }; 26 | type Link = { 27 | /** The URL for the link. */ 28 | href: string; 29 | }; 30 | type OauthToken = { 31 | /** The description of the token. */ 32 | description?: string; 33 | /** The type of the user device the authorization token is generated for (Tablet, Phone etc.). */ 34 | deviceType?: string; 35 | /** The token ID. */ 36 | id: string; 37 | /** The last time the token was used. */ 38 | lastUsed?: string; 39 | /** The ID of the owning tenant. */ 40 | tenantId: string; 41 | /** The ID of the owning user. */ 42 | userId: string; 43 | }; 44 | type OauthTokenPage = { 45 | data: OauthToken[]; 46 | links: { 47 | next?: Link; 48 | prev?: Link; 49 | self: Link; 50 | }; 51 | }; 52 | /** 53 | * Retrieve list of OAuth tokens that the user has access to. Users assigned with a `TenantAdmin` role can list OAuth tokens generated for all users in the tenant. 54 | * 55 | * @param query an object with query parameters 56 | * @throws GetOauthTokensHttpError 57 | */ 58 | declare function getOauthTokens(query: { 59 | /** The maximum number of tokens to return. */ 60 | limit?: number; 61 | /** The target page. */ 62 | page?: string; 63 | /** The field to sort by. */ 64 | sort?: "userId"; 65 | /** The ID of the user to limit results to. */ 66 | userId?: string; 67 | }, options?: ApiCallOptions): Promise; 68 | type GetOauthTokensHttpResponse = { 69 | data: OauthTokenPage; 70 | headers: Headers; 71 | status: 200; 72 | prev?: (options?: ApiCallOptions) => Promise; 73 | next?: (options?: ApiCallOptions) => Promise; 74 | }; 75 | type GetOauthTokensHttpError = { 76 | data: Errors; 77 | headers: Headers; 78 | status: 400 | 401; 79 | }; 80 | /** 81 | * Revokes a specific OAuth token by ID. Requesting user must have `TenantAdmin` role assigned to delete tokens owned by other users. 82 | * 83 | * @param tokenId The ID of the token to revoke. 84 | * @throws DeleteOauthTokenHttpError 85 | */ 86 | declare function deleteOauthToken(tokenId: string, options?: ApiCallOptions): Promise; 87 | type DeleteOauthTokenHttpResponse = { 88 | data: void; 89 | headers: Headers; 90 | status: 204; 91 | }; 92 | type DeleteOauthTokenHttpError = { 93 | data: Errors; 94 | headers: Headers; 95 | status: number; 96 | }; 97 | /** 98 | * Clears the cache for oauth-tokens api requests. 99 | */ 100 | declare function clearCache(): void; 101 | interface OauthTokensAPI { 102 | /** 103 | * Retrieve list of OAuth tokens that the user has access to. Users assigned with a `TenantAdmin` role can list OAuth tokens generated for all users in the tenant. 104 | * 105 | * @param query an object with query parameters 106 | * @throws GetOauthTokensHttpError 107 | */ 108 | getOauthTokens: typeof getOauthTokens; 109 | /** 110 | * Revokes a specific OAuth token by ID. Requesting user must have `TenantAdmin` role assigned to delete tokens owned by other users. 111 | * 112 | * @param tokenId The ID of the token to revoke. 113 | * @throws DeleteOauthTokenHttpError 114 | */ 115 | deleteOauthToken: typeof deleteOauthToken; 116 | /** 117 | * Clears the cache for oauth-tokens api requests. 118 | */ 119 | clearCache: typeof clearCache; 120 | } 121 | /** 122 | * Functions for the oauth-tokens api 123 | */ 124 | declare const oauthTokensExport: OauthTokensAPI; 125 | 126 | export { type DeleteOauthTokenHttpError, type DeleteOauthTokenHttpResponse, type Error, type Errors, type GetOauthTokensHttpError, type GetOauthTokensHttpResponse, type Link, type OauthToken, type OauthTokenPage, type OauthTokensAPI, clearCache, oauthTokensExport as default, deleteOauthToken, getOauthTokens }; 127 | -------------------------------------------------------------------------------- /oauth-tokens.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/oauth-tokens.ts 9 | async function getOauthTokens(query, options) { 10 | return invokeFetch("oauth-tokens", { 11 | method: "get", 12 | pathTemplate: "/api/v1/oauth-tokens", 13 | query, 14 | options 15 | }); 16 | } 17 | async function deleteOauthToken(tokenId, options) { 18 | return invokeFetch("oauth-tokens", { 19 | method: "delete", 20 | pathTemplate: "/api/v1/oauth-tokens/{tokenId}", 21 | pathVariables: { tokenId }, 22 | options 23 | }); 24 | } 25 | function clearCache() { 26 | return clearApiCache("oauth-tokens"); 27 | } 28 | var oauthTokensExport = { getOauthTokens, deleteOauthToken, clearCache }; 29 | var oauth_tokens_default = oauthTokensExport; 30 | export { 31 | clearCache, 32 | oauth_tokens_default as default, 33 | deleteOauthToken, 34 | getOauthTokens 35 | }; 36 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@qlik/api", 3 | "description": "Exposes functions for interacting with Qlik apis", 4 | "repository": { 5 | "type": "git", 6 | "url": "git+https://github.com/qlik-oss/qlik-api-ts.git" 7 | }, 8 | "license": "ISC", 9 | "type": "module", 10 | "browser": { 11 | "fs": false 12 | }, 13 | "dependencies": { 14 | "enigma.js": "^2.14.0", 15 | "extend": "3.0.2", 16 | "lodash": "^4.17.21", 17 | "nanoid": "^5.1.5", 18 | "ws": "^8.18.2" 19 | }, 20 | "packageManager": "pnpm@10.12.1", 21 | "engines": { 22 | "node": ">=20" 23 | }, 24 | "exports": { 25 | ".": "./index.js", 26 | "./api-keys": "./api-keys.js", 27 | "./apps": "./apps.js", 28 | "./assistants": "./assistants.js", 29 | "./audits": "./audits.js", 30 | "./automation-connections": "./automation-connections.js", 31 | "./automations": "./automations.js", 32 | "./automl-deployments": "./automl-deployments.js", 33 | "./automl-predictions": "./automl-predictions.js", 34 | "./brands": "./brands.js", 35 | "./collections": "./collections.js", 36 | "./conditions": "./conditions.js", 37 | "./consumption": "./consumption.js", 38 | "./csp-origins": "./csp-origins.js", 39 | "./csrf-token": "./csrf-token.js", 40 | "./data-alerts": "./data-alerts.js", 41 | "./data-assets": "./data-assets.js", 42 | "./data-connections": "./data-connections.js", 43 | "./data-credentials": "./data-credentials.js", 44 | "./data-files": "./data-files.js", 45 | "./data-qualities": "./data-qualities.js", 46 | "./data-sets": "./data-sets.js", 47 | "./data-sources": "./data-sources.js", 48 | "./data-stores": "./data-stores.js", 49 | "./dcaas": "./dcaas.js", 50 | "./di-projects": "./di-projects.js", 51 | "./direct-access-agents": "./direct-access-agents.js", 52 | "./encryption": "./encryption.js", 53 | "./extensions": "./extensions.js", 54 | "./glossaries": "./glossaries.js", 55 | "./groups": "./groups.js", 56 | "./identity-providers": "./identity-providers.js", 57 | "./items": "./items.js", 58 | "./knowledgebases": "./knowledgebases.js", 59 | "./licenses": "./licenses.js", 60 | "./lineage-graphs": "./lineage-graphs.js", 61 | "./ml": "./ml.js", 62 | "./notes": "./notes.js", 63 | "./notifications": "./notifications.js", 64 | "./oauth-clients": "./oauth-clients.js", 65 | "./oauth-tokens": "./oauth-tokens.js", 66 | "./questions": "./questions.js", 67 | "./quotas": "./quotas.js", 68 | "./reload-tasks": "./reload-tasks.js", 69 | "./reloads": "./reloads.js", 70 | "./report-templates": "./report-templates.js", 71 | "./reports": "./reports.js", 72 | "./roles": "./roles.js", 73 | "./sharing-tasks": "./sharing-tasks.js", 74 | "./spaces": "./spaces.js", 75 | "./tasks": "./tasks.js", 76 | "./temp-contents": "./temp-contents.js", 77 | "./tenants": "./tenants.js", 78 | "./themes": "./themes.js", 79 | "./transports": "./transports.js", 80 | "./ui-config": "./ui-config.js", 81 | "./users": "./users.js", 82 | "./web-integrations": "./web-integrations.js", 83 | "./web-notifications": "./web-notifications.js", 84 | "./webhooks": "./webhooks.js", 85 | "./auth": "./auth.js", 86 | "./interceptors": "./interceptors.js", 87 | "./qix": "./qix.js" 88 | } 89 | } -------------------------------------------------------------------------------- /qix.js: -------------------------------------------------------------------------------- 1 | import { 2 | openAppSession, 3 | qix_default, 4 | withHostConfig 5 | } from "./chunks/33GQY7N7.js"; 6 | import "./chunks/GPRUNZV4.js"; 7 | export { 8 | qix_default as default, 9 | openAppSession, 10 | withHostConfig 11 | }; 12 | -------------------------------------------------------------------------------- /questions.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/questions.ts 9 | async function askQuestions(body, options) { 10 | return invokeFetch("questions", { 11 | method: "post", 12 | pathTemplate: "/api/v1/questions/actions/ask", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function filterQuestions(query, body, options) { 19 | return invokeFetch("questions", { 20 | method: "post", 21 | pathTemplate: "/api/v1/questions/actions/filter", 22 | query, 23 | body, 24 | contentType: "application/json", 25 | options 26 | }); 27 | } 28 | function clearCache() { 29 | return clearApiCache("questions"); 30 | } 31 | var questionsExport = { askQuestions, filterQuestions, clearCache }; 32 | var questions_default = questionsExport; 33 | export { 34 | askQuestions, 35 | clearCache, 36 | questions_default as default, 37 | filterQuestions 38 | }; 39 | -------------------------------------------------------------------------------- /quotas.d.ts: -------------------------------------------------------------------------------- 1 | import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js'; 2 | import './auth-types-Cj5bM3Yk.js'; 3 | 4 | /** 5 | * A specific error. 6 | */ 7 | type Error = { 8 | /** The error code. */ 9 | code: string; 10 | /** Summary of the problem. */ 11 | title: string; 12 | }; 13 | type ErrorResponse = { 14 | errors?: Error[]; 15 | }; 16 | type GetQuotaByIdResult = { 17 | /** Quota item. */ 18 | data: Quota[]; 19 | }; 20 | type GetQuotasResult = { 21 | /** Array of quota items. */ 22 | data: Quota[]; 23 | }; 24 | type Quota = { 25 | /** The attributes of the quota. */ 26 | attributes: { 27 | /** The quota limit. If there is no quota limit, -1 is returned. */ 28 | quota: number; 29 | /** The unit of the quota limit. For memory quotas, the unit is always "bytes". For other discrete units, the item counted is used as unit, for example "spaces". */ 30 | unit: string; 31 | /** The current quota usage, if applicable. This attribute is only present if it is requested using the reportUsage query parameter. */ 32 | usage?: number; 33 | /** The warning thresholds at which "close to quota" warnings can be issued when exceeded. If omitted, no warning threshold shall be used. Currently, the array will contain only one threshold value. In the future, this may be extended. The threshold is a number between 0 and 1, relating to the quota limit. For example, a value of 0.9 means that a warning should be issued when exceeding 90% of the quota limit. */ 34 | warningThresholds?: number[]; 35 | }; 36 | /** The unique identifier of the quota item. For example, "app_mem_size", "app_upload_disk_size", or "shared_spaces". */ 37 | id: string; 38 | /** The resource type of the quota item. Always equal to "quotas". */ 39 | type: string; 40 | }; 41 | /** 42 | * Returns all quota items for the tenant (provided in JWT). 43 | * 44 | * @param query an object with query parameters 45 | * @throws GetQuotasHttpError 46 | */ 47 | declare function getQuotas(query: { 48 | /** The Boolean flag indicating whether quota usage shall be part of the response. The default value is false (only limits returned). */ 49 | reportUsage?: boolean; 50 | }, options?: ApiCallOptions): Promise; 51 | type GetQuotasHttpResponse = { 52 | data: GetQuotasResult; 53 | headers: Headers; 54 | status: 200; 55 | }; 56 | type GetQuotasHttpError = { 57 | data: ErrorResponse; 58 | headers: Headers; 59 | status: 401 | 500; 60 | }; 61 | /** 62 | * Returns a specific quota item for the tenant (provided in JWT). 63 | * 64 | * @param id The unique identifier of the quota item. For example, "app_mem_size", "app_upload_disk_size", or "shared_spaces". 65 | * @param query an object with query parameters 66 | * @throws GetQuotaHttpError 67 | */ 68 | declare function getQuota(id: string, query: { 69 | /** The Boolean flag indicating whether quota usage shall be part of the response. The default value is false (usage not included). */ 70 | reportUsage?: boolean; 71 | }, options?: ApiCallOptions): Promise; 72 | type GetQuotaHttpResponse = { 73 | data: GetQuotaByIdResult; 74 | headers: Headers; 75 | status: 200; 76 | }; 77 | type GetQuotaHttpError = { 78 | data: ErrorResponse; 79 | headers: Headers; 80 | status: 401 | 404 | 500; 81 | }; 82 | /** 83 | * Clears the cache for quotas api requests. 84 | */ 85 | declare function clearCache(): void; 86 | interface QuotasAPI { 87 | /** 88 | * Returns all quota items for the tenant (provided in JWT). 89 | * 90 | * @param query an object with query parameters 91 | * @throws GetQuotasHttpError 92 | */ 93 | getQuotas: typeof getQuotas; 94 | /** 95 | * Returns a specific quota item for the tenant (provided in JWT). 96 | * 97 | * @param id The unique identifier of the quota item. For example, "app_mem_size", "app_upload_disk_size", or "shared_spaces". 98 | * @param query an object with query parameters 99 | * @throws GetQuotaHttpError 100 | */ 101 | getQuota: typeof getQuota; 102 | /** 103 | * Clears the cache for quotas api requests. 104 | */ 105 | clearCache: typeof clearCache; 106 | } 107 | /** 108 | * Functions for the quotas api 109 | */ 110 | declare const quotasExport: QuotasAPI; 111 | 112 | export { type Error, type ErrorResponse, type GetQuotaByIdResult, type GetQuotaHttpError, type GetQuotaHttpResponse, type GetQuotasHttpError, type GetQuotasHttpResponse, type GetQuotasResult, type Quota, type QuotasAPI, clearCache, quotasExport as default, getQuota, getQuotas }; 113 | -------------------------------------------------------------------------------- /quotas.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/quotas.ts 9 | async function getQuotas(query, options) { 10 | return invokeFetch("quotas", { 11 | method: "get", 12 | pathTemplate: "/api/v1/quotas", 13 | query, 14 | options 15 | }); 16 | } 17 | async function getQuota(id, query, options) { 18 | return invokeFetch("quotas", { 19 | method: "get", 20 | pathTemplate: "/api/v1/quotas/{id}", 21 | pathVariables: { id }, 22 | query, 23 | options 24 | }); 25 | } 26 | function clearCache() { 27 | return clearApiCache("quotas"); 28 | } 29 | var quotasExport = { getQuotas, getQuota, clearCache }; 30 | var quotas_default = quotasExport; 31 | export { 32 | clearCache, 33 | quotas_default as default, 34 | getQuota, 35 | getQuotas 36 | }; 37 | -------------------------------------------------------------------------------- /reload-tasks.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/reload-tasks.ts 9 | async function getReloadTasks(query, options) { 10 | return invokeFetch("reload-tasks", { 11 | method: "get", 12 | pathTemplate: "/api/v1/reload-tasks", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createReloadTask(body, options) { 18 | return invokeFetch("reload-tasks", { 19 | method: "post", 20 | pathTemplate: "/api/v1/reload-tasks", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function deleteReloadTask(taskId, options) { 27 | return invokeFetch("reload-tasks", { 28 | method: "delete", 29 | pathTemplate: "/api/v1/reload-tasks/{taskId}", 30 | pathVariables: { taskId }, 31 | options 32 | }); 33 | } 34 | async function getReloadTask(taskId, options) { 35 | return invokeFetch("reload-tasks", { 36 | method: "get", 37 | pathTemplate: "/api/v1/reload-tasks/{taskId}", 38 | pathVariables: { taskId }, 39 | options 40 | }); 41 | } 42 | async function updateReloadTask(taskId, body, options) { 43 | return invokeFetch("reload-tasks", { 44 | method: "put", 45 | pathTemplate: "/api/v1/reload-tasks/{taskId}", 46 | pathVariables: { taskId }, 47 | body, 48 | contentType: "application/json", 49 | options 50 | }); 51 | } 52 | function clearCache() { 53 | return clearApiCache("reload-tasks"); 54 | } 55 | var reloadTasksExport = { 56 | getReloadTasks, 57 | createReloadTask, 58 | deleteReloadTask, 59 | getReloadTask, 60 | updateReloadTask, 61 | clearCache 62 | }; 63 | var reload_tasks_default = reloadTasksExport; 64 | export { 65 | clearCache, 66 | createReloadTask, 67 | reload_tasks_default as default, 68 | deleteReloadTask, 69 | getReloadTask, 70 | getReloadTasks, 71 | updateReloadTask 72 | }; 73 | -------------------------------------------------------------------------------- /reloads.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/reloads.ts 9 | async function getReloads(query, options) { 10 | return invokeFetch("reloads", { 11 | method: "get", 12 | pathTemplate: "/api/v1/reloads", 13 | query, 14 | options 15 | }); 16 | } 17 | async function queueReload(body, options) { 18 | return invokeFetch("reloads", { 19 | method: "post", 20 | pathTemplate: "/api/v1/reloads", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function getReload(reloadId, options) { 27 | return invokeFetch("reloads", { 28 | method: "get", 29 | pathTemplate: "/api/v1/reloads/{reloadId}", 30 | pathVariables: { reloadId }, 31 | options 32 | }); 33 | } 34 | async function cancelReload(reloadId, options) { 35 | return invokeFetch("reloads", { 36 | method: "post", 37 | pathTemplate: "/api/v1/reloads/{reloadId}/actions/cancel", 38 | pathVariables: { reloadId }, 39 | options 40 | }); 41 | } 42 | function clearCache() { 43 | return clearApiCache("reloads"); 44 | } 45 | var reloadsExport = { getReloads, queueReload, getReload, cancelReload, clearCache }; 46 | var reloads_default = reloadsExport; 47 | export { 48 | cancelReload, 49 | clearCache, 50 | reloads_default as default, 51 | getReload, 52 | getReloads, 53 | queueReload 54 | }; 55 | -------------------------------------------------------------------------------- /report-templates.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/report-templates.ts 9 | async function getReportTemplates(query, options) { 10 | return invokeFetch("report-templates", { 11 | method: "get", 12 | pathTemplate: "/api/v1/report-templates", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createReportTemplate(body, options) { 18 | return invokeFetch("report-templates", { 19 | method: "post", 20 | pathTemplate: "/api/v1/report-templates", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function deleteReportTemplate(id, options) { 27 | return invokeFetch("report-templates", { 28 | method: "delete", 29 | pathTemplate: "/api/v1/report-templates/{id}", 30 | pathVariables: { id }, 31 | options 32 | }); 33 | } 34 | async function getReportTemplate(id, options) { 35 | return invokeFetch("report-templates", { 36 | method: "get", 37 | pathTemplate: "/api/v1/report-templates/{id}", 38 | pathVariables: { id }, 39 | options 40 | }); 41 | } 42 | async function patchReportTemplate(id, body, options) { 43 | return invokeFetch("report-templates", { 44 | method: "patch", 45 | pathTemplate: "/api/v1/report-templates/{id}", 46 | pathVariables: { id }, 47 | body, 48 | contentType: "application/json", 49 | options 50 | }); 51 | } 52 | async function updateReportTemplate(id, body, options) { 53 | return invokeFetch("report-templates", { 54 | method: "put", 55 | pathTemplate: "/api/v1/report-templates/{id}", 56 | pathVariables: { id }, 57 | body, 58 | contentType: "application/json", 59 | options 60 | }); 61 | } 62 | async function downloadReportTemplate(id, options) { 63 | return invokeFetch("report-templates", { 64 | method: "post", 65 | pathTemplate: "/api/v1/report-templates/{id}/actions/download", 66 | pathVariables: { id }, 67 | options 68 | }); 69 | } 70 | function clearCache() { 71 | return clearApiCache("report-templates"); 72 | } 73 | var reportTemplatesExport = { 74 | getReportTemplates, 75 | createReportTemplate, 76 | deleteReportTemplate, 77 | getReportTemplate, 78 | patchReportTemplate, 79 | updateReportTemplate, 80 | downloadReportTemplate, 81 | clearCache 82 | }; 83 | var report_templates_default = reportTemplatesExport; 84 | export { 85 | clearCache, 86 | createReportTemplate, 87 | report_templates_default as default, 88 | deleteReportTemplate, 89 | downloadReportTemplate, 90 | getReportTemplate, 91 | getReportTemplates, 92 | patchReportTemplate, 93 | updateReportTemplate 94 | }; 95 | -------------------------------------------------------------------------------- /reports.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/reports.ts 9 | async function createReport(body, options) { 10 | return invokeFetch("reports", { 11 | method: "post", 12 | pathTemplate: "/api/v1/reports", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function getReportStatus(id, options) { 19 | return invokeFetch("reports", { 20 | method: "get", 21 | pathTemplate: "/api/v1/reports/{id}/status", 22 | pathVariables: { id }, 23 | options 24 | }); 25 | } 26 | function clearCache() { 27 | return clearApiCache("reports"); 28 | } 29 | var reportsExport = { createReport, getReportStatus, clearCache }; 30 | var reports_default = reportsExport; 31 | export { 32 | clearCache, 33 | createReport, 34 | reports_default as default, 35 | getReportStatus 36 | }; 37 | -------------------------------------------------------------------------------- /roles.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/roles.ts 9 | async function getRoles(query, options) { 10 | return invokeFetch("roles", { 11 | method: "get", 12 | pathTemplate: "/api/v1/roles", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createRole(body, options) { 18 | return invokeFetch("roles", { 19 | method: "post", 20 | pathTemplate: "/api/v1/roles", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function deleteRole(id, options) { 27 | return invokeFetch("roles", { 28 | method: "delete", 29 | pathTemplate: "/api/v1/roles/{id}", 30 | pathVariables: { id }, 31 | options 32 | }); 33 | } 34 | async function getRole(id, options) { 35 | return invokeFetch("roles", { 36 | method: "get", 37 | pathTemplate: "/api/v1/roles/{id}", 38 | pathVariables: { id }, 39 | options 40 | }); 41 | } 42 | async function patchRole(id, body, options) { 43 | return invokeFetch("roles", { 44 | method: "patch", 45 | pathTemplate: "/api/v1/roles/{id}", 46 | pathVariables: { id }, 47 | body, 48 | contentType: "application/json", 49 | options 50 | }); 51 | } 52 | function clearCache() { 53 | return clearApiCache("roles"); 54 | } 55 | var rolesExport = { getRoles, createRole, deleteRole, getRole, patchRole, clearCache }; 56 | var roles_default = rolesExport; 57 | export { 58 | clearCache, 59 | createRole, 60 | roles_default as default, 61 | deleteRole, 62 | getRole, 63 | getRoles, 64 | patchRole 65 | }; 66 | -------------------------------------------------------------------------------- /sharing-tasks.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/sharing-tasks.ts 9 | async function getSharingTasks(query, options) { 10 | return invokeFetch("sharing-tasks", { 11 | method: "get", 12 | pathTemplate: "/api/v1/sharing-tasks", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createSharingTask(body, options) { 18 | return invokeFetch("sharing-tasks", { 19 | method: "post", 20 | pathTemplate: "/api/v1/sharing-tasks", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function executeSharingTasks(body, options) { 27 | return invokeFetch("sharing-tasks", { 28 | method: "post", 29 | pathTemplate: "/api/v1/sharing-tasks/actions/execute", 30 | body, 31 | contentType: "application/json", 32 | options 33 | }); 34 | } 35 | async function getSharingTasksSettings(options) { 36 | return invokeFetch("sharing-tasks", { 37 | method: "get", 38 | pathTemplate: "/api/v1/sharing-tasks/settings", 39 | options 40 | }); 41 | } 42 | async function updateSharingTasksSettings(body, options) { 43 | return invokeFetch("sharing-tasks", { 44 | method: "patch", 45 | pathTemplate: "/api/v1/sharing-tasks/settings", 46 | body, 47 | contentType: "application/json", 48 | options 49 | }); 50 | } 51 | async function configureSharingTasksSettings(body, options) { 52 | return invokeFetch("sharing-tasks", { 53 | method: "put", 54 | pathTemplate: "/api/v1/sharing-tasks/settings", 55 | body, 56 | contentType: "application/json", 57 | options 58 | }); 59 | } 60 | async function deleteSharingTask(taskId, options) { 61 | return invokeFetch("sharing-tasks", { 62 | method: "delete", 63 | pathTemplate: "/api/v1/sharing-tasks/{taskId}", 64 | pathVariables: { taskId }, 65 | options 66 | }); 67 | } 68 | async function getSharingTask(taskId, query, options) { 69 | return invokeFetch("sharing-tasks", { 70 | method: "get", 71 | pathTemplate: "/api/v1/sharing-tasks/{taskId}", 72 | pathVariables: { taskId }, 73 | query, 74 | options 75 | }); 76 | } 77 | async function patchSharingTask(taskId, body, options) { 78 | return invokeFetch("sharing-tasks", { 79 | method: "patch", 80 | pathTemplate: "/api/v1/sharing-tasks/{taskId}", 81 | pathVariables: { taskId }, 82 | body, 83 | contentType: "application/json", 84 | options 85 | }); 86 | } 87 | async function cancelSharingTask(taskId, options) { 88 | return invokeFetch("sharing-tasks", { 89 | method: "post", 90 | pathTemplate: "/api/v1/sharing-tasks/{taskId}/actions/cancel", 91 | pathVariables: { taskId }, 92 | options 93 | }); 94 | } 95 | function clearCache() { 96 | return clearApiCache("sharing-tasks"); 97 | } 98 | var sharingTasksExport = { 99 | getSharingTasks, 100 | createSharingTask, 101 | executeSharingTasks, 102 | getSharingTasksSettings, 103 | updateSharingTasksSettings, 104 | configureSharingTasksSettings, 105 | deleteSharingTask, 106 | getSharingTask, 107 | patchSharingTask, 108 | cancelSharingTask, 109 | clearCache 110 | }; 111 | var sharing_tasks_default = sharingTasksExport; 112 | export { 113 | cancelSharingTask, 114 | clearCache, 115 | configureSharingTasksSettings, 116 | createSharingTask, 117 | sharing_tasks_default as default, 118 | deleteSharingTask, 119 | executeSharingTasks, 120 | getSharingTask, 121 | getSharingTasks, 122 | getSharingTasksSettings, 123 | patchSharingTask, 124 | updateSharingTasksSettings 125 | }; 126 | -------------------------------------------------------------------------------- /tasks.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/tasks.ts 9 | async function getTasks(query, options) { 10 | return invokeFetch("tasks", { 11 | method: "get", 12 | pathTemplate: "/api/v1/tasks", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createTask(query, body, options) { 18 | return invokeFetch("tasks", { 19 | method: "post", 20 | pathTemplate: "/api/v1/tasks", 21 | query, 22 | body, 23 | contentType: "application/json", 24 | options 25 | }); 26 | } 27 | async function getTasksResourceRuns(id, query, options) { 28 | return invokeFetch("tasks", { 29 | method: "get", 30 | pathTemplate: "/api/v1/tasks/resources/{id}/runs", 31 | pathVariables: { id }, 32 | query, 33 | options 34 | }); 35 | } 36 | async function deleteTask(id, options) { 37 | return invokeFetch("tasks", { 38 | method: "delete", 39 | pathTemplate: "/api/v1/tasks/{id}", 40 | pathVariables: { id }, 41 | options 42 | }); 43 | } 44 | async function getTask(id, options) { 45 | return invokeFetch("tasks", { 46 | method: "get", 47 | pathTemplate: "/api/v1/tasks/{id}", 48 | pathVariables: { id }, 49 | options 50 | }); 51 | } 52 | async function updateTask(id, body, options) { 53 | return invokeFetch("tasks", { 54 | method: "put", 55 | pathTemplate: "/api/v1/tasks/{id}", 56 | pathVariables: { id }, 57 | body, 58 | contentType: "application/json", 59 | options 60 | }); 61 | } 62 | async function startTask(id, query, options) { 63 | return invokeFetch("tasks", { 64 | method: "post", 65 | pathTemplate: "/api/v1/tasks/{id}/actions/start", 66 | pathVariables: { id }, 67 | query, 68 | options 69 | }); 70 | } 71 | async function getTaskRuns(id, query, options) { 72 | return invokeFetch("tasks", { 73 | method: "get", 74 | pathTemplate: "/api/v1/tasks/{id}/runs", 75 | pathVariables: { id }, 76 | query, 77 | options 78 | }); 79 | } 80 | async function getLastTaskRun(id, options) { 81 | return invokeFetch("tasks", { 82 | method: "get", 83 | pathTemplate: "/api/v1/tasks/{id}/runs/last", 84 | pathVariables: { id }, 85 | options 86 | }); 87 | } 88 | async function getTaskRunLog(id, runId, options) { 89 | return invokeFetch("tasks", { 90 | method: "get", 91 | pathTemplate: "/api/v1/tasks/{id}/runs/{runId}/log", 92 | pathVariables: { id, runId }, 93 | options 94 | }); 95 | } 96 | function clearCache() { 97 | return clearApiCache("tasks"); 98 | } 99 | var tasksExport = { 100 | getTasks, 101 | createTask, 102 | getTasksResourceRuns, 103 | deleteTask, 104 | getTask, 105 | updateTask, 106 | startTask, 107 | getTaskRuns, 108 | getLastTaskRun, 109 | getTaskRunLog, 110 | clearCache 111 | }; 112 | var tasks_default = tasksExport; 113 | export { 114 | clearCache, 115 | createTask, 116 | tasks_default as default, 117 | deleteTask, 118 | getLastTaskRun, 119 | getTask, 120 | getTaskRunLog, 121 | getTaskRuns, 122 | getTasks, 123 | getTasksResourceRuns, 124 | startTask, 125 | updateTask 126 | }; 127 | -------------------------------------------------------------------------------- /temp-contents.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/temp-contents.ts 9 | async function uploadTempFile(query, body, options) { 10 | return invokeFetch("temp-contents", { 11 | method: "post", 12 | pathTemplate: "/api/v1/temp-contents", 13 | query, 14 | body, 15 | contentType: "application/octet-stream", 16 | options 17 | }); 18 | } 19 | async function downloadTempFile(id, query, options) { 20 | return invokeFetch("temp-contents", { 21 | method: "get", 22 | pathTemplate: "/api/v1/temp-contents/{id}", 23 | pathVariables: { id }, 24 | query, 25 | options 26 | }); 27 | } 28 | async function getTempFileDetails(id, options) { 29 | return invokeFetch("temp-contents", { 30 | method: "get", 31 | pathTemplate: "/api/v1/temp-contents/{id}/details", 32 | pathVariables: { id }, 33 | options 34 | }); 35 | } 36 | function clearCache() { 37 | return clearApiCache("temp-contents"); 38 | } 39 | var tempContentsExport = { uploadTempFile, downloadTempFile, getTempFileDetails, clearCache }; 40 | var temp_contents_default = tempContentsExport; 41 | export { 42 | clearCache, 43 | temp_contents_default as default, 44 | downloadTempFile, 45 | getTempFileDetails, 46 | uploadTempFile 47 | }; 48 | -------------------------------------------------------------------------------- /tenants.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/tenants.ts 9 | async function createTenant(body, options) { 10 | return invokeFetch("tenants", { 11 | method: "post", 12 | pathTemplate: "/api/v1/tenants", 13 | body, 14 | contentType: "application/json", 15 | options 16 | }); 17 | } 18 | async function getMyTenant(options) { 19 | return invokeFetch("tenants", { 20 | method: "get", 21 | pathTemplate: "/api/v1/tenants/me", 22 | options 23 | }); 24 | } 25 | async function getTenant(tenantId, options) { 26 | return invokeFetch("tenants", { 27 | method: "get", 28 | pathTemplate: "/api/v1/tenants/{tenantId}", 29 | pathVariables: { tenantId }, 30 | options 31 | }); 32 | } 33 | async function patchTenant(tenantId, body, options) { 34 | return invokeFetch("tenants", { 35 | method: "patch", 36 | pathTemplate: "/api/v1/tenants/{tenantId}", 37 | pathVariables: { tenantId }, 38 | body, 39 | contentType: "application/json", 40 | options 41 | }); 42 | } 43 | async function deactivateTenant(tenantId, body, options) { 44 | return invokeFetch("tenants", { 45 | method: "post", 46 | pathTemplate: "/api/v1/tenants/{tenantId}/actions/deactivate", 47 | pathVariables: { tenantId }, 48 | body, 49 | contentType: "application/json", 50 | options 51 | }); 52 | } 53 | async function reactivateTenant(tenantId, body, options) { 54 | return invokeFetch("tenants", { 55 | method: "post", 56 | pathTemplate: "/api/v1/tenants/{tenantId}/actions/reactivate", 57 | pathVariables: { tenantId }, 58 | body, 59 | contentType: "application/json", 60 | options 61 | }); 62 | } 63 | function clearCache() { 64 | return clearApiCache("tenants"); 65 | } 66 | var tenantsExport = { 67 | createTenant, 68 | getMyTenant, 69 | getTenant, 70 | patchTenant, 71 | deactivateTenant, 72 | reactivateTenant, 73 | clearCache 74 | }; 75 | var tenants_default = tenantsExport; 76 | export { 77 | clearCache, 78 | createTenant, 79 | deactivateTenant, 80 | tenants_default as default, 81 | getMyTenant, 82 | getTenant, 83 | patchTenant, 84 | reactivateTenant 85 | }; 86 | -------------------------------------------------------------------------------- /themes.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/themes.ts 9 | async function getThemes(options) { 10 | return invokeFetch("themes", { 11 | method: "get", 12 | pathTemplate: "/api/v1/themes", 13 | options 14 | }); 15 | } 16 | async function uploadTheme(body, options) { 17 | return invokeFetch("themes", { 18 | method: "post", 19 | pathTemplate: "/api/v1/themes", 20 | body, 21 | contentType: "multipart/form-data", 22 | options 23 | }); 24 | } 25 | async function deleteTheme(id, options) { 26 | return invokeFetch("themes", { 27 | method: "delete", 28 | pathTemplate: "/api/v1/themes/{id}", 29 | pathVariables: { id }, 30 | options 31 | }); 32 | } 33 | async function getTheme(id, options) { 34 | return invokeFetch("themes", { 35 | method: "get", 36 | pathTemplate: "/api/v1/themes/{id}", 37 | pathVariables: { id }, 38 | options 39 | }); 40 | } 41 | async function patchTheme(id, body, options) { 42 | return invokeFetch("themes", { 43 | method: "patch", 44 | pathTemplate: "/api/v1/themes/{id}", 45 | pathVariables: { id }, 46 | body, 47 | contentType: "multipart/form-data", 48 | options 49 | }); 50 | } 51 | async function downloadTheme(id, options) { 52 | return invokeFetch("themes", { 53 | method: "get", 54 | pathTemplate: "/api/v1/themes/{id}/file", 55 | pathVariables: { id }, 56 | options 57 | }); 58 | } 59 | async function downloadFileFromTheme(id, filepath, options) { 60 | return invokeFetch("themes", { 61 | method: "get", 62 | pathTemplate: "/api/v1/themes/{id}/file/{filepath}", 63 | pathVariables: { id, filepath }, 64 | options 65 | }); 66 | } 67 | function clearCache() { 68 | return clearApiCache("themes"); 69 | } 70 | var themesExport = { 71 | getThemes, 72 | uploadTheme, 73 | deleteTheme, 74 | getTheme, 75 | patchTheme, 76 | downloadTheme, 77 | downloadFileFromTheme, 78 | clearCache 79 | }; 80 | var themes_default = themesExport; 81 | export { 82 | clearCache, 83 | themes_default as default, 84 | deleteTheme, 85 | downloadFileFromTheme, 86 | downloadTheme, 87 | getTheme, 88 | getThemes, 89 | patchTheme, 90 | uploadTheme 91 | }; 92 | -------------------------------------------------------------------------------- /transports.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/transports.ts 9 | async function deleteEmailConfig(options) { 10 | return invokeFetch("transports", { 11 | method: "delete", 12 | pathTemplate: "/api/v1/transports/email-config", 13 | options 14 | }); 15 | } 16 | async function getEmailConfig(options) { 17 | return invokeFetch("transports", { 18 | method: "get", 19 | pathTemplate: "/api/v1/transports/email-config", 20 | options 21 | }); 22 | } 23 | async function patchEmailConfig(body, options) { 24 | return invokeFetch("transports", { 25 | method: "patch", 26 | pathTemplate: "/api/v1/transports/email-config", 27 | body, 28 | contentType: "application/json", 29 | options 30 | }); 31 | } 32 | async function sendTestEmail(body, options) { 33 | return invokeFetch("transports", { 34 | method: "post", 35 | pathTemplate: "/api/v1/transports/email-config/actions/send-test-email", 36 | body, 37 | contentType: "application/json", 38 | options 39 | }); 40 | } 41 | async function validateEmailConfig(options) { 42 | return invokeFetch("transports", { 43 | method: "post", 44 | pathTemplate: "/api/v1/transports/email-config/actions/validate", 45 | options 46 | }); 47 | } 48 | async function verifyEmailConfigConnection(options) { 49 | return invokeFetch("transports", { 50 | method: "post", 51 | pathTemplate: "/api/v1/transports/email-config/actions/verify-connection", 52 | options 53 | }); 54 | } 55 | function clearCache() { 56 | return clearApiCache("transports"); 57 | } 58 | var transportsExport = { 59 | deleteEmailConfig, 60 | getEmailConfig, 61 | patchEmailConfig, 62 | sendTestEmail, 63 | validateEmailConfig, 64 | verifyEmailConfigConnection, 65 | clearCache 66 | }; 67 | var transports_default = transportsExport; 68 | export { 69 | clearCache, 70 | transports_default as default, 71 | deleteEmailConfig, 72 | getEmailConfig, 73 | patchEmailConfig, 74 | sendTestEmail, 75 | validateEmailConfig, 76 | verifyEmailConfigConnection 77 | }; 78 | -------------------------------------------------------------------------------- /ui-config.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/ui-config.ts 9 | async function getUiConfigPinnedLinks(options) { 10 | return invokeFetch("ui-config", { 11 | method: "get", 12 | pathTemplate: "/api/v1/ui-config/pinned-links", 13 | options 14 | }); 15 | } 16 | async function createUiConfigPinnedLink(body, options) { 17 | return invokeFetch("ui-config", { 18 | method: "post", 19 | pathTemplate: "/api/v1/ui-config/pinned-links", 20 | body, 21 | contentType: "application/json", 22 | options 23 | }); 24 | } 25 | async function createUiConfigPinnedLinks(body, options) { 26 | return invokeFetch("ui-config", { 27 | method: "post", 28 | pathTemplate: "/api/v1/ui-config/pinned-links/actions/bulk-create-pinned-links", 29 | body, 30 | contentType: "application/json", 31 | options 32 | }); 33 | } 34 | async function deleteAllUiConfigPinnedLinks(options) { 35 | return invokeFetch("ui-config", { 36 | method: "post", 37 | pathTemplate: "/api/v1/ui-config/pinned-links/actions/delete-all-pinned-links", 38 | options 39 | }); 40 | } 41 | async function deleteUiConfigPinnedLink(id, options) { 42 | return invokeFetch("ui-config", { 43 | method: "delete", 44 | pathTemplate: "/api/v1/ui-config/pinned-links/{id}", 45 | pathVariables: { id }, 46 | options 47 | }); 48 | } 49 | async function getUiConfigPinnedLink(id, options) { 50 | return invokeFetch("ui-config", { 51 | method: "get", 52 | pathTemplate: "/api/v1/ui-config/pinned-links/{id}", 53 | pathVariables: { id }, 54 | options 55 | }); 56 | } 57 | async function patchUiConfigPinnedLink(id, body, options) { 58 | return invokeFetch("ui-config", { 59 | method: "patch", 60 | pathTemplate: "/api/v1/ui-config/pinned-links/{id}", 61 | pathVariables: { id }, 62 | body, 63 | contentType: "application/json", 64 | options 65 | }); 66 | } 67 | function clearCache() { 68 | return clearApiCache("ui-config"); 69 | } 70 | var uiConfigExport = { 71 | getUiConfigPinnedLinks, 72 | createUiConfigPinnedLink, 73 | createUiConfigPinnedLinks, 74 | deleteAllUiConfigPinnedLinks, 75 | deleteUiConfigPinnedLink, 76 | getUiConfigPinnedLink, 77 | patchUiConfigPinnedLink, 78 | clearCache 79 | }; 80 | var ui_config_default = uiConfigExport; 81 | export { 82 | clearCache, 83 | createUiConfigPinnedLink, 84 | createUiConfigPinnedLinks, 85 | ui_config_default as default, 86 | deleteAllUiConfigPinnedLinks, 87 | deleteUiConfigPinnedLink, 88 | getUiConfigPinnedLink, 89 | getUiConfigPinnedLinks, 90 | patchUiConfigPinnedLink 91 | }; 92 | -------------------------------------------------------------------------------- /users.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/users.ts 9 | async function getUsers(query, options) { 10 | return invokeFetch("users", { 11 | method: "get", 12 | pathTemplate: "/api/v1/users", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createUser(body, options) { 18 | return invokeFetch("users", { 19 | method: "post", 20 | pathTemplate: "/api/v1/users", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function countUsers(query, options) { 27 | return invokeFetch("users", { 28 | method: "get", 29 | pathTemplate: "/api/v1/users/actions/count", 30 | query, 31 | options 32 | }); 33 | } 34 | async function filterUsers(query, body, options) { 35 | return invokeFetch("users", { 36 | method: "post", 37 | pathTemplate: "/api/v1/users/actions/filter", 38 | query, 39 | body, 40 | contentType: "application/json", 41 | options 42 | }); 43 | } 44 | async function inviteUsers(body, options) { 45 | return invokeFetch("users", { 46 | method: "post", 47 | pathTemplate: "/api/v1/users/actions/invite", 48 | body, 49 | contentType: "application/json", 50 | options 51 | }); 52 | } 53 | async function getMyUser(options) { 54 | return invokeFetch("users", { 55 | method: "get", 56 | pathTemplate: "/api/v1/users/me", 57 | options 58 | }); 59 | } 60 | async function deleteUser(userId, options) { 61 | return invokeFetch("users", { 62 | method: "delete", 63 | pathTemplate: "/api/v1/users/{userId}", 64 | pathVariables: { userId }, 65 | options 66 | }); 67 | } 68 | async function getUser(userId, query, options) { 69 | return invokeFetch("users", { 70 | method: "get", 71 | pathTemplate: "/api/v1/users/{userId}", 72 | pathVariables: { userId }, 73 | query, 74 | options 75 | }); 76 | } 77 | async function patchUser(userId, body, options) { 78 | return invokeFetch("users", { 79 | method: "patch", 80 | pathTemplate: "/api/v1/users/{userId}", 81 | pathVariables: { userId }, 82 | body, 83 | contentType: "application/json", 84 | options 85 | }); 86 | } 87 | function clearCache() { 88 | return clearApiCache("users"); 89 | } 90 | var usersExport = { 91 | getUsers, 92 | createUser, 93 | countUsers, 94 | filterUsers, 95 | inviteUsers, 96 | getMyUser, 97 | deleteUser, 98 | getUser, 99 | patchUser, 100 | clearCache 101 | }; 102 | var users_default = usersExport; 103 | export { 104 | clearCache, 105 | countUsers, 106 | createUser, 107 | users_default as default, 108 | deleteUser, 109 | filterUsers, 110 | getMyUser, 111 | getUser, 112 | getUsers, 113 | inviteUsers, 114 | patchUser 115 | }; 116 | -------------------------------------------------------------------------------- /web-integrations.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/web-integrations.ts 9 | async function getWebIntegrations(query, options) { 10 | return invokeFetch("web-integrations", { 11 | method: "get", 12 | pathTemplate: "/api/v1/web-integrations", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createWebIntegration(body, options) { 18 | return invokeFetch("web-integrations", { 19 | method: "post", 20 | pathTemplate: "/api/v1/web-integrations", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function deleteWebIntegration(id, options) { 27 | return invokeFetch("web-integrations", { 28 | method: "delete", 29 | pathTemplate: "/api/v1/web-integrations/{id}", 30 | pathVariables: { id }, 31 | options 32 | }); 33 | } 34 | async function getWebIntegration(id, options) { 35 | return invokeFetch("web-integrations", { 36 | method: "get", 37 | pathTemplate: "/api/v1/web-integrations/{id}", 38 | pathVariables: { id }, 39 | options 40 | }); 41 | } 42 | async function patchWebIntegration(id, body, options) { 43 | return invokeFetch("web-integrations", { 44 | method: "patch", 45 | pathTemplate: "/api/v1/web-integrations/{id}", 46 | pathVariables: { id }, 47 | body, 48 | contentType: "application/json", 49 | options 50 | }); 51 | } 52 | function clearCache() { 53 | return clearApiCache("web-integrations"); 54 | } 55 | var webIntegrationsExport = { 56 | getWebIntegrations, 57 | createWebIntegration, 58 | deleteWebIntegration, 59 | getWebIntegration, 60 | patchWebIntegration, 61 | clearCache 62 | }; 63 | var web_integrations_default = webIntegrationsExport; 64 | export { 65 | clearCache, 66 | createWebIntegration, 67 | web_integrations_default as default, 68 | deleteWebIntegration, 69 | getWebIntegration, 70 | getWebIntegrations, 71 | patchWebIntegration 72 | }; 73 | -------------------------------------------------------------------------------- /web-notifications.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/web-notifications.ts 9 | async function getNotifications(query, options) { 10 | return invokeFetch("web-notifications", { 11 | method: "get", 12 | pathTemplate: "/api/v1/web-notifications", 13 | query, 14 | options 15 | }); 16 | } 17 | async function deleteNotifications(options) { 18 | return invokeFetch("web-notifications", { 19 | method: "delete", 20 | pathTemplate: "/api/v1/web-notifications/all", 21 | options 22 | }); 23 | } 24 | async function patchNotifications(body, options) { 25 | return invokeFetch("web-notifications", { 26 | method: "patch", 27 | pathTemplate: "/api/v1/web-notifications/all", 28 | body, 29 | contentType: "application/json", 30 | options 31 | }); 32 | } 33 | async function deleteNotification(notificationId, options) { 34 | return invokeFetch("web-notifications", { 35 | method: "delete", 36 | pathTemplate: "/api/v1/web-notifications/{notificationId}", 37 | pathVariables: { notificationId }, 38 | options 39 | }); 40 | } 41 | async function getNotification(notificationId, options) { 42 | return invokeFetch("web-notifications", { 43 | method: "get", 44 | pathTemplate: "/api/v1/web-notifications/{notificationId}", 45 | pathVariables: { notificationId }, 46 | options 47 | }); 48 | } 49 | async function patchNotification(notificationId, body, options) { 50 | return invokeFetch("web-notifications", { 51 | method: "patch", 52 | pathTemplate: "/api/v1/web-notifications/{notificationId}", 53 | pathVariables: { notificationId }, 54 | body, 55 | contentType: "application/json", 56 | options 57 | }); 58 | } 59 | function clearCache() { 60 | return clearApiCache("web-notifications"); 61 | } 62 | var webNotificationsExport = { 63 | getNotifications, 64 | deleteNotifications, 65 | patchNotifications, 66 | deleteNotification, 67 | getNotification, 68 | patchNotification, 69 | clearCache 70 | }; 71 | var web_notifications_default = webNotificationsExport; 72 | export { 73 | clearCache, 74 | web_notifications_default as default, 75 | deleteNotification, 76 | deleteNotifications, 77 | getNotification, 78 | getNotifications, 79 | patchNotification, 80 | patchNotifications 81 | }; 82 | -------------------------------------------------------------------------------- /webhooks.js: -------------------------------------------------------------------------------- 1 | import { 2 | clearApiCache, 3 | invokeFetch 4 | } from "./chunks/LIEZG7IM.js"; 5 | import "./chunks/GPRUNZV4.js"; 6 | import "./chunks/7MMXU6EL.js"; 7 | 8 | // src/public/rest/webhooks.ts 9 | async function getWebhooks(query, options) { 10 | return invokeFetch("webhooks", { 11 | method: "get", 12 | pathTemplate: "/api/v1/webhooks", 13 | query, 14 | options 15 | }); 16 | } 17 | async function createWebhook(body, options) { 18 | return invokeFetch("webhooks", { 19 | method: "post", 20 | pathTemplate: "/api/v1/webhooks", 21 | body, 22 | contentType: "application/json", 23 | options 24 | }); 25 | } 26 | async function getWebhookEventTypes(options) { 27 | return invokeFetch("webhooks", { 28 | method: "get", 29 | pathTemplate: "/api/v1/webhooks/event-types", 30 | options 31 | }); 32 | } 33 | async function deleteWebhook(id, options) { 34 | return invokeFetch("webhooks", { 35 | method: "delete", 36 | pathTemplate: "/api/v1/webhooks/{id}", 37 | pathVariables: { id }, 38 | options 39 | }); 40 | } 41 | async function getWebhook(id, options) { 42 | return invokeFetch("webhooks", { 43 | method: "get", 44 | pathTemplate: "/api/v1/webhooks/{id}", 45 | pathVariables: { id }, 46 | options 47 | }); 48 | } 49 | async function patchWebhook(id, body, options) { 50 | return invokeFetch("webhooks", { 51 | method: "patch", 52 | pathTemplate: "/api/v1/webhooks/{id}", 53 | pathVariables: { id }, 54 | body, 55 | contentType: "application/json", 56 | options 57 | }); 58 | } 59 | async function updateWebhook(id, body, options) { 60 | return invokeFetch("webhooks", { 61 | method: "put", 62 | pathTemplate: "/api/v1/webhooks/{id}", 63 | pathVariables: { id }, 64 | body, 65 | contentType: "application/json", 66 | options 67 | }); 68 | } 69 | async function getWebhookDeliveries(id, query, options) { 70 | return invokeFetch("webhooks", { 71 | method: "get", 72 | pathTemplate: "/api/v1/webhooks/{id}/deliveries", 73 | pathVariables: { id }, 74 | query, 75 | options 76 | }); 77 | } 78 | async function getWebhookDelivery(id, deliveryId, options) { 79 | return invokeFetch("webhooks", { 80 | method: "get", 81 | pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}", 82 | pathVariables: { id, deliveryId }, 83 | options 84 | }); 85 | } 86 | async function resendWebhookDelivery(id, deliveryId, options) { 87 | return invokeFetch("webhooks", { 88 | method: "post", 89 | pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}/actions/resend", 90 | pathVariables: { id, deliveryId }, 91 | options 92 | }); 93 | } 94 | function clearCache() { 95 | return clearApiCache("webhooks"); 96 | } 97 | var webhooksExport = { 98 | getWebhooks, 99 | createWebhook, 100 | getWebhookEventTypes, 101 | deleteWebhook, 102 | getWebhook, 103 | patchWebhook, 104 | updateWebhook, 105 | getWebhookDeliveries, 106 | getWebhookDelivery, 107 | resendWebhookDelivery, 108 | clearCache 109 | }; 110 | var webhooks_default = webhooksExport; 111 | export { 112 | clearCache, 113 | createWebhook, 114 | webhooks_default as default, 115 | deleteWebhook, 116 | getWebhook, 117 | getWebhookDeliveries, 118 | getWebhookDelivery, 119 | getWebhookEventTypes, 120 | getWebhooks, 121 | patchWebhook, 122 | resendWebhookDelivery, 123 | updateWebhook 124 | }; 125 | --------------------------------------------------------------------------------