/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /*! Axios v1.12.0 Copyright (c) 2025 Matt Zabriskie and contributors */ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ /** * @file Dispatch Request * @license Apache Version 2 * @description Functions for dispatching API requests via the axios library. * @param {string} url API endpoint URL * @param {string} action API action * @param {object} payload data to be transmitted to endpoint * @param {typedef.CredentialObj} local_auth the local authorization object * @param {typedef.CredentialObj} remote_auth the remote authoriuzation object * @param {object} customHeaders all the custom header to add to your call * @param {boolean} [getDataVersion] If true the function will return object having result * and dataVersion. * @param {boolean} [compress] If true, compress the data with gzip if its size is bigger than 1024 */ /** * @file Document Frame * @license Apache Version 2 */ /** * @file Document Rule * @license Apache Version 2 */ /** * @file Frame Config * @license Apache Version 2 */ /** * @file Frame Rule * @license Apache Version 2 */ /** * @file Javascript Terminus Document Classes * @license Apache Version 2 * Helper classes for accessing documents returned by the Terminus DB API programmatically * * @example * let doc = new TerminusDocument(client); * * //These set the objects document property and return promises: * * doc.loadDocument(URL).then(() => console.log(this.document)); * doc.loadComplete(URL, CLS).then(() => console.log(this.document)) * doc.loadSchema(cls).then(() => console.log(this.document)) * * //These just set the object's document property * doc.loadJSON(json_frames, cls) //console.log(this.document) * doc.loadDataFrames(json_frames, cls) * doc.loadClassFrames(json_frames, cls) * @example * * @description Represents a frame for programmatic access to object frame, * anywhere within a document * Recursive data structure where this.children contains an indexed array of object frames * and this.dataframes contains a property indexed array of data frames * Every object frame carries a reference to its classframe * This gives us instructions as to how to create new frames according to the schema * After that it's turtles all the way down. * @param cls - ID of the class (URL) * @param classframe - an array of frames representing a class * @param archetypes list of class frames * @param parent parent object * @returns */ /** * @file Terminus Client Utility Functions * @license Apache Version 2 * Object for bunding up common Terminus Utility Functions */ /** * @file Terminus Constants * @license Apache Version 2 * Constants representing API actions */ /** * @file Terminus DB connection configuration * @license Apache Version 2 * @description Object representing the state of a connection to a terminus db - these are: * provides methods for getting and setting connection parameters * @constructor * @param {string} serverUrl - the terminusdb server url * @param {typedef.ParamsObj} [params] - an object with the following connection parameters: */ /** * @file Terminus Rules * @license Apache Version 2 * Abstract object to support applying matching rules to result sets and documents * sub-classes are FrameRule and WOQLRule - this just has common functions */ /** * @file WOQL Rules * @license Apache Version 2 * WOQL Rules support pattern matching on results of WOQL Queries */ /** * @license Apache Version 2 * @module AccessControl * @constructor AccessControl * @description The AccessControl is a driver to work with * TerminusDB and TerminusX access control api * for the credential you can use the JWT token, the API token or * the basic authentication with username and password * @example * //connect with the API token * //(to request a token create an account in https://terminusdb.com/) * const accessContol = new AccessControl("https://servername.com", * {organization:"my_team_name", * token:"dGVybWludXNkYjovLy9kYXRhL2tleXNfYXB........"}) * accessControl.getOrgUsers().then(result=>{ * console.log(result) * }) * * //connect with the jwt token this type of connection is only for the dashboard * //or for application integrate with our login workflow * const accessContol = new AccessControl("https://servername.com", * {organization:"my_team_name", * jwt:"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkpXUjBIOXYyeTFORUd........"}) * accessControl.getOrgUsers().then(result=>{ * console.log(result) * }) * * //if the jwt is expired you can change it with * accessControl.setJwtToken("eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkpXUjBIOXYy * eTFORUd.......") * * //connect with the base authentication this type of connection is only for the local installation * const accessContol = new AccessControl("http://127.0.0.1:6363", * {organization:"my_team_name", user:"admin" * key:"mykey"}) * accessControl.getOrgUsers().then(result=>{ * console.log(result) * }) * */ /** * @license Apache Version 2 * @module WOQLLibrary * @constructor WOQLLibrary * @description Library Functions to manage the commits graph * @example * const woqlLib = WOQLLibrary() * woqlLib.branches() * * //or you can call this functions using WOQL Class * WOQL.lib().branches() * */ /** * @module WOQLResult * @license Apache Version 2 * Object representing the result of a WOQL Query * @param {object} results result JSON object as returned by WOQL query * @param {WOQLQuery} query the query object that generated the result * @param {object} [config] optional result configuration options object * [config.no_compress] by default all URLs are compressed where possible (v:X rather than http://.../variable/x) set to true to return non-compressed values * [config.context] specify the JSON-LD context to use for compressing results - by default * the query context will be used */ /** * @module WOQLTable * @license Apache Version 2 * @param {WOQLClient} [client] we need an client if we do a server side pagination,sorting etc... * @param {WOQLTableConfig} [config] * @returns {WOQLTable} */