Skip to content
Snippets Groups Projects
Verified Commit 81c5a208 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: doc

parent f2efc18d
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,18 @@ import {Pathfinder} from "./pathfinder.mjs";
export {Datasource}
/**
* This callback can be passed to a datasource and is used to adapt data structures.
*
* @callback Monster.Data.Datasource~exampleCallback
* @param {*} value Value
* @param {string} key Key
* @memberOf Monster.Data
* @see Monster.Data.Datasource
*/
/**
* @private
* @type {symbol}
......
......@@ -22,7 +22,7 @@ export {RestAPI}
* @since 1.22.0
* @copyright schukai GmbH
* @memberOf Monster.Data.Datasource
* @summary The LocalStorage class encapsulates the access to data objects.
* @summary The RestAPI is a class that binds a REST API server.
*/
class RestAPI extends Datasource {
......@@ -30,7 +30,6 @@ class RestAPI extends Datasource {
*
* @param {Object} [readDefinition] An options object containing any custom settings that you want to apply to the read request.
* @param {Object} [writeDefinition] An options object containing any custom settings that you want to apply to the write request.
* @throws {TypeError} value is not a string
*/
constructor(readDefinition, writeDefinition) {
super();
......@@ -54,17 +53,21 @@ class RestAPI extends Datasource {
}
/**
* @property {string} url=undefined Defines the resource that you wish to fetch.
* @property {Object} write={} Options
* @property {Object} write.init={} An options object containing any custom settings that you want to apply to the request. The parameters are identical to those of the {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request|Request constructor}
* @property {string} write.init.method=POST
* @property {Object} write.init.headers Object containing any custom headers that you want to apply to the request.
* @property {string} write.acceptedStatus=[200,201]
* @property {string} write.url URL
* @property {Object} write.mapping the mapping is applied before writing.
* @property {String} write.mapping.transformer Transformer to select the appropriate entries
* @property {Monster.Data.Datasource~exampleCallback[]} write.mapping.callback with the help of the callback, the structures can be adjusted before writing.
* @property {Object} write.report
* @property {String} write.report.path Path to validations
* @property {Monster.Data.Datasource~exampleCallback[]} write.mapping.callback with the help of the callback, the structures can be adjusted before writing.
* @property {Object} write.sheathing
* @property {Object} write.sheathing.object Object to be wrapped
* @property {string} write.sheathing.path Path to the data
* @property {Object} read={} Options
* @property {Object} read.init={} An options object containing any custom settings that you want to apply to the request. The parameters are identical to those of the {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request|Request constructor}
* @property {string} read.init.method=GET
* @property {string} read.acceptedStatus=[200]
......@@ -234,12 +237,3 @@ class RestAPI extends Datasource {
}
/**
* This callback can be passed to a datasource and is used to adapt data structures.
*
* @callback Monster.Data.Datasource~exampleCallback
* @param {*} value Value
* @param {string} key Key
* @memberOf Monster.Data
* @see Monster.Data.Datasource
*/
......@@ -7,10 +7,17 @@
import {Base} from './base.mjs';
import {instanceSymbol} from '../constants.mjs';
export {Queue}
/**
* You can create the instance via the monster namespace `new Monster.Types.Queue()`.
* A queue is a list of items that are processed one after another (first in, first out).
*
* With a queue you can add items to the end of the list `Queue.add()` and remove items from the beginning of the list `Queue.pop()`.
*
* With `Queue.peek()` you can get the first item without removing it from the list.
*
* You can create the instance via `new Queue()`.
*
* @externalExample ../../example/types/queue.mjs
* @license AGPLv3
......
......@@ -14,8 +14,8 @@
</head>
<body>
<div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
<h1 style='margin-bottom: 0.1em;'>Monster 2.2.1</h1>
<div id="lastupdate" style='font-size:0.7em'>last update Mi 4. Jan 15:51:44 CET 2023</div>
<h1 style='margin-bottom: 0.1em;'>Monster 3.0.0</h1>
<div id="lastupdate" style='font-size:0.7em'>last update Fr 6. Jan 12:54:47 CET 2023</div>
</div>
<div id="mocks"></div>
<div id="mocha"></div>
......
......@@ -16416,7 +16416,7 @@ ${key.data.toString("base64")}
if (monsterVersion instanceof Version) {
return monsterVersion;
}
monsterVersion = new Version("2.2.1");
monsterVersion = new Version("3.0.0");
return monsterVersion;
}
 
......@@ -16424,7 +16424,7 @@ ${key.data.toString("base64")}
describe("Monster", function() {
describe(".getMonsterVersion()", function() {
let monsterVersion2;
monsterVersion2 = new Version("2.2.1");
monsterVersion2 = new Version("3.0.0");
let m = getMonsterVersion();
it("should " + monsterVersion2 + " is " + m, function() {
expect(m.compareTo(monsterVersion2)).is.equal(0);
......@@ -26633,6 +26633,22 @@ ${key.data.toString("base64")}
* @memberOf Monster.I18n
* @see {@link https://datatracker.ietf.org/doc/html/rfc3066}
*/
/**
* A queue is a list of items that are processed one after another (first in, first out).
*
* With a queue you can add items to the end of the list `Queue.add()` and remove items from the beginning of the list `Queue.pop()`.
*
* With `Queue.peek()` you can get the first item without removing it from the list.
*
* You can create the instance via `new Queue()`.
*
* @externalExample ../../example/types/queue.mjs
* @license AGPLv3
* @since 1.4.0
* @copyright schukai GmbH
* @memberOf Monster.Types
* @summary A Queue (Fifo)
*/
/**
* Adds a class attribute to an element.
*
......@@ -27479,11 +27495,21 @@ ${key.data.toString("base64")}
*
* @externalExample ../../../example/data/storage/restapi.mjs
* @license AGPLv3
* @since 1.22.0
* @since 3.1.0
* @copyright schukai GmbH
* @memberOf Monster.Data.Datasource
* @summary The LocalStorage class encapsulates the access to data objects.
*/
/**
* The RestAPI is a class that enables a REST API server.
*
* @externalExample ../../../example/data/storage/restapi.mjs
* @license AGPLv3
* @since 1.22.0
* @copyright schukai GmbH
* @memberOf Monster.Data.Datasource
* @summary The RestAPI is a class that binds a REST API server.
*/
/**
* The SessionStorage class provides a data source that uses the SessionStorage API on the client.
*
......@@ -28861,16 +28887,6 @@ ${key.data.toString("base64")}
* @memberOf Monster.Types
* @summary An iterator to run recursively through a tree of nodes
*/
/**
* You can create the instance via the monster namespace `new Monster.Types.Queue()`.
*
* @externalExample ../../example/types/queue.mjs
* @license AGPLv3
* @since 1.4.0
* @copyright schukai GmbH
* @memberOf Monster.Types
* @summary A Queue (Fifo)
*/
/**
* this function uses crypt and returns a random number.
*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment