{ "schemaVersion": "0.1.0", "readme": "", "modules": [ { "kind": "javascript-module", "path": "./index.js", "declarations": [], "exports": [ { "kind": "js", "name": "ajax", "declaration": { "name": "ajax", "module": "./src/ajax.js" } }, { "kind": "js", "name": "setAjax", "declaration": { "name": "setAjax", "module": "./src/ajax.js" } }, { "kind": "js", "name": "AjaxClient", "declaration": { "name": "AjaxClient", "module": "./src/AjaxClient.js" } }, { "kind": "js", "name": "AjaxClientFetchError", "declaration": { "name": "AjaxClientFetchError", "module": "./src/AjaxClientFetchError.js" } }, { "kind": "js", "name": "acceptLanguageRequestInterceptor", "declaration": { "name": "acceptLanguageRequestInterceptor", "module": "./src/interceptors.js" } }, { "kind": "js", "name": "createXSRFRequestInterceptor", "declaration": { "name": "createXSRFRequestInterceptor", "module": "./src/interceptors.js" } }, { "kind": "js", "name": "getCookie", "declaration": { "name": "getCookie", "module": "./src/interceptors.js" } }, { "kind": "js", "name": "cacheRequestInterceptorFactory", "declaration": { "name": "cacheRequestInterceptorFactory", "module": "./src/interceptors-cache.js" } }, { "kind": "js", "name": "cacheResponseInterceptorFactory", "declaration": { "name": "cacheResponseInterceptorFactory", "module": "./src/interceptors-cache.js" } }, { "kind": "js", "name": "validateOptions", "declaration": { "name": "validateOptions", "module": "./src/interceptors-cache.js" } } ] }, { "kind": "javascript-module", "path": "./src/AjaxClient.js", "declarations": [ { "kind": "class", "name": "AjaxClient", "members": [ { "kind": "field", "name": "options", "privacy": "public" }, { "kind": "method", "name": "addRequestInterceptor", "privacy": "public", "parameters": [ { "name": "requestInterceptor", "type": { "text": "RequestInterceptor" } } ] }, { "kind": "method", "name": "removeRequestInterceptor", "privacy": "public", "parameters": [ { "name": "requestInterceptor", "type": { "text": "RequestInterceptor" } } ] }, { "kind": "method", "name": "addResponseInterceptor", "privacy": "public", "parameters": [ { "name": "responseInterceptor", "type": { "text": "ResponseInterceptor" } } ] }, { "kind": "method", "name": "removeResponseInterceptor", "privacy": "public", "parameters": [ { "name": "responseInterceptor", "type": { "text": "ResponseInterceptor" } } ] }, { "kind": "method", "name": "request", "privacy": "public", "description": "Makes a fetch request, calling the registered fetch request and response\ninterceptors.", "return": { "type": { "text": "Promise" } }, "parameters": [ { "name": "info", "type": { "text": "RequestInfo" } }, { "name": "init", "type": { "text": "RequestInit & Partial" }, "optional": true } ] }, { "kind": "method", "name": "requestJson", "privacy": "public", "description": "Makes a fetch request, calling the registered fetch request and response\ninterceptors. Encodes/decodes the request and response body as JSON.", "return": { "type": { "text": "Promise<{ response: Response, body: T }>" } }, "parameters": [ { "name": "info", "type": { "text": "RequestInfo" } }, { "name": "init", "type": { "text": "LionRequestInit" }, "optional": true } ] } ] } ], "exports": [ { "kind": "js", "name": "AjaxClient", "declaration": { "name": "AjaxClient", "module": "./src/AjaxClient.js" } } ] }, { "kind": "javascript-module", "path": "./src/AjaxClientFetchError.js", "declarations": [ { "kind": "class", "name": "AjaxClientFetchError", "superclass": { "name": "Error", "module": "./src/AjaxClientFetchError.js" } } ], "exports": [ { "kind": "js", "name": "AjaxClientFetchError", "declaration": { "name": "AjaxClientFetchError", "module": "./src/AjaxClientFetchError.js" } } ] }, { "kind": "javascript-module", "path": "./src/ajax.js", "declarations": [ { "kind": "variable", "name": "ajax" }, { "kind": "function", "name": "setAjax", "description": "setAjax allows the Application Developer to override the globally used instance of {@link:ajax}.\nAll interactions with {@link:ajax} after the call to setAjax will use this new instance\n(so make sure to call this method before dependant code using {@link:ajax} is ran and this\nmethod is not called by any of your (indirect) dependencies.)", "parameters": [ { "name": "newAjax", "type": { "text": "AjaxClient" }, "description": "the globally used instance of {@link:ajax}." } ] } ], "exports": [ { "kind": "js", "name": "ajax", "declaration": { "name": "ajax", "module": "./src/ajax.js" } }, { "kind": "js", "name": "setAjax", "declaration": { "name": "setAjax", "module": "./src/ajax.js" } } ] }, { "kind": "javascript-module", "path": "./src/interceptors-cache.js", "declarations": [ { "kind": "variable", "name": "searchParamSerializer", "description": "Serialize search parameters into url query string parameters.\nIf params === null, returns ''" }, { "kind": "variable", "name": "validateOptions", "description": "", "type": { "text": "ValidatedCacheOptions" } }, { "kind": "variable", "name": "cacheRequestInterceptorFactory", "description": "Request interceptor to return relevant cached requests" }, { "kind": "variable", "name": "cacheResponseInterceptorFactory", "description": "Response interceptor to cache relevant requests" } ], "exports": [ { "kind": "js", "name": "searchParamSerializer", "declaration": { "name": "searchParamSerializer", "module": "./src/interceptors-cache.js" } }, { "kind": "js", "name": "validateOptions", "declaration": { "name": "validateOptions", "module": "./src/interceptors-cache.js" } }, { "kind": "js", "name": "cacheRequestInterceptorFactory", "declaration": { "name": "cacheRequestInterceptorFactory", "module": "./src/interceptors-cache.js" } }, { "kind": "js", "name": "cacheResponseInterceptorFactory", "declaration": { "name": "cacheResponseInterceptorFactory", "module": "./src/interceptors-cache.js" } } ] }, { "kind": "javascript-module", "path": "./src/interceptors.js", "declarations": [ { "kind": "function", "name": "getCookie", "return": { "type": { "text": "string | null" } }, "parameters": [ { "name": "name", "type": { "text": "string" }, "description": "the cookie name" }, { "name": "_document", "type": { "text": "Document | { cookie: string }" }, "description": "overwriteable for testing", "default": "document" } ] }, { "kind": "function", "name": "acceptLanguageRequestInterceptor", "description": "Transforms a request, adding an accept-language header with the current application's locale\nif it has not already been set.", "parameters": [ { "name": "request" } ] }, { "kind": "function", "name": "createXSRFRequestInterceptor", "description": "Creates a request transformer that adds a XSRF header for protecting\nagainst cross-site request forgery.", "return": { "type": { "text": "RequestInterceptor" } }, "parameters": [ { "name": "cookieName", "type": { "text": "string" }, "description": "the cookie name" }, { "name": "headerName", "type": { "text": "string" }, "description": "the header name" }, { "name": "_document", "type": { "text": "Document | { cookie: string }" }, "description": "overwriteable for testing", "default": "document" } ] } ], "exports": [ { "kind": "js", "name": "getCookie", "declaration": { "name": "getCookie", "module": "./src/interceptors.js" } }, { "kind": "js", "name": "acceptLanguageRequestInterceptor", "declaration": { "name": "acceptLanguageRequestInterceptor", "module": "./src/interceptors.js" } }, { "kind": "js", "name": "createXSRFRequestInterceptor", "declaration": { "name": "createXSRFRequestInterceptor", "module": "./src/interceptors.js" } } ] }, { "kind": "javascript-module", "path": "./src/typedef.js", "declarations": [], "exports": [] }, { "kind": "javascript-module", "path": "./types/types.d.ts", "declarations": [], "exports": [] }, { "kind": "javascript-module", "path": "./docs/cache-technical-docs.md", "declarations": [], "exports": [] } ] }