/** This is spectacularly generated code by spectacular based on Qlik Cloud Services APIs */ import Auth from '../auth/auth.js'; import ListableResource from '../listable.js'; import type { Config } from '../types/types.js'; /** @param id - The CSP entry's unique identifier. @param childSrc - Defines the valid sources for loading web workers and nested browsing contexts using elements such as frame and iFrame. @param connectSrc - Restricts the URLs that can be loaded using script interfaces. @param connectSrcWSS - Restricts the URLs that can be connected to websockets (all sources will be prefixed with 'wss://'). @param createdDate - The UTC timestamp when the CSP entry was created. @param description - The reason for adding this origin to the Content Security Policy. @param fontSrc - Specifies valid sources for loading fonts. @param formAction - Allow forms to be submitted to the origin. @param frameAncestors - Specifies valid sources for embedding the resource using frame, iFrame, object, embed and applet. @param frameSrc - Specifies valid sources for loading nested browsing contexts using elements such as frame and iFrame. @param imgSrc - Specifies valid sources of images and favicons. @param mediaSrc - Specifies valid sources for loading media using the audio and video elements. @param modifiedDate - The UTC timestamp when the CSP entry was last modified. @param name - The name for this entry. @param objectSrc - Specifies valid sources for the object, embed, and applet elements. @param origin - The origin that the CSP directives should be applied to. @param scriptSrc - Specifies valid sources for JavaScript. @param styleSrc - Specifies valid sources for stylesheets. @param workerSrc - Specifies valid sources for Worker, SharedWorker, or ServiceWorker scripts. @param auth - Auth object used to make requests */ export declare class CSPEntry { auth: Auth; id?: string; childSrc?: boolean; connectSrc?: boolean; connectSrcWSS?: boolean; createdDate?: string; description?: string; fontSrc?: boolean; formAction?: boolean; frameAncestors?: boolean; frameSrc?: boolean; imgSrc?: boolean; mediaSrc?: boolean; modifiedDate?: string; name?: string; objectSrc?: boolean; origin: string; scriptSrc?: boolean; styleSrc?: boolean; workerSrc?: boolean; [key: string]: any; constructor({ id, childSrc, connectSrc, connectSrcWSS, createdDate, description, fontSrc, formAction, frameAncestors, frameSrc, imgSrc, mediaSrc, modifiedDate, name, objectSrc, origin, scriptSrc, styleSrc, workerSrc, ...rest }: { id?: string; childSrc?: boolean; connectSrc?: boolean; connectSrcWSS?: boolean; createdDate?: string; description?: string; fontSrc?: boolean; formAction?: boolean; frameAncestors?: boolean; frameSrc?: boolean; imgSrc?: boolean; mediaSrc?: boolean; modifiedDate?: string; name?: string; objectSrc?: boolean; origin: string; scriptSrc?: boolean; styleSrc?: boolean; workerSrc?: boolean; }, auth?: Auth); /** Deletes a specific CSP entry */ delete(): Promise; /** Updates a CSP entry @param data - */ set(data: CSPEntryContent): Promise; } export type CSPEntryContent = { /** Defines the valid sources for loading web workers and nested browsing contexts using elements such as frame and iFrame. */ childSrc?: boolean; /** Restricts the URLs that can be loaded using script interfaces. */ connectSrc?: boolean; /** Restricts the URLs that can be connected to websockets (all sources will be prefixed with 'wss://'). */ connectSrcWSS?: boolean; /** The UTC timestamp when the CSP entry was created. */ createdDate?: string; /** The reason for adding this origin to the Content Security Policy. */ description?: string; /** Specifies valid sources for loading fonts. */ fontSrc?: boolean; /** Allow forms to be submitted to the origin. */ formAction?: boolean; /** Specifies valid sources for embedding the resource using frame, iFrame, object, embed and applet. */ frameAncestors?: boolean; /** Specifies valid sources for loading nested browsing contexts using elements such as frame and iFrame. */ frameSrc?: boolean; /** Specifies valid sources of images and favicons. */ imgSrc?: boolean; /** Specifies valid sources for loading media using the audio and video elements. */ mediaSrc?: boolean; /** The UTC timestamp when the CSP entry was last modified. */ modifiedDate?: string; /** The name for this entry. */ name?: string; /** Specifies valid sources for the object, embed, and applet elements. */ objectSrc?: boolean; /** The origin that the CSP directives should be applied to. */ origin: string; /** Specifies valid sources for JavaScript. */ scriptSrc?: boolean; /** Specifies valid sources for stylesheets. */ styleSrc?: boolean; /** Specifies valid sources for Worker, SharedWorker, or ServiceWorker scripts. */ workerSrc?: boolean; [key: string]: any; }; export type CSPHeader = { /** The compiled CSP header. */ 'Content-Security-Policy'?: string; [key: string]: any; }; export declare class CspOrigins { auth: Auth; config: Config; constructor(config: Config | Auth); /** Retrieves the CSP header for a tenant */ generateHeader(): Promise; /** Returns details for a specific CSP entry @param id - The CSP entry's unique identifier. */ get(id: string): Promise; /** Retrieves all CSP entries for a tenant @param childSrc - Filter resources by directive 'childSrc', true/false. @param connectSrc - Filter resources by directive 'connectSrc', true/false. @param connectSrcWSS - Filter resources by directive 'connectSrcWSS', true/false. @param fontSrc - Filter resources by directive 'fontSrc', true/false. @param formAction - Filter resources by directive 'formAction', true/false. @param frameAncestors - Filter resources by directive 'frameAncestors', true/false. @param frameSrc - Filter resources by directive 'frameSrc', true/false. @param imgSrc - Filter resources by directive 'imgSrc', true/false. @param limit - Maximum number of CSP-Origins to retrieve. @param mediaSrc - Filter resources by directive 'mediaSrc', true/false. @param name - Filter resources by name (wildcard and case insensitive). @param next - Cursor to the next page. @param objectSrc - Filter resources by directive 'objectSrc', true/false. @param origin - Filter resources by origin (wildcard and case insensitive). @param prev - Cursor to previous next page. @param scriptSrc - Filter resources by directive 'scriptSrc', true/false. @param sort - Field to sort by, prefix with -/+ to indicate order. @param styleSrc - Filter resources by directive 'styleSrc', true/false. @param workerSrc - Filter resources by directive 'workerSrc', true/false. */ getCspOrigins(queryParams?: { childSrc?: boolean; connectSrc?: boolean; connectSrcWSS?: boolean; fontSrc?: boolean; formAction?: boolean; frameAncestors?: boolean; frameSrc?: boolean; imgSrc?: boolean; limit?: number; mediaSrc?: boolean; name?: string; next?: string; objectSrc?: boolean; origin?: string; prev?: string; scriptSrc?: boolean; sort?: 'name' | '-name' | 'origin' | '-origin' | 'createdDate' | '-createdDate' | 'modifiedDate' | '-modifiedDate'; styleSrc?: boolean; workerSrc?: boolean; }): Promise>; /** Creates a new CSP entry @param data - */ create(data: CSPEntryContent): Promise; }