From 66ee81c55fbec72b98953f51d1995dac0423de00 Mon Sep 17 00:00:00 2001 From: Neil Cuzon <58763315+NeilCuzon@users.noreply.github.com> Date: Tue, 14 Jul 2020 19:27:00 -0700 Subject: [PATCH] Update 8.6.0_docs.md --- docs/8.6.0_docs.md | 88 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/docs/8.6.0_docs.md b/docs/8.6.0_docs.md index 5cf8b5478..8b6b20ecd 100644 --- a/docs/8.6.0_docs.md +++ b/docs/8.6.0_docs.md @@ -122,3 +122,91 @@ Example of **object.Assign**: • **calculateTextDimensions, calculateTextWidth,** and **calculateTextHeight** - for measuring text dimensions, width and height. **Notes**:For more information on usage, parameters, and return info for these new functions take a look at the jsdocs for them in the utils package. + + +# New API Requests Introduced in Version 8.6.0 + +## setSiteConfig + + | Function | Description | Type | Values | + | --------- | ------------------- | ------- | ------------------ | + | setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array| + + **Notes: + Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset + the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig + to the defaultConfig + Note: currentConfig is set in this function + Default value: At default, will mirror Global Config + + @param conf - the base currentConfig to use as siteConfig + @returns { } - the siteConfig + +export const setSiteConfig = conf => { + assignWithDepth(currentConfig, conf, { clobber: true }); + assignWithDepth(siteConfig, conf); + return getSiteConfig(); +}; + + ## getSiteConfig + | Function | Description | Type | Values | + | --------- | ------------------- | ------- | ------------------ | + | setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig| + + **Notes : + Returns any values in siteConfig. + @returns { } + +export const getSiteConfig = () => { + return assignWithDepth({}, siteConfig); +}; + + ## setConfig + | Function | Description | Type | Values | + | --------- | ------------------- | ------- | ------------------ | + | setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array| + + + **Notes : + Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any + values found in conf with key found in siteConfig.secure will be replaced with the corresponding + siteConfig value. + @param conf - the potential currentConfig + @returns { } - the currentConfig merged with the sanitized conf + + + + ## getConfig + | Function | Description | Type | Return Values | + | --------- | ------------------- | ------- | ------------------ | + | getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig| + + **Notes : + Returns any values in the currentConfig + + + ## sanitize + | Function | Description | Type | Values | + | --------- | ------------------- | ------- | ------------------ | + | sanitize |Sets the siteConfig to desired values. | Put Request |None| + + Ensures options parameter does not attempt to override siteConfig secure keys + Note: modifies options in-place + + + ## reset + + | Function | Description | Type | Required | Values | + | --------- | ------------------- | ------- | -------- | ------------------ | + | reset|Resets currentConfig to conf| Put Request | Required | None| + + ## onf + | Parameter | Description |Type | Required | Values| + | --- | --- | --- | --- | --- | + | conf| base set of values, which currentConfig coul be reset to.| Dictionary | Required | Any Values, with respect to the secure Array| + + **Notes : + default: current siteConfig (optional, default `getSiteConfig()`) + @param conf - the base currentConfig to reset to (default: current siteConfig ) + +## for more information, read [Setup](https://mermaid-js.github.io/mermaid/#/Setup)