diff --git a/package.json b/package.json index 310777e..074cc7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jitterbit-script", - "version": "1.0.4", + "version": "1.0.5", "description": "Static typechecker and interpreter for Jitterbit Script", "main": "build/index.js", "scripts": { diff --git a/src/api/functions/array.ts b/src/api/functions/array.ts index 63bfe51..d4328f6 100644 --- a/src/api/functions/array.ts +++ b/src/api/functions/array.ts @@ -20,6 +20,7 @@ export class Array extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Creates an empty array. Though arrays don't need to be initialized prior to use, this method can be used to be explicit or to reset an already-existing array. Arrays are zero-based, and values are retrieved using indexes."; } call(args: RuntimeVal[], scope: Scope) { @@ -45,6 +46,7 @@ export class Collection extends Array { constructor() { super(); this.name = "Collection"; + this.docs = "An alias for `Array`. See the function [`Array`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/dictionary-and-array-functions/#dictionaryandarrayfunctions-array)."; } } @@ -55,7 +57,7 @@ export class Collection extends Array { * * Compare with the function `GetSourceInstanceMap` which returns a map of the keys (the attributes) and values for a node. * - * To enter an n path into the function, drag and drop the desired XML node folder from the Source Objects tab of the script component palette to the script to insert its qualified path at the location of your cursor, or enter its reference path manually. For more information, see the instructions on inserting source objects. + * To enter an `n` path into the function, drag and drop the desired XML node folder from the Source Objects tab of the script component palette to the script to insert its qualified path at the location of your cursor, or enter its reference path manually. For more information, see the instructions on inserting source objects. */ export class GetSourceAttrNames extends Func { constructor() { @@ -70,6 +72,7 @@ export class GetSourceAttrNames extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns an array containing the names of the attributes of a node, in the order that the attributes appear in the node.\n\nCompare with the function `GetSourceInstanceMap` which returns a map of the keys (the attributes) and values for a node.\n\nCompare with the function `GetSourceInstanceMap` which returns a map of the keys (the attributes) and values for a node.\n\nTo enter an `n` path into the function, drag and drop the desired XML node folder from the Source Objects tab of the script component palette to the script to insert its qualified path at the location of your cursor, or enter its reference path manually. For more information, see the instructions on [inserting source objects](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/scripts/jitterbit-script#jitterbitscript-source-objects)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -96,7 +99,7 @@ export class GetSourceAttrNames extends Func { * * Compare with the function `GetSourceInstanceElementMap` which returns a map of a node. * - * To enter an n path into the function, drag and drop the desired XML node folder + * To enter an `n` path into the function, drag and drop the desired XML node folder * from the Source Objects tab of the script component palette to the script * to insert its qualified path at the location of your cursor, or enter its reference path manually. * For more information, see the instructions on inserting source objects. @@ -114,6 +117,7 @@ export class GetSourceElementNames extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns an array containing the names of the simple sub-elements for a node in the order that the attributes appear in the node.\n\nCompare with the function `GetSourceInstanceElementMap` which returns a map of a node.\n\nTo enter an `n` path into the function, drag and drop the desired XML node folder from the **Source Objects** tab of the script component palette to the script to insert its qualified path at the location of your cursor, or enter its reference path manually. For more information, see the instructions on [inserting source objects](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/scripts/jitterbit-script#jitterbitscript-source-objects)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -140,7 +144,7 @@ export class GetSourceElementNames extends Func { * * As an alternative to this function, see `GetSourceInstanceMap`. * - * To enter an n path into the function, drag and drop the desired XML node folder from the Source Objects tab of the script component palette to the script to insert its qualified path at the location of your cursor, or enter its reference path manually. + * To enter an `n` path into the function, drag and drop the desired XML node folder from the Source Objects tab of the script component palette to the script to insert its qualified path at the location of your cursor, or enter its reference path manually. * For more information, see the instructions on inserting source objects. */ export class GetSourceInstanceArray extends Func { @@ -156,6 +160,7 @@ export class GetSourceInstanceArray extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns an array containing the attribute's value from an element node. The value in the array is labeled with the attribute's name, and can be retrieved either by its index or by its name as in a dictionary data element.\n\nAs an alternative to this function, see `GetSourceInstanceMap`.\n\nTo enter an n path into the function, drag and drop the desired XML node folder from the **Source Objects** tab of the script component palette to the script to insert its qualified path at the location of your cursor, or enter its reference path manually. For more information, see the instructions on [inserting source objects](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/scripts/jitterbit-script#jitterbitscript-source-objects)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -197,6 +202,7 @@ export class GetSourceInstanceElementArray extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns an array containing the sub-element's value from an element node. The value in the array is labeled with the name of the sub-element, and can be retrieved either by its index or by its name as in the dictionary data element.\n\nAs an alternative to this function, see `GetSourceInstanceElementMap`.\n\nTo enter an `n` path into the function, drag and drop the desired XML node folder from the **Source Objects** tab of the script component palette to the script to insert its qualified path at the location of your cursor, or enter its reference path manually. For more information, see the instructions on [inserting source objects](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/scripts/jitterbit-script#jitterbitscript-source-objects)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -224,7 +230,7 @@ type Evaluation = { eval: number; elem: RuntimeVal; }; /** * The implementation of `SortArray` function. * - * Sorts an array in-place. The return value is undefined and should be ignored (it's actually `null`). + * Sorts an array in-place. The return value is undefined and should be ignored (`null`). * * In the first form, the second parameter (optional) specifies the sort order. * @@ -254,6 +260,7 @@ export class SortArray extends Func { ]; this.minArgs = 1; this.maxArgs = 3; + this.docs = "Sorts an array in-place. The return value is undefined and should be ignored (`null`).\n\nIn the first form, the second parameter (optional) specifies the sort order.\n\nIn the second form, for multi-dimentional arrays, the function sorts the array according to a zero-based index specified in the second parameter (required). In the second form, the third argument (optional) specifies the sort order.\n\nThe default sort order is ascending in both forms.\n\nAfter the function returns, the array will be sorted in-place. If specified, it will be sorted according to the index.\n\nMultiple sorting of the same array is possible by applying the `SortArray` function repeatedly."; } call(args: RuntimeVal[], scope: Scope) { @@ -565,6 +572,7 @@ export class ReduceDimension extends Func { ]) ]; this.signature = this.signatures[0]; + this.docs = "Given a multi-dimensional array with `n` dimensions, the function returns an array with `n-1` dimensions. The lowest dimension of the input array will disappear, and their members will be collected to the next level dimension."; } call(args: RuntimeVal[], scope: Scope) { diff --git a/src/api/functions/cache.ts b/src/api/functions/cache.ts index 5f6a86f..0b198fe 100644 --- a/src/api/functions/cache.ts +++ b/src/api/functions/cache.ts @@ -26,6 +26,7 @@ export class ReadCache extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 3; + this.docs = "Reads from a common cache stored on Harmony."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -83,6 +84,7 @@ export class WriteCache extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 4; + this.docs = "Writes to a common cache stored on Harmony."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { diff --git a/src/api/functions/conversion.ts b/src/api/functions/conversion.ts index e137644..e22df3a 100644 --- a/src/api/functions/conversion.ts +++ b/src/api/functions/conversion.ts @@ -27,6 +27,7 @@ export class BinaryToHex extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts a binary value to a string representing the hexadecimal values of each byte. The resulting string will be all lowercase. The result of this function call is undefined if the argument is not a binary value.\n\nThis is the reverse of the function [`HexToBinary`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/conversion-functions/#conversionfunctions-hextobinary)."; } call(args: RuntimeVal[], scope: Scope) { @@ -71,6 +72,7 @@ export class BinaryToUUID extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts a 16-byte binary value to a string in the standard UUID format. The resulting string will always be lowercase.\n\nThis is the reverse of the function [`UUIDToBinary`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/conversion-functions/#conversionfunctions-uuidtobinary)."; } call(args: RuntimeVal[], scope: Scope) { @@ -116,6 +118,7 @@ export class Bool extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts any data type to a boolean value (`true` or `false`). If the data is an integer or a floating-point number not equal to zero, the result is `true` (`1`).\n\nThe strings `\"true\"` and `\"T\"` return `true` independently of case (`\"TRUE\"`, `\"t\"`, and `\"True\"` all return `true`). In all other cases, the result is `false` (`0`)."; } call(args: RuntimeVal[], scope: Scope) { @@ -206,6 +209,7 @@ export class DateFunc extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts the argument to a date. If the input is a string, it has to be formatted using one of the standard date formats such as `\"12/25/2018 12:30\"`, `\"2018-12-25\"`, `\"2018-12-25T12:30:00\"`, `\"December 25, 2018\"`, or `\"DEC 25, 2018\"`.\n\nIf the input string is not in one of the four predefined date formats (`GeneralDate`, `LongDate`, `MediumDate`, or `ShortDate`) that can be read by the `Date` function, it can be converted first to a standard format by the `CVTDate` function. Hour, minute, and second are optional.\n\nIf the input is an integer or a double, the input is interpreted as the number of seconds from 12:00:00 AM of 1/1/1970 UTC, the start of the UNIX epoch.\n\nNote that `Date(Long(Now())) == Now()`.\n\n"; } call(args: RuntimeVal[], scope: Scope) { @@ -280,7 +284,7 @@ export class DateFunc extends Func { * The implementation of `Double` function. * * A best-effort is made to convert the argument to a double. - * If the data type being evaluated cannot be converted to a double, the function returns 0. + * If the data type being evaluated cannot be converted to a double, the function returns `0`. * If the data being evaluated is a date or time record, the result is * the number of seconds from 12:00:00 AM of 1/1/1970 UTC (the start of the UNIX epoch). */ @@ -297,6 +301,7 @@ export class Double extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "A best-effort is made to convert the argument to a double. If the data type being evaluated cannot be converted to a double, the function returns `0`. If the data being evaluated is a date or time record, the result is the number of seconds from 12:00:00 AM of 1/1/1970 UTC (the start of the UNIX epoch)."; } call(args: RuntimeVal[], scope: Scope) { @@ -356,7 +361,7 @@ export class Double extends Func { * The implementation of `Float` function. * * A best-effort is made to convert the argument to a float. - * If the data type being evaluated cannot be converted to a float the function returns 0. + * If the data type being evaluated cannot be converted to a float the function returns `0`. * If the data being evaluated is a date or time record, the result is * the number of seconds from 12:00:00 AM of 1/1/1970 UTC (the start of the UNIX epoch). */ @@ -373,6 +378,7 @@ export class Float extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "A best-effort is made to convert the argument to a float. If the data type being evaluated cannot be converted to a float the function returns `0`. If the data being evaluated is a date or time record, the result is the number of seconds from 12:00:00 AM of 1/1/1970 UTC (the start of the UNIX epoch)."; } call(args: RuntimeVal[], scope: Scope) { @@ -385,6 +391,7 @@ export class Float extends Func { // POD: the original function returns null when passed a null value return new JbNumber(args[0].toNumber()); } + protected chooseSignature(args: RuntimeVal[]) { this.signature = this.signatures[0]; } @@ -450,6 +457,7 @@ export class HexToBinary extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts a hex-string to a binary value. The resulting value will contain the bytes represented by each pair of characters in the input string. The input string is case-insensitive.\n\nThis is the reverse of the function [`BinaryToHex`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/conversion-functions/#conversionfunctions-binarytohex)."; } call(args: RuntimeVal[], scope: Scope) { @@ -476,7 +484,7 @@ export class HexToBinary extends Func { /** * The implementation of `HexToString` function. * - * Converts a hex-string to a string value. The resulting value will contain the characters represented by each pair of characters in the input string. The input string is case-insensitive. As the input characters are hex, the character pairs of the input string must be limited to the range "00" through "FF". + * Converts a hex-string to a string value. The resulting value will contain the characters represented by each pair of characters in the input string. The input string is case-insensitive. As the input characters are hex, the character pairs of the input string must be limited to the range `00` through `FF`. * * To use UTF-8 for the outgoing string value, set `jitterbit.scripting.hex.enable_unicode_support` to `true` upstream of this function when using agent versions 10.70.1 or later or 11.8.1 or later. * @@ -495,6 +503,7 @@ export class HexToString extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts a hex-string to a string value. The resulting value will contain the characters represented by each pair of characters in the input string. The input string is case-insensitive. As the input characters are hex, the character pairs of the input string must be limited to the range `00` through `FF`.\n\nTo use UTF-8 for the outgoing string value, set `jitterbit.scripting.hex.enable_unicode_support` to `true` upstream of this function when using agent versions 10.70.1 or later or 11.8.1 or later.\n\nThis is the reverse of the function [`StringToHex`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/conversion-functions/#conversionfunctions-stringtohex)."; } call(args: RuntimeVal[], scope: Scope) { @@ -537,7 +546,7 @@ export class HexToString extends Func { * The implementation of `Int` function. * * A best-effort is made to convert the argument to an integer. - * If the data type being evaluated cannot be converted to an integer, the function returns 0. + * If the data type being evaluated cannot be converted to an integer, the function returns `0`. * If the data being evaluated is a date or time record, the result is * the number of seconds from 12:00:00 AM of 1/1/1970 UTC (the start of the UNIX epoch). */ @@ -554,6 +563,7 @@ export class Int extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "A best-effort is made to convert the argument to an integer. If the data type being evaluated cannot be converted to an integer, the function returns `0`. If the data being evaluated is a date or time record, the result is the number of seconds from 12:00:00 AM of 1/1/1970 UTC (the start of the UNIX epoch)."; } call(args: RuntimeVal[], scope: Scope) { @@ -615,7 +625,7 @@ export class Int extends Func { * The implementation of `Long` function. * * A best-effort is made to convert the argument to a long integer. - * If the data type being evaluated cannot be converted to a long integer, the function returns 0. + * If the data type being evaluated cannot be converted to a long integer, the function returns `0`. * If the data being evaluated is a date or time record, the result is * the number of seconds from 12:00:00 AM of 1/1/1970 UTC (the start of the UNIX epoch). */ @@ -632,6 +642,7 @@ export class Long extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "A best-effort is made to convert the argument to a long integer. If the data type being evaluated cannot be converted to a long integer, the function returns `0`. If the data being evaluated is a date or time record, the result is the number of seconds from 12:00:00 AM of 1/1/1970 UTC (the start of the UNIX epoch)."; } call(args: RuntimeVal[], scope: Scope) { @@ -694,14 +705,14 @@ export class Long extends Func { * * Converts any data type to a string. If the data being evaluated is already a string, no conversion takes place. * - * If the data type is a date or time record, the date is returned in ISO 8601 format (yyyy-mm-dd HH:MM:SS). + * If the data type is a date or time record, the date is returned in ISO 8601 format (`yyyy-mm-dd HH:MM:SS`). * For other date formats, use the functions `CVTDate` or `FormatDate`. * * Binary data that contains null bytes is returned as a string representing the hexadecimal values of each byte, just as if `BinaryToHex` had been called. * If the binary data contains no null bytes, then a string representation is returned with the assumption that the bytes represent a UTF-8-encoded string. * If you always want a hexadecimal representation, use the `BinaryToHex` function instead. * - * For a boolean value, the strings "1" or "0" are returned. + * For a boolean value, the strings `"1"` or `"0"` are returned. */ export class String extends Func { constructor() { @@ -716,6 +727,7 @@ export class String extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts any data type to a string. If the data being evaluated is already a string, no conversion takes place.\n\nIf the data type is a date or time record, the date is returned in ISO 8601 format (`yyyy-mm-dd HH:MM:SS`). For other date formats, use the functions [`CVTDate`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-cvtdate) or [`FormatDate`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-formatdate). Binary data that contains null bytes is returned as a string representing the hexadecimal values of each byte, just as if `BinaryToHex` had been called. If the binary data contains no null bytes, then a string representation is returned with the assumption that the bytes represent a UTF-8-encoded string. If you always want a hexadecimal representation, use the [`BinaryToHex`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/conversion-functions/#conversionfunctions-binarytohex) function instead.\n\nFor a boolean value, the strings `\"1\"` or `\"0\"` are returned."; } call(args: RuntimeVal[], scope: Scope) { @@ -768,9 +780,9 @@ export class String extends Func { * Converts a string value to a string representing the hexadecimal values of each byte. * The resulting string will be all lowercase. * - * To use UTF-8 for the incoming string value, set `jitterbit.scripting.hex.enable_unicode_support` to true upstream of this function when using agent versions 10.70.1 or later or 11.8.1 or later. + * To use UTF-8 for the incoming string value, set `jitterbit.scripting.hex.enable_unicode_support` to `true` upstream of this function when using agent versions 10.70.1 or later or 11.8.1 or later. * - * Warning: this function has reversed logic regarding UTF-8, set `jitterbit.scripting.hex.enable_unicode_support` to opt out of UTF-8 (original Jitterbit bug). + * **Warning**: this function has reversed logic regarding UTF-8, set `jitterbit.scripting.hex.enable_unicode_support` to opt out of UTF-8 (original Jitterbit bug). * * This is the reverse of the function `HexToString`. */ @@ -787,6 +799,7 @@ export class StringToHex extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts a string value to a string representing the hexadecimal values of each byte. The resulting string will be all lowercase.\n\nTo use UTF-8 for the incoming string value, set `jitterbit.scripting.hex.enable_unicode_support` to `true` upstream of this function when using agent versions 10.70.1 or later or 11.8.1 or later.\n\n**Warning**: this function has reversed logic regarding UTF-8, set `jitterbit.scripting.hex.enable_unicode_support` to opt out of UTF-8 (original Jitterbit bug).\n\nThis is the reverse of the function [`HexToString`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/conversion-functions/#conversionfunctions-hextostring)."; } call(args: RuntimeVal[], scope: Scope) { @@ -832,7 +845,7 @@ export class StringToHex extends Func { * The format of the input should be `nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn` where each pair (`nn`) * is the hexadecimal representation of the corresponding byte. * - * The case of the input string does not matter. The returned binary value is 16 bytes long. + * The case of the input string does not matter. The returned binary value is 16 bytes-long. * * This is the reverse of the function `BinaryToUUID`. */ @@ -849,6 +862,7 @@ export class UUIDToBinary extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts a UUID string to a binary value containing the corresponding bytes. The size of the input string must be 36 characters.\n\nThe format of the input should be `nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn` where each pair (`nn`) is the hexadecimal representation of the corresponding byte.\n\nThe case of the input string does not matter. The returned binary value is 16 bytes-long.\n\nThis is the reverse of the function [`BinaryToUUID`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/conversion-functions/#conversionfunctions-binarytouuid)."; } call(args: RuntimeVal[], scope: Scope) { diff --git a/src/api/functions/crypto.ts b/src/api/functions/crypto.ts index 16328e3..aa028fe 100644 --- a/src/api/functions/crypto.ts +++ b/src/api/functions/crypto.ts @@ -29,6 +29,7 @@ export class AESDecryption extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 5; + this.docs = "This function decrypts a string encrypted with the AES algorithm.\n\nThe decrypted output is returned as a string. See [`AESEncryption`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/cryptographic-functions/#cryptographicfunctions-aesencryption) for additional details."; } call(args: RuntimeVal[], scope: Scope): never { @@ -97,6 +98,7 @@ export class AESEncryption extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 5; + this.docs = "This function encrypts a string using the AES algorithm. The key is generated according to Password-Based Cryptography Specification Version 2.0 ([PKCS5S2](https://tools.ietf.org/html/rfc2898#section-4.1)).\n\nThe encrypted output is a base64-encoded string. The output from `AESEncryption` can be passed directly to [`AESDecryption`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/cryptographic-functions/#cryptographicfunctions-aesdecryption), for decryption, using the same parameters as when the plaintext string was encrypted."; } call(args: RuntimeVal[], scope: Scope): never { @@ -156,6 +158,7 @@ export class Base64Decode extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Decodes a base64-encoded string, returning binary data. See also [`Base64Encode`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/cryptographic-functions/#cryptographicfunctions-base64encode)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -188,6 +191,7 @@ export class Base64Decode extends Func { * maximum line length, this should be explicitly disabled only as needed. * To disable this, set the `jitterbit.base64.encoded.string.no.wrap` Jitterbit variable * to `true` before calling this function. + * * This variable is supported with string data when using 10.49 agents and later, and * with binary data when using 10.x agents 10.66 and later and 11.x agents 11.4 and later. * @@ -206,6 +210,7 @@ export class Base64Encode extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Encodes the argument data, treating the characters in a string as binary data unless the input is already binary. If the type of the argument is not binary or a string, then the argument value is first converted to a string before encryption.\n\nA newline character (`\\n`) is added after every 64th character of the encoded result string. As many implementations of Base64 include newlines to limit the encoded result's maximum line length, this should be explicitly disabled only as needed. To disable this, set the `jitterbit.base64.encoded.string.no.wrap` Jitterbit variable to `true` before calling this function.\n\nThis variable is supported with string data when using 10.49 agents and later, and with binary data when using 10.x agents 10.66 and later and 11.x agents 11.4 and later.\n\nSee also [`Base64Decode`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/cryptographic-functions/#cryptographicfunctions-base64decode)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -281,6 +286,7 @@ export class Base64EncodeFile extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Reads a binary file from the specified source activity and returns the contents as a base64-encoded string. This method is generally used for files that could be binary. To read a text file, use [`ReadFile`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-readfile) instead.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/cryptographic-functions/#cryptographicfunctions-base64encodefile)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -331,6 +337,7 @@ export class MD5 extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Applies the MD5 hash function to the supplied argument. The hash is returned as a 64-bit string of hex numbers. Non-string data will first be converted to a string."; } call(args: RuntimeVal[], scope: Scope): never { @@ -371,6 +378,7 @@ export class MD5AsTwoNumbers extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Applies the MD5 hash function to an input string and returns the result as an array with two 64-bit numbers. Non-string data will first be converted to a string."; } call(args: RuntimeVal[], scope: Scope): never { @@ -412,6 +420,7 @@ export class SHA256 extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Applies the SHA-256 hash function to an input string. The hash returned is a string of 64 hex numbers.\n\nIf the input is a string, it will first be converted to the UTF-8 byte representation. Non-string data will first be converted to a string."; } call(args: RuntimeVal[], scope: Scope): never { diff --git a/src/api/functions/database.ts b/src/api/functions/database.ts index d155a5a..fcf633b 100644 --- a/src/api/functions/database.ts +++ b/src/api/functions/database.ts @@ -13,7 +13,7 @@ import { AsyncFunc, Func, Parameter, Signature } from "../types"; * and subsequent lookups use this cache instead of repeatedly querying the database * (an alternative to caching is to use the functions `Set` and `Get`). * - * If there are no rows returned for the query specified in `sql`, the function returns null. + * If there are no rows returned for the query specified in `sql`, the function returns `null`. * * The global Jitterbit variable `$jitterbit.scripting.db.rows_affected` is not set by this method. * @@ -34,6 +34,7 @@ export class CacheLookup extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "This function is the same as `DBLookup`, except that the first lookup caches the information and subsequent lookups use this cache instead of repeatedly querying the database (an alternative to caching is to use the functions `Set` and `Get`).\n\nIf there are no rows returned for the query specified in `sql`, the function returns `null`.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/database-functions/#databasefunctions-cachelookup)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -102,6 +103,7 @@ export class CallStoredProcedure extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 100; + this.docs = "Calls the stored procedure `spName` using the connection information specified by the database connection identified by `databaseId`.\n\nIf applicable, the returned `resultSet` is a two-dimensional array of strings. If the stored procedure returns no `resultSet` or if using an ODBC driver, this argument is ignored.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/database-functions/#databasefunctions-callstoredprocedure)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -165,6 +167,7 @@ export class DBCloseConnection extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Commits the current transaction and closes the database connection.\n\nThe database used in this function call must be defined as a Database connection in the current project. For more information, see [Endpoints](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/scripts/jitterbit-script#jitterbitscript-connectors)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -196,23 +199,23 @@ export class DBCloseConnection extends AsyncFunc { * * If the SQL statement produces a result set, there are two ways to retrieve the data: * - * 1. If you specify only the two required parameters (first form), + * - If you specify only the two required parameters (first form), * the function will return the full record set as an array of rows. * - * You can then use a `While()` loop to iterate over the rows and use `Get()` to retrieve the data. - * If no rows are returned, the method returns an empty array `(Length($arr) == 0)`. + * You can then use a `While()` loop to iterate over the rows and use `Get()` to retrieve the data. + * If no rows are returned, the method returns an empty array `(Length($arr) == 0)`. * - * 2. If you specify output variables in addition to the two required parameters (second form), + * - If you specify output variables in addition to the two required parameters (second form), * the values of the fields of the first row are returned. * - * Pass names of global variables within quotes as parameters after the first two parameters. - * The value of the first field of the first row will be written to the global variable passed - * as the third parameter, the second field of the first row to the fourth parameter, and so on. - * Alternatively, the global variables can be passed by reference by preceding them - * with a `$` sign, such as `$output`. + * Pass names of global variables within quotes as parameters after the first two parameters. + * The value of the first field of the first row will be written to the global variable passed + * as the third parameter, the second field of the first row to the fourth parameter, and so on. + * Alternatively, the global variables can be passed by reference by preceding them + * with a `$` sign, such as `$output`. * - * The return value in this case is the number of records returned; either 1 (if records were found) - * or 0 (if none were returned). + * The return value in this case is the number of records returned; either 1 (if records were found) + * or 0 (if none were returned). * * The returned data values are always strings. * Binary data is returned as its hex-string representation. @@ -241,6 +244,7 @@ export class DBExecute extends AsyncFunc { ]; this.minArgs = 2; this.maxArgs = 100; + this.docs = "Executes a SQL statement on a database and returns the results.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/database-functions/#databasefunctions-dbexecute)." } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -287,7 +291,7 @@ export class DBExecute extends AsyncFunc { /** * The implementation of `DBLoad` function. * - * akes a source (a single file in CSV format) and loads the data into a specified + * Takes a source (a single file in CSV format) and loads the data into a specified * table in a target database. * * The parameter `columnKeynames` is not used when only inserting (`mode=2`) @@ -316,6 +320,7 @@ export class DBLoad extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 5; this.maxArgs = 9; + this.docs = "Takes a source (a single file in CSV format) and loads the data into a specified table in a target database.\n\nThe parameter `columnKeynames` is not used when only inserting (`mode=2`) and may be omitted in that case."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -403,6 +408,7 @@ export class DBLookup extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Executes a SQL statement on a database and returns the first field of the first result matching the specified criteria.\n\nThe returned data value is always a string.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/database-functions/#databasefunctions-dblookup)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -465,6 +471,7 @@ export class DBLookupAll extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Executes a SQL statement on a database and returns the results matching the specified criteria.\n\nThe returned data is always returned as a two-dimensional array of strings.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/database-functions/#databasefunctions-dblookupall)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -517,6 +524,7 @@ export class DBRollbackTransaction extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Rolls back the current transaction and closes the Database connection.\n\nThe database used in this function call must be defined as a database connection in the current project."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -550,6 +558,7 @@ export class DBWrite extends DBLoad { constructor() { super(); this.name = "DBWrite"; + this.docs = "An alias for the function `DBLoad`. See [`DBLoad`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/database-functions/#databasefunctions-dbload) for details."; } } @@ -557,7 +566,7 @@ export class DBWrite extends DBLoad { * The implementation of `SetDBInsert` function. * * Overrides the current setting of the insert/update mode to "insert" for the current record. - * The return value is null. + * The return value is `null`. */ export class SetDBInsert extends Func { constructor() { @@ -570,6 +579,7 @@ export class SetDBInsert extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Overrides the current setting of the insert/update mode to \"insert\" for the current record. The return value is `null`."; } call(args: RuntimeVal[], scope: Scope): never { @@ -590,7 +600,7 @@ export class SetDBInsert extends Func { * The implementation of `SetDBUpdate` function. * * Overrides the current setting of the insert/update mode to "update" for the current record. - * The return value is null. + * The return value is `null`. */ export class SetDBUpdate extends Func { constructor() { @@ -603,6 +613,7 @@ export class SetDBUpdate extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Overrides the current setting of the insert/update mode to \"update\" for the current record. The return value is `null`."; } call(args: RuntimeVal[], scope: Scope): never { @@ -645,6 +656,7 @@ export class SQLEscape extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Performs the necessary escaping of literal strings used in a SQL statement.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/database-functions/#databasefunctions-sqlescape)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -675,7 +687,7 @@ export class SQLEscape extends Func { * The implementation of `Unmap` function. * * For use in mappings, this function sets a database target field to be treated as unmapped. - * The return value is null. + * The return value is `null`. */ export class Unmap extends Func { constructor() { @@ -688,6 +700,7 @@ export class Unmap extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "For use in mappings, this function sets a database target field to be treated as unmapped. The return value is `null`."; } call(args: RuntimeVal[], scope: Scope): never { diff --git a/src/api/functions/datetime.ts b/src/api/functions/datetime.ts index 0fbb217..59a388c 100644 --- a/src/api/functions/datetime.ts +++ b/src/api/functions/datetime.ts @@ -36,6 +36,7 @@ export class ConvertTimeZone extends Func { new Parameter("bool", "ignoreDST", false, new JbBool(false)), ]) ]; + this.docs = "Take a date and returns it converted from one time zone to another time zone."; } call(args: RuntimeVal[], scope: Scope): never { @@ -102,7 +103,7 @@ export class ConvertTimeZone extends Func { /** * The implementation of `CVTDate` function. * - * Converts a date object or date string in the input format to a date string in the output format. + * Converts a `date` object or date string in the input format to a date string in the output format. */ export class CVTDate extends Func { constructor() { @@ -123,6 +124,7 @@ export class CVTDate extends Func { new Parameter("string", "outputFormat") ]), ]; + this.docs = "Converts a date object or date string in the input format to a date string in the output format."; } call(args: RuntimeVal[], scope: Scope): never { @@ -199,6 +201,7 @@ export class DateAdd extends Func { new Parameter("string", "d") ]), ]; + this.docs = "Returns a date string after adding a number to a specified part of a date object."; } call(args: RuntimeVal[], scope: Scope): never { @@ -271,6 +274,7 @@ export class DayOfMonth extends Func { new Parameter("string", "d") ]), ]; + this.docs = "Returns the day of the month (1-31) of a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { @@ -345,6 +349,7 @@ export class DayOfWeek extends Func { new Parameter("string", "d") ]), ]; + this.docs = "Returns the day of the week for a date object or date string, with 0 for Sunday, 1 for Monday, on through 6 for Saturday.\n\nThis definition is independent of locale. For the weekday name, call [`FormatDate`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-formatdate) instead."; } call(args: RuntimeVal[], scope: Scope) { @@ -419,6 +424,7 @@ export class FormatDate extends Func { new Parameter("string", "format"), ]), ]; + this.docs = "Converts a date object to a string according to a format string. This is similar to the [`CVTDate`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-cvtdate) function and uses the same format strings."; } call(args: RuntimeVal[], scope: Scope): never { @@ -488,6 +494,7 @@ export class GeneralDate extends Func { new Signature("string", [new Parameter("date", "d")]), new Signature("string", [new Parameter("string", "d")]), ]; + this.docs = "Returns a string in the [general date format](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-format-strings) for a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { @@ -569,6 +576,7 @@ export class GetUTCFormattedDate extends Func { new Parameter("bool", "is_european_format", false) ]) ]; + this.docs = "Returns a date string without time information. Converts a date object or date string to a string according to a time zone code."; } call(args: RuntimeVal[], scope: Scope): never { @@ -649,6 +657,7 @@ export class GetUTCFormattedDateTime extends Func { new Parameter("bool", "is_european_format", false) ]) ]; + this.docs = "Returns a date string with time information. Converts a date object or date string to a string according to a time zone code."; } call(args: RuntimeVal[], scope: Scope): never { @@ -724,6 +733,7 @@ export class LastDayOfMonth extends Func { new Signature("date", [new Parameter("date", "d")]), new Signature("date", [new Parameter("string", "d")]) ]; + this.docs = "Returns a date object representing the last day of the month for a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { @@ -803,6 +813,7 @@ export class LongDate extends Func { new Signature("string", [new Parameter("date", "d")]), new Signature("string", [new Parameter("string", "d")]) ]; + this.docs = "Returns a string in the [long date format](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-format-strings) for a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { @@ -940,6 +951,7 @@ export class LongTime extends Func { new Signature("string", [new Parameter("date", "d")]), new Signature("string", [new Parameter("string", "d")]) ]; + this.docs = "Returns a string in the [long time format](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-format-strings) for a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { @@ -1014,6 +1026,7 @@ export class MediumDate extends Func { new Signature("string", [new Parameter("date", "d")]), new Signature("string", [new Parameter("string", "d")]) ]; + this.docs = "Returns a string in the [medium date format](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-format-strings) for a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { @@ -1118,6 +1131,7 @@ export class MediumTime extends Func { new Signature("string", [new Parameter("date", "d")]), new Signature("string", [new Parameter("string", "d")]) ]; + this.docs = "Returns a string in the [medium time format](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-format-strings) for a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { @@ -1192,6 +1206,7 @@ export class MonthOfYear extends Func { new Signature("number", [new Parameter("date", "d")]), new Signature("number", [new Parameter("string", "d")]) ]; + this.docs = "Returns the month (1-12) for a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { @@ -1262,6 +1277,7 @@ export class Now extends Func { this.maxArgs = 0; this.signatures = [new Signature("date", [])]; this.signature = this.signatures[0]; + this.docs = "Returns a date object representing the date and time values at the moment the function was run. The fraction of the second is truncated."; } call(args: RuntimeVal[], scope: Scope) { @@ -1295,6 +1311,7 @@ export class Now_ extends Func { this.maxArgs = 0; this.signatures = [new Signature("date", [])]; this.signature = this.signatures[0]; + this.docs = "Returns a date object representing the date and time values at the moment the function was run. The time value includes the fraction of second (milliseconds)."; } call(args: RuntimeVal[], scope: Scope) { @@ -1331,6 +1348,7 @@ export class ShortDate extends Func { new Signature("string", [new Parameter("date", "d")]), new Signature("string", [new Parameter("string", "d")]) ]; + this.docs = "Returns a string in the [short date format](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-format-strings) for a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { @@ -1404,6 +1422,7 @@ export class ShortTime extends Func { new Signature("string", [new Parameter("date", "d")]), new Signature("string", [new Parameter("string", "d")]) ]; + this.docs = "Returns a string in the [short time format](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/date-and-time-functions/#dateandtimefunctions-format-strings) for a date object or date string."; } call(args: RuntimeVal[], scope: Scope) { diff --git a/src/api/functions/debug.ts b/src/api/functions/debug.ts index 70bc505..0e34cf6 100644 --- a/src/api/functions/debug.ts +++ b/src/api/functions/debug.ts @@ -8,10 +8,10 @@ import { Func, Parameter, Signature } from "../types"; /** * The implementation of `DebugBreak` function. * - * When passed an expression that evaluates to true, `DebugBreak()` causes - * execution control to returnto the client when testing a script, expression, + * When passed an expression that evaluates to `true`, `DebugBreak()` causes + * execution control to return to the client when testing a script, expression, * transformation, or operation. - * Returns true if execution was stopped; otherwise false is returned. + * Returns `true` if execution was stopped; otherwise `false` is returned. * * The input argument is optional: `DebugBreak()` is equivalent to `DebugBreak(true)`. * @@ -33,6 +33,7 @@ export class DebugBreak extends Func { ]) ]; this.signature = this.signatures[0]; + this.docs = "When passed an expression that evaluates to `true`, `DebugBreak()` causes execution control to return to the client when testing a script, expression, transformation, or operation.\n\nReturns `true` if execution was stopped; otherwise `false` is returned.\n\nThe input argument is optional: `DebugBreak()` is equivalent to `DebugBreak(true)`.\n\nFor more information, see [Script Testing](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/scripts/script-testing)."; } call(args: RuntimeVal[], scope: Scope) { diff --git a/src/api/functions/dict.ts b/src/api/functions/dict.ts index 127fd62..d6d1d85 100644 --- a/src/api/functions/dict.ts +++ b/src/api/functions/dict.ts @@ -11,7 +11,7 @@ import TypeEnv from "../../typechecker/environment"; * * Adds a value to a dictionary for a specific key. * - * The key must be a string or have a string representation, with null keys not allowed. Any value is allowed, even null values. + * The key must be a string or have a string representation, with `null` keys not allowed. Any value is allowed, even `null` values. * * Returns `true` if the value was added and the new key added to the dictionary or `false` if the key already existed and the value at that key was instead updated. If the first argument is not defined or is not a dictionary, it will be initialized to an empty dictionary before the value is added. * @@ -33,6 +33,7 @@ export class AddToDict extends Func { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Adds a value to a dictionary for a specific key.\n\nThe key must be a string or have a string representation, with `null` keys not allowed. Any value is allowed, even `null` values.\n\nReturns `true` if the value was added and the new key added to the dictionary or `false` if the key already existed and the value at that key was instead updated. If the first argument is not defined or is not a dictionary, it will be initialized to an empty dictionary before the value is added.\n\nAlso see [`Dict`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/dictionary-and-array-functions/#dictionaryandarrayfunctions-dict)."; } call(args: RuntimeVal[], scope: Scope) { @@ -97,6 +98,7 @@ export class CollectValues extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns an array containing the values corresponding to the names in the argument array, returned in the same order as the keys in the array."; } call(args: RuntimeVal[], scope: Scope) { @@ -156,6 +158,7 @@ export class GetKeys extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns an array of the keys in a dictionary. The argument must be an existing dictionary."; } call(args: RuntimeVal[], scope: Scope) { @@ -209,6 +212,7 @@ export class GetSourceInstanceMap extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns a dictionary (map) containing the attribute name and its value from an element node.\n\nAs an alternative to this function, see [`GetSourceInstanceArray`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/dictionary-and-array-functions/#dictionaryandarrayfunctions-getsourceinstancearray)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -254,6 +258,7 @@ export class GetSourceInstanceElementMap extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns a dictionary (map) containing the sub-element's value from an element node. As an alternative to this function, see [`GetSourceInstanceElementArray`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/dictionary-and-array-functions/#dictionaryandarrayfunctions-getsourceinstanceelementarray)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -291,6 +296,7 @@ export class Dict extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Creates an empty dictionary."; } call(args: RuntimeVal[], scope: Scope) { @@ -311,7 +317,8 @@ export class Dict extends Func { * The implementation of `HasKey` function. * * Checks whether a dictionary contains a specified key. Returns `false` if the first argument is not a dictionary or if the key was not found. - * As an equivalent function that works for arrays, see the examples of the `FindValue` function. + * + * As an equivalent function that works for arrays, see the examples of [`FindValue`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/instance-functions/#instancefunctions-findvalue). */ export class HasKey extends Func { constructor() { @@ -327,6 +334,7 @@ export class HasKey extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Checks whether a dictionary contains a specified key. Returns `false` if the first argument is not a dictionary or if the key was not found. As an equivalent function that works for arrays, see the examples of [`FindValue`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/instance-functions/#instancefunctions-findvalue)."; } call(args: RuntimeVal[], scope: Scope) { @@ -360,19 +368,20 @@ export class HasKey extends Func { /** * The implementation of `Map` function. * - * An alias for `Dict`. See the function `Dict`. + * An alias for `Dict`. See [`Dict`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/dictionary-and-array-functions/#dictionaryandarrayfunctions-dict). */ export class Map extends Dict { constructor() { super(); this.name = "Map"; + this.docs = "An alias for `Dict`. See [`Dict`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/dictionary-and-array-functions/#dictionaryandarrayfunctions-dict)."; } } /** * The implementation of `MapCache` function. * - * This function caches a key/value pair to a dictionary. + * Caches a key/value pair to a dictionary. * If the key already exists in the dictionary, the corresponding value will be returned; * otherwise, the third argument will be evaluated, and that value would be stored in the dictionary for the key. */ @@ -393,6 +402,7 @@ export class MapCache extends Func { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Caches a key/value pair to a dictionary.\n\nIf the key already exists in the dictionary, the corresponding value will be returned; otherwise, the third argument will be evaluated, and that value would be stored in the dictionary for the key." } call(args: RuntimeVal[], scope: Scope) { @@ -434,7 +444,8 @@ export class MapCache extends Func { * The implementation of `RemoveKey` function. * * Removes a key-value pair with a specific key from a dictionary. - * The key must be a string or have a string representation, and null values are not allowed. + * + * The key must be a string or have a string representation, and `null` values are not allowed. * Returns `true` if the key-value pair was removed and `false` if the key didn't exist. */ export class RemoveKey extends Func { @@ -451,6 +462,7 @@ export class RemoveKey extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Removes a key-value pair with a specific key from a dictionary.\n\nThe key must be a string or have a string representation, and `null` values are not allowed. Returns `true` if the key-value pair was removed and `false` if the key didn't exist."; } call(args: RuntimeVal[], scope: Scope) { diff --git a/src/api/functions/diff.ts b/src/api/functions/diff.ts index 39410f0..e07c8d9 100644 --- a/src/api/functions/diff.ts +++ b/src/api/functions/diff.ts @@ -21,6 +21,7 @@ export class DiffAdd extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Requests the added records as input for the next transformation that is run."; } call(args: RuntimeVal[], scope: Scope): never { @@ -41,6 +42,7 @@ export class DiffAdd extends Func { * The implementation of `DiffComplete` function. * * Flags the diff process as complete. + * * This method is to be called when the diff process completes successfully; * otherwise, the diff process will be left in an inconsistent state. * In that case, the next time the diff operation runs, no records will be processed. @@ -56,6 +58,7 @@ export class DiffComplete extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Flags the diff process as complete.\n\nThis method is to be called when the diff process completes successfully; otherwise, the diff process will be left in an inconsistent state. In that case, the next time the diff operation runs, no records will be processed."; } call(args: RuntimeVal[], scope: Scope): never { @@ -88,6 +91,7 @@ export class DiffDelete extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Requests the deleted records as input for the next transformation that is run."; } call(args: RuntimeVal[], scope: Scope): never { @@ -108,7 +112,8 @@ export class DiffDelete extends Func { * The implementation of `DiffKeyList` function. * * Sets the list of keys to be used for uniquely identifying a record in the diff source. - * This method is typically called in conjunction with the `InitializeDiff` function. + * + * This method is typically called in conjunction with [`InitializeDiff`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/diff-functions/#difffunctions-initializediff). * * Supports up to 100-argument calls. */ @@ -126,6 +131,7 @@ export class DiffKeyList extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 100; + this.docs = "Sets the list of keys to be used for uniquely identifying a record in the diff source.\n\nThis method is typically called in conjunction with [`InitializeDiff`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/diff-functions/#difffunctions-initializediff)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -175,6 +181,7 @@ export class DiffNode extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "For hierarchical sources, this specifies the node to be used as the repeating node that the diff is performed on."; } call(args: RuntimeVal[], scope: Scope): never { @@ -211,6 +218,7 @@ export class DiffUpdate extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Requests the updated records as input for the next transformation that is run."; } call(args: RuntimeVal[], scope: Scope): never { @@ -252,6 +260,7 @@ export class InitializeDiff extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Initializes a new diff session.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/diff-functions/#difffunctions-initializediff)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -303,6 +312,7 @@ export class OrderedDiffKeyList extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 100; + this.docs = "Sets the list of keys used for uniquely identifying a record in the source and specifies the key's record order as either ascending (`true`) or descending (`false`).\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/diff-functions/#difffunctions-ordereddiffkeylist)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -364,10 +374,10 @@ export class OrderedDiffKeyList extends Func { * * The `action` parameter (either 0 or 1) specifies how the diff session is to be reset: * - * `0` (Reset): Completely forgets the latest snapshot and starts over from the beginning. + * - `0` (Reset): Completely forgets the latest snapshot and starts over from the beginning. * This will force the system to treat all entries as "added". * - * `1` (Purge): Removes any files left over from a previous diff session.This does not reset + * - `1` (Purge): Removes any files left over from a previous diff session.This does not reset * the latest snapshot;it only clears stale files left from old, failed, or canceled diff sessions. * * This method is typically called when something has been changed in an existing diff process @@ -389,6 +399,7 @@ export class ResetDiff extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Resets an existing diff session. See full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/diff-functions/#difffunctions-resetdiff)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -433,6 +444,7 @@ export class SetDiffChunkSize extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Sets the chunk size (in bytes) used while diffing.\n\nA larger chunk size will make the system use more memory but it will process the diff faster. The default is 50000 bytes; if you have sufficient memory, you can increase this number.\n\nThis method is typically called in conjunction with [`InitializeDiff`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/diff-functions/#difffunctions-initializediff)."; } call(args: RuntimeVal[], scope: Scope): never { diff --git a/src/api/functions/email.ts b/src/api/functions/email.ts index a1d0b8c..d8285ff 100644 --- a/src/api/functions/email.ts +++ b/src/api/functions/email.ts @@ -9,6 +9,7 @@ import { AsyncFunc, Parameter, Signature } from "../types"; * The implementation of `SendEmail` function. * * Sends an email using the supplied information. + * * On success, an empty string is returned; otherwise, any error messages are returned. * * Only the first four parameters are required; the rest are optional. @@ -38,6 +39,7 @@ export class SendEmail extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 4; this.maxArgs = 11; + this.docs = "Sends an email using the supplied information.\n\nOn success, an empty string is returned; otherwise, any error messages are returned.\n\nIf information is not specified, it will be read from the server configuration file. If it is not available in the configuration file, the email will not be sent."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -111,6 +113,7 @@ export class SendEmail extends AsyncFunc { * The implementation of `SendEmailMessage` function. * * Sends an email using a predefined email notification. + * * On success, an empty string is returned; otherwise, any error messages are returned. * * The email message used in this function call must be defined as an email notification @@ -129,6 +132,7 @@ export class SendEmailMessage extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Sends an email using a predefined email notification.\n\nOn success, an empty string is returned; otherwise, any error messages are returned.\n\nThe email message used in this function call must be defined as an email notification in the current project.\n\nFor more information, see [Notifications](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/scripts/jitterbit-script#jitterbitscript-notifications)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -176,6 +180,7 @@ export class SendSystemEmail extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Sends an email using a pre-configured \"From\" address, SMTP servers, and account information. These are defined in the server configuration file. If not, use one of the other email functions.\n\nOn success, an empty string is returned; otherwise, any error messages are returned."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { diff --git a/src/api/functions/envinfo.ts b/src/api/functions/envinfo.ts index 8dff5c6..abf3dc6 100644 --- a/src/api/functions/envinfo.ts +++ b/src/api/functions/envinfo.ts @@ -21,6 +21,7 @@ export class GetAgentGroupID extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the ID of the agent group that the operation or expression is currently running in."; } call(args: RuntimeVal[], scope: Scope): never { @@ -53,6 +54,7 @@ export class GetAgentGroupName extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the name of the agent group that the operation or expression is currently running in."; } call(args: RuntimeVal[], scope: Scope): never { @@ -85,6 +87,7 @@ export class GetAgentID extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the ID of the agent that is running the operation or expression."; } call(args: RuntimeVal[], scope: Scope): never { @@ -117,6 +120,7 @@ export class GetAgentName extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the name of the agent that the operation or expression is currently running in."; } call(args: RuntimeVal[], scope: Scope): never { @@ -149,6 +153,7 @@ export class GetAgentVersionID extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the version ID of the agent that the operation or expression is currently running in."; } call(args: RuntimeVal[], scope: Scope): never { @@ -181,6 +186,7 @@ export class GetAgentVersionName extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the version name of the agent that the operation or expression is currently running in."; } call(args: RuntimeVal[], scope: Scope): never { @@ -213,6 +219,7 @@ export class GetEnvironmentID extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the ID of the environment that the operation or expression is currently running in."; } call(args: RuntimeVal[], scope: Scope): never { @@ -245,6 +252,7 @@ export class GetEnvironmentName extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the name of the environment that the operation or expression is currently running in."; } call(args: RuntimeVal[], scope: Scope): never { @@ -277,6 +285,7 @@ export class GetOrganizationID extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the ID of the organization that the operation or expression is currently running in."; } call(args: RuntimeVal[], scope: Scope): never { @@ -309,6 +318,7 @@ export class GetOrganizationName extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the name of the organization that the operation or expression is currently running in."; } call(args: RuntimeVal[], scope: Scope): never { diff --git a/src/api/functions/error.ts b/src/api/functions/error.ts index 5bd31a7..53f9991 100644 --- a/src/api/functions/error.ts +++ b/src/api/functions/error.ts @@ -36,6 +36,7 @@ export class GetLastError extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the last error reported in a script or transformation. It can be used with the `ResetError` and `Eval` functions for error handling.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/logging-and-error-functions/#logginganderrorfunctions-getlasterror)."; } call(args: RuntimeVal[], scope: Scope) { @@ -81,6 +82,7 @@ export class RaiseError extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Causes a script or transformation to fail, and the contents of the parameter message to be displayed in the error log."; } call(args: RuntimeVal[], scope: Scope): never { @@ -121,6 +123,7 @@ export class ResetLastError extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Sets the last error to an empty string. This is identical to calling `SetLastError(\"\")`.\n\nSee also [`SetLastError`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/logging-and-error-functions/#logginganderrorfunctions-setlasterror)."; } call(args: RuntimeVal[], scope: Scope) { @@ -161,6 +164,7 @@ export class SetLastError extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Sets a user-defined last error. The message will be logged as a warning and the `GetLastError` function will return the message unless another error occurs.\n\nSee also [`ResetLastError`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/logging-and-error-functions/#logginganderrorfunctions-resetlasterror)."; } call(args: RuntimeVal[], scope: Scope) { diff --git a/src/api/functions/file.ts b/src/api/functions/file.ts index fca72dd..b9da145 100644 --- a/src/api/functions/file.ts +++ b/src/api/functions/file.ts @@ -42,6 +42,7 @@ export class ArchiveFile extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 3; + this.docs = "Reads a file from a file-type source activity and writes it to a file-type target activity.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-archivefile)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -112,6 +113,7 @@ export class DeleteFile extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Deletes a file from the specified source.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-deletefile)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -183,6 +185,7 @@ export class DeleteFiles extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Deletes one or more files from the specified source.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-deletefiles)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -248,6 +251,7 @@ export class DirList extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 3; + this.docs = "Returns a list of directories contained in a source, optionally specifying a path and a filter to restrict the results.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-dirlist)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -317,6 +321,7 @@ export class FileList extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 3; + this.docs = "Returns a list of filenames contained in a source.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-filelist)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -376,6 +381,7 @@ export class FlushAllFiles extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 1; + this.docs = "Persists data written to file buffers with `WriteFile`.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-flushallfiles)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -439,6 +445,7 @@ export class FlushFile extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Persists data written to a file buffer with `WriteFile`.\n\nWhen `FlushFile` is called, the current contents of the buffer is written to the target and the local buffer is discarded.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-flushfile)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -510,6 +517,7 @@ export class ReadFile extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Reads the contents of a file from a source.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-readfile)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -580,6 +588,7 @@ export class WriteFile extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 3; + this.docs = "Writes the `fileContents` to the target specified by `targetId`.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/file-functions/#filefunctions-writefile)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { diff --git a/src/api/functions/general.ts b/src/api/functions/general.ts index a9476e7..7d2c7da 100644 --- a/src/api/functions/general.ts +++ b/src/api/functions/general.ts @@ -46,6 +46,7 @@ export class ArgumentList extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 100; + this.docs = "This function initializes a set of local variables from its argument list.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-argumentlist)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -98,6 +99,7 @@ export class AutoNumber extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the number of an instance within a particular hierarchy.\n\n**Warning**: This method has been deprecated and may be removed in a future version of Jitterbit. Use either the [`TargetInstanceCount`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-targetinstancecount) or [`SourceInstanceCount`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-sourceinstancecount) instead. `TargetInstanceCount` is equivalent to this function."; } call(args: RuntimeVal[], scope: Scope): never { @@ -140,6 +142,7 @@ export class CancelOperation extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Cancels a particular operation specified by the operation's reference path."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -167,9 +170,9 @@ export class CancelOperation extends AsyncFunc { /** * The implementation of `CancelOperationChain` function. * - * If the current operation has either success or failure operations, calling this method will - * cause those operations to be canceled. - * Any operations linked by a condition will also be canceled. + * If the current operation has either success or failure operations, calling this function will + * cause those operations to be cancelled. + * Any operations linked by a condition will also be cancelled. * However, any scripts in the current operation will be completed. * * This can be useful if an operation is running in a loop and the condition to stop @@ -186,6 +189,7 @@ export class CancelOperationChain extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "If the current operation has either success or failure operations, calling this function will cause those operations to be cancelled. Any operations linked by a condition will also be cancelled. However, any scripts in the current operation will be completed."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -242,6 +246,7 @@ export class Eval extends DeferrableFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Evaluates the first argument; if valid, its result is returned as a string. Otherwise, the default value is evaluated and its results are returned as a string.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-eval)."; } async callEval(args: Expr[], scope: Scope) { @@ -292,7 +297,7 @@ export class Eval extends DeferrableFunc { * the function retrieves a specific element by its index (or indices for a multi-dimensional * array such as a record-set) using the remaining arguments. * - * Arrays are zero-indexed; the first element is at index 0 and the last element + * Arrays are zero-indexed; the first element is at index `0` and the last element * (of the array `$array`) is at index `[Length($array)-1]`. * * Attempting to retrieve an element beyond the end of the array will result in @@ -315,6 +320,7 @@ export class Get extends Func { ]; this.minArgs = 1; this.maxArgs = 100; + this.docs = "Returns the value of a global variable with a given name. If passed an array or the name of a global variable that is an array, returns an element of the array. See also the complementary [`Set`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-set).\n\nIf the first argument is either an array or the name of a global variable that is an array, the function retrieves a specific element by its index (or indices for a multi-dimensional array such as a record-set) using the remaining arguments.\n\nArrays are zero-indexed; the first element is at index `0` and the last element (of the array `$array`) is at index `[Length($array)-1]`.\n\nAttempting to retrieve an element beyond the end of the array will result in a return value of `null`."; } call(args: RuntimeVal[], scope: Scope): never { @@ -376,6 +382,7 @@ export class Get extends Func { * The implementation of `GetChunkDataElement` function. * * Returns the value of the chunk variable with a given name. + * * A chunk variable is evaluated as each chunk of data is processed. * An alternative method is to use the `SCOPE_CHUNK` syntax of the `Set` function. * @@ -392,6 +399,7 @@ export class GetChunkDataElement extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the value of the chunk variable with a given name.\n\nA chunk variable is evaluated as each chunk of data is processed. An alternative method is to use the `SCOPE_CHUNK` syntax of the `Set` function.\n\nSee also the [`SetChunkDataElement`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-setchunkdataelement) and [`Set`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-set) functions."; } call(args: RuntimeVal[], scope: Scope): never { @@ -433,6 +441,7 @@ export class GetHostByIP extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Resolves an IP address to a host name."; } async callAsync(args: RuntimeVal[], scope: Scope) { @@ -477,7 +486,7 @@ export class GetHostByIP extends AsyncFunc { * Returns the unformatted input as a string given a source global variable. * * This is useful if the standard Jitterbit representation of a data type - * (such as a date or double) is not suitable and the "raw" input is required. + * (such as `date` or `double`) is not suitable and the "raw" input is required. * If this method is called on an object that is not a source global variable, * an empty string is returned. */ @@ -493,6 +502,7 @@ export class GetInputString extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the unformatted input as a string given a source global variable.\n\nThis is useful if the standard Jitterbit representation of a data type (such as `date` or `double`) is not suitable and the \"raw\" input is required. If this method is called on an object that is not a source global variable, an empty string is returned."; } call(args: RuntimeVal[], scope: Scope): never { @@ -538,6 +548,7 @@ export class GetLastOperationRunStartTime extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the last date and time the given operation was run.\n\nThe return value is a date (which includes the date and time).\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-getlastoperationrunstarttime)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -576,6 +587,7 @@ export class GetName extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the name of a variable or a global variable.\n\nCertain functions return a named global variable array; if defined, this function retrieves the name of the value."; } call(args: RuntimeVal[], scope: Scope): never { @@ -607,12 +619,12 @@ export class GetName extends Func { * * The result is returned as an array of arrays, with these elements in each sub-array: * - * - `0`: Operation GUID (string) - * - `1`: The IsExecuting flag (boolean) - * - `2`: Timestamp (date) for when the operation was added to the queue - * - `3`: Seconds in current status (integer) - * - `4`: Operation instance GUID (string) - * - `5`: Operation name (string) + * - `0`: Operation GUID (`string`) + * - `1`: The IsExecuting flag (`bool`) + * - `2`: Timestamp for when the operation was added to the queue (`date`) + * - `3`: Seconds in current status (`integer`) + * - `4`: Operation instance GUID (`string`) + * - `5`: Operation name (`string`) * * The operation tag argument is optional. * If the operation tag argument is present, only queue entries for that particular @@ -631,6 +643,7 @@ export class GetOperationQueue extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 1; + this.docs = "Returns the contents of the operation queue as an array. Only operations that the current user has read access for will be returned.\n\nThe result is returned as an array of arrays, with these elements in each sub-array:\n- `0`: Operation GUID (`string`)\n- `1`: The IsExecuting flag (`bool`)\n- `2`: Timestamp for when the operation was added to the queue (`date`)\n- `3`: Seconds in current status (`integer`)\n- `4`: Operation instance GUID (`string`)\n- `5`: Operation name (`string`)"; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -673,6 +686,7 @@ export class GetServerName extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the name of the machine that the agent is running on."; } call(args: RuntimeVal[], scope: Scope) { @@ -694,7 +708,7 @@ export class GetServerName extends Func { * * Returns a GUID string (a globally unique identifier, also known as a universally unique identifier or UUID). * - * The format of the GUID is `xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx`, where M is the version (4) and N is the variant (8). + * The format of the GUID is `xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx`, where `M` is the version (4) and `N` is the variant (8). */ export class GUID extends Func { constructor() { @@ -707,6 +721,7 @@ export class GUID extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns a GUID string (a globally unique identifier/UUID).\n\nThe format of the GUID is `xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx`, where `M` is the version (4) and `N` is the variant (8)."; } call(args: RuntimeVal[], scope: Scope) { @@ -749,6 +764,7 @@ export class IfEmpty extends DeferrableFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns the default value if the first argument is `null` or if the string representation of the argument is an empty string. Otherwise, it returns the first argument."; } async callEval(args: Expr[], scope: Scope) { @@ -805,7 +821,7 @@ export class IfEmpty extends DeferrableFunc { /** * The implementation of `IfNull` function. * - * Returns the default value if the first argument is null, else returns the first argument. + * Returns the default value if the first argument is `null`, else returns the first argument. * * This is a shortcut for an `If` function statement: * @@ -827,6 +843,7 @@ export class IfNull extends DeferrableFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns the default value if the first argument is `null`, else returns the first argument.\n\nSee also [`IsNull`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-isnull) and [`IfEmpty`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-ifempty)."; } async callEval(args: Expr[], scope: Scope) { @@ -900,6 +917,7 @@ export class InitCounter extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Initializes a counter, optionally passing an initial value.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-initcounter)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -952,11 +970,11 @@ export class InitCounter extends Func { * Checks for `x` in the list of arguments (`arg1` through `argN`). * If a match (by value) is found, this function will return an integer representing * the position of the match in the list, with the first position in the list being - * represented by the integer 1. + * represented by the integer `1`. * * If the list contains more than one instance of `x`, this function returns the position * of the first match (the match with the lowest position index). - * 0 is returned if the list does not contain a matching value or if only + * `0` is returned if the list does not contain a matching value or if only * a single argument is supplied. */ export class InList extends Func { @@ -973,6 +991,7 @@ export class InList extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 100; + this.docs = "Checks for `x` in the list of arguments (`arg1` through `argN`). If a match (by value) is found, this function will return an integer representing the position of the match in the list, with the first position in the list being represented by the integer `1`.\n\nIf the list contains more than one instance of `x`, this function returns the position of the first match (the match with the lowest position index). `0` is returned if the list does not contain a matching value or if only a single argument is supplied."; } call(args: RuntimeVal[], scope: Scope): never { @@ -1007,7 +1026,7 @@ export class InList extends Func { /** * The implementation of `IsInteger` function. * - * Returns true if the argument is of type integer or long or can be converted to + * Returns `true` if the argument is of type `integer` or `long` or can be converted to * an integer or long without any loss of information. */ export class IsInteger extends Func { @@ -1021,6 +1040,7 @@ export class IsInteger extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns `true` if the argument is of type `integer` or `long` or can be converted to an integer or long without any loss of information."; } call(args: RuntimeVal[], scope: Scope) { @@ -1066,6 +1086,7 @@ export class IsNull extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns `true` if the argument is `null`. Applies to database fields, variables, and functions that can return nulls.\n\nSee also [`IfNull`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-ifnull) and [`IfEmpty`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-ifempty)."; } call(args: RuntimeVal[], scope: Scope) { @@ -1091,7 +1112,7 @@ export class IsNull extends Func { /** * The implementation of `IsValid` function. * - * Returns true if the evaluation of the argument results without an error. + * Returns `true` if the evaluation of the argument results without an error. */ export class IsValid extends DeferrableFunc { constructor() { @@ -1104,6 +1125,7 @@ export class IsValid extends DeferrableFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns `true` if the evaluation of the argument results without an error."; } async callEval(args: Expr[], scope: Scope) { @@ -1147,7 +1169,7 @@ export class IsValid extends DeferrableFunc { * - `array`: the number of elements in the array is returned * - `binary`: the number of bytes is returned * - for all other types, an attempt is made to convert the argument to a string, and the length of the resulting string is returned. - * - if the argument cannot be converted to a string, or the argument is `null` or of an unknown type, 0 is returned. + * - if the argument cannot be converted to a string, or the argument is `null` or of an unknown type, `0` is returned. */ export class Length extends Func { constructor() { @@ -1160,6 +1182,7 @@ export class Length extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the length of the input argument.\n\nThe behavior of this method depends on the argument type:\n- `string`: the length of the string is returned\n- `array`: the number of elements in the array is returned\n- `binary`: the number of bytes is returned\n- for all other types, an attempt is made to convert the argument to a string, and the length of the resulting string is returned.\n- if the argument cannot be converted to a string, or the argument is `null` or of an unknown type, `0` is returned."; } call(args: RuntimeVal[], scope: Scope) { @@ -1197,7 +1220,7 @@ export class Length extends Func { /** * The implementation of `Null` function. * - * Returns null. + * Returns `null`. */ export class Null extends Func { constructor() { @@ -1210,6 +1233,7 @@ export class Null extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns `null`."; } call(args: RuntimeVal[], scope: Scope) { @@ -1246,6 +1270,7 @@ export class Random extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Generates a random integer number between and including the given minimum and maximum values.\n\nSee also [`RandomString`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-randomstring)."; } call(args: RuntimeVal[], scope: Scope) { @@ -1280,7 +1305,7 @@ export class Random extends Func { * The implementation of `RandomString` function. * * Generates a random string of the given length. - * By default, the function uses alphanumeric characters; the set that includes a-z, A-Z, and 0-9. + * By default, the function uses alphanumeric characters; the set that includes `a-z`, `A-Z`, and `0-9`. * See also the `Random` function. */ export class RandomString extends Func { @@ -1297,6 +1322,7 @@ export class RandomString extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Generates a random string of the given length.\n\nBy default, the function uses alphanumeric characters; the set that includes `a-z`, `A-Z`, and `0-9`.\n\nSee also [`Random`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-random)."; } call(args: RuntimeVal[], scope: Scope) { @@ -1361,6 +1387,7 @@ export class ReadArrayString extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Reads a string that represents a single or multi-dimensional array.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-readarraystring)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -1396,8 +1423,8 @@ export class ReadArrayString extends Func { * * If it is called in a condition, it returns the instance number of the last instance that * was generated. - * The first time this method is called in a loop it returns 0 (zero) if called in a condition; - * otherwise, it returns 1 (one). The counter is reset to 0 each time a new loop is started. + * The first time this method is called in a loop it returns `0` if called in a condition; + * otherwise, it returns 1. The counter is reset to `0` each time a new loop is started. */ export class RecordCount extends Func { constructor() { @@ -1410,6 +1437,7 @@ export class RecordCount extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the instance number of the target loop that is currently being generated.\n\nIf it is called in a condition, it returns the instance number of the last instance that was generated. The first time this method is called in a loop it returns `0` if called in a condition; otherwise, it returns 1. The counter is reset to `0` each time a new loop is started."; } call(args: RuntimeVal[], scope: Scope): never { @@ -1452,6 +1480,7 @@ export class ReRunOperation extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 1; + this.docs = "Re-runs the current operation.\n\nThe behavior of this method with respect to return value and global variables is identical to [`RunOperation`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-runoperation)."; } async callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -1501,6 +1530,7 @@ export class RunOperation extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Runs an operation synchronously or asynchronously, with synchronous being the default.\n\nThe operation used in this function call must be defined as an operation in the current project."; } async callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -1558,6 +1588,7 @@ export class RunPlugin extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Runs a specified plugin and then continues execution of the current script. If multiple versions of a plugin are installed on an agent, the highest available version is used.\n\nReturns `true` if the plugin completes without errors. Returns `false` if the plugin could not be run or the plugin implementation itself returned an error."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -1593,7 +1624,7 @@ export class RunPlugin extends AsyncFunc { * For more information, see the instructions on inserting scripts under * *Jitterbit Script* or *JavaScript*. * - * A list of values can be passed to a `RunScript` function as input variables. + * A list of values can be passed to a `RunScript` call as input variables. * The script will create local variables using these values with default names such as `_1`, `_2` .... * * If comprehensive names are preferred, the `ArgumentList` function can be used to map a list @@ -1617,6 +1648,7 @@ export class RunScript extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 100; + this.docs = "Runs the specified script and then continues execution of the current script. This method returns, on success, the return value of the called script as a string.\n\nThe script used in this function call must be defined as either a [Jitterbit Script](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/scripts/jitterbit-script) or [JavaScript](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/scripts/javascript) in the current project.\n\nA list of values can be passed to a `RunScript` call as input variables, see [`ArgumentList`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-argumentlist)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -1680,6 +1712,7 @@ export class Set extends Func { ]; this.minArgs = 2; this.maxArgs = 100; + this.docs = "Sets the value of a global variable with a given name to a value, and returns the value.\n\nSee also the complementary [`Get`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-get)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -1771,6 +1804,7 @@ export class SetChunkDataElement extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Sets the value of a specified chunk variable, and returns the value.\n\nA chunk variable is evaluated as each chunk of data is processed.\n\nAn alternative method is to use the `SCOPE_CHUNK` syntax of [`Set`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-set).\n\nSee also [`GetChunkDataElement`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-getchunkdataelement)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -1816,6 +1850,7 @@ export class Sleep extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Causes execution to be suspended for a specified number of seconds."; } async callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -1855,7 +1890,7 @@ export class Sleep extends AsyncFunc { * The value is independent of whether the target instance has been generated or not; * the same value is returned if called in a condition script or in a mapping script. * - * When the first source instance is used as the generator, 1 is returned, then 2, and so forth. + * When the first source instance is used as the generator, `1` is returned, then `2`, and so forth. * * See also the `TargetInstanceCount` function. */ @@ -1870,6 +1905,7 @@ export class SourceInstanceCount extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the instance count of the most recent generator.\n\nThe value is independent of whether the target instance has been generated or not; the same value is returned if called in a condition script or in a mapping script.\n\nWhen the first source instance is used as the generator, `1` is returned, then `2`, and so forth.\n\nSee also [`TargetInstanceCount`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-targetinstancecount)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -1896,8 +1932,8 @@ export class SourceInstanceCount extends Func { * The number returned by this method will be one less if it is called in a condition since, * in a condition, it is not known if the current target instance will be generated or not. * - * When the first target instance is generated, 1 is returned, then 2, and so forth. - * If called in a condition, the sequence will instead be 0, 1, and so forth. + * When the first target instance is generated, `1` is returned, then `2`, and so forth. + * If called in a condition, the sequence will instead be `0`, `1`, and so forth. * * See also the `SourceInstanceCount` function. */ @@ -1912,6 +1948,7 @@ export class TargetInstanceCount extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the instance count of a generating target loop node.\n\nWhen called in a condition it returns the number of target instances that have been generated so far for the current loop node. The number returned by this method will be one less if it is called in a condition since, in a condition, it is not known if the current target instance will be generated or not.\n\nWhen the first target instance is generated, `1` is returned, then `2`, and so forth. If called in a condition, the sequence will instead be `0`, `1`, and so forth.\n\nSee also [`SourceInstanceCount`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-sourceinstancecount)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -1970,6 +2007,7 @@ export class WaitForOperation extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 3; + this.docs = "Stops execution of a script or mapping until all instances of the specified operation currently in the operation queue have finished processing. This method is useful if you want to add many instances of an operation to the queue for parallel processing and then wait for all of them to finish.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-waitforoperation)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { diff --git a/src/api/functions/instance.ts b/src/api/functions/instance.ts index a14a846..9e956a6 100644 --- a/src/api/functions/instance.ts +++ b/src/api/functions/instance.ts @@ -10,7 +10,7 @@ import { Func, Parameter, Signature } from "../types"; * The implementation of `Count` function. * * Counts all instances of a data element at a particular hierarchical level - * in a source or target, where that data element contains a valid value (and is not null). + * in a source or target, where that data element contains a valid value (and is not `null`). * * The function returns either an integer or an array of instances, * depending on the context in which it is called. @@ -26,6 +26,7 @@ export class Count extends Func { ]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Counts all instances of a data element at a particular hierarchical level in a source or target, where that data element contains a valid value (and is not `null`).\n\nThe function returns either an integer or an array of instances, depending on the context in which it is called."; } call(args: RuntimeVal[], scope: Scope): never { @@ -73,7 +74,7 @@ export class Count extends Func { * Returns the number of source instances for a target node, * when the target node is referring to a parent of a mapping field. * - * If the target node is not a loop node, the function returns 1. + * If the target node is not a loop node, the function returns `1`. * See also the `SourceInstanceCount` function. */ export class CountSourceRecords extends Func { @@ -87,6 +88,7 @@ export class CountSourceRecords extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the number of source instances for a target node, when the target node is referring to a parent of a mapping field.\n\nIf the target node is not a loop node, the function returns `1`. See also [`SourceInstanceCount`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-sourceinstancecount)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -130,6 +132,7 @@ export class Exist extends Func { ]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Checks for the existence of a value (`v`) in instances of a data element (`de`) or an array (`arr`) and returns `true` (or `false`) depending if it is found.\n\nThe function returns either a boolean or an array of instances, depending on the context in which it is called."; } call(args: RuntimeVal[], scope: Scope): never { @@ -205,6 +208,7 @@ export class FindByPos extends Func { ]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns the value of a data element from an instance that occurs multiple times. It can also be used to return an element of an array, in a 1-based fashion.\n\nIf a negative number is specified for the occurrence or array, counting will begin from the last row or element. Note that the index is 1-based."; } call(args: RuntimeVal[], scope: Scope): never { @@ -254,6 +258,7 @@ export class FindByPos extends Func { * The implementation of `FindValue` function. * * Searches multiple instances of a data element (`de1`) looking for the value specified in `v`. + * * If the function finds the value, it returns the value in the field specified in * the third parameter (`de2`) for that found instance. * If the value is not found, the function returns `null`. @@ -274,6 +279,7 @@ export class FindValue extends Func { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Searches multiple instances of a data element (`de1`) looking for the value specified in `v`.\n\nIf the function finds the value, it returns the value in the field specified in the third parameter (`de2`) for that found instance. If the value is not found, the function returns `null`.\n\n See also [`HasKey`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/dictionary-and-array-functions/#dictionaryandarrayfunctions-haskey)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -343,6 +349,7 @@ export class GetInstance extends Func { this.signature = this.signatures[0]; this.minArgs = 0; this.maxArgs = 0; + this.docs = "Returns the instance data element which was defined by calling [`SetInstances`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/instance-functions/#instancefunctions-setinstances) function during the generation of the parent.\n\nAs an alternative to this function, see [`ArgumentList`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/general-functions/#generalfunctions-argumentlist)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -378,6 +385,7 @@ export class Max extends Func { ]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the maximum value of instances of a data element at a particular level in the hierarchy of a data structure.\n\nIt can also be used to return the maximum value of an array."; } call(args: RuntimeVal[], scope: Scope): never { @@ -457,6 +465,7 @@ export class Min extends Func { ]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the minimum value of instances of a data element at a particular level in the hierarchy of a data structure.\n\nIt can also be used to return the minimum value of an array."; } call(args: RuntimeVal[], scope: Scope): never { @@ -535,6 +544,7 @@ export class ResolveOneOf extends Func { ]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the first non-null value from instances of a data element.\n\nThis function is generally used for retrieving the value of a \"one-of\" source data element. It can also be used with arrays, and will return the first non-null element."; } call(args: RuntimeVal[], scope: Scope): never { @@ -627,6 +637,7 @@ export class SetInstances extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Defines the source instances for a target loop node.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/instance-functions/#instancefunctions-setinstances)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -691,6 +702,7 @@ export class SortInstances extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 100; + this.docs = "Sorts the generation of target loop data elements based on one or more data elements in the source or target.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/instance-functions/#instancefunctions-sortinstances)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -752,7 +764,7 @@ export class SortInstances extends Func { * The data type of both `de` and `arr` must be one of integer, long, float, double, or string. * The data types of all instances or all elements must be the same. * - * If the array is empty, 0 (zero) is returned. + * If the array is empty, `0` is returned. * Though null values will be ignored in arrays with another data type, * an array with just nulls will return an error. */ @@ -767,6 +779,7 @@ export class Sum extends Func { ]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Takes the value of each instance of a data element at a particular hierarchical level and returns the sum.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/instance-functions/#instancefunctions-sum)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -849,6 +862,7 @@ export class SumCSV extends Func { ]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Concatenates each instance of a field of a data element or each element of an array, with a comma delimiter between each instance or element.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/instance-functions/#instancefunctions-sumcsv)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -919,6 +933,7 @@ export class SumString extends Func { ]; this.minArgs = 1; this.maxArgs = 3; + this.docs = "Concatenates each instance of the specified data elements or each element of an array, with a delimiter automatically appended to the end of each concatenated string.\n\nIf the parameter `omitLast` is `true`, the delimiter after the last string is omitted.\n\nSee also [`SumCSV`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/instance-functions/#instancefunctions-sumcsv)."; } call(args: RuntimeVal[], scope: Scope): never { diff --git a/src/api/functions/ldap.ts b/src/api/functions/ldap.ts index 2326740..06c6985 100644 --- a/src/api/functions/ldap.ts +++ b/src/api/functions/ldap.ts @@ -24,6 +24,7 @@ export class ArrayToMultipleValues extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Signals that an array should be used to populate a multiple-valued LDAP attribute when mapping to an LDAP target. The array is converted to XML and interpreted when the LDAP server is written to."; } call(args: RuntimeVal[], scope: Scope): never { @@ -70,6 +71,7 @@ export class LDAPAdd extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "After a connection is established, `LDAPAdd` is used to add entries and attributes to the connected LDAP directory. The value is added to the node specified in `LDAPExecute`, which should be called immediately afterwards to have the changes take effect.\n\nSee also [`LDAPConnect`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapconnect) and [`LDAPExecute`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapexecute)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -122,6 +124,7 @@ export class LDAPConnect extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 5; + this.docs = "Connects to a directory using LDAP.\n\nSee also [`LDAPExecute`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapexecute)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -185,6 +188,7 @@ export class LDAPDeleteEntry extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "After a connection is established, `LDAPDeleteEntry` is used to remove an entry specified by a distinguished name.\n\nSee also [`LDAPConnect`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapconnect) and [`LDAPExecute`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapexecute)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -219,7 +223,7 @@ export class LDAPDeleteEntry extends AsyncFunc { * to execute one or more modifications (add, remove, replace) that have previously been * specified with the `LDAPAdd`, `LDAPRemove`, or `LDAPReplace` functions. * - * See also the `LDAPConnect` and `LDAPExecute` functions. + * See also `LDAPConnect`. */ export class LDAPExecute extends AsyncFunc { constructor() { @@ -232,6 +236,7 @@ export class LDAPExecute extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "After a connection is established, `LDAPExecute` is used to execute one or more modifications (add, remove, replace) that have previously been specified with [`LDAPAdd`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapadd), [`LDAPRemove`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapremove), or [`LDAPReplace`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapreplace).\n\nSee also [`LDAPConnect`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapconnect)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -266,6 +271,7 @@ export class LDAPExecute extends AsyncFunc { * of a specified type and with a specified value. * * If the attribute type of that value is not found, an error is thrown. + * * See also the `LDAPConnect` and `LDAPExecute` functions. */ export class LDAPRemove extends AsyncFunc { @@ -282,6 +288,7 @@ export class LDAPRemove extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Once a connection is established, `LDAPRemove` is used to remove an attribute of a specified type and with a specified value.\n\nIf the attribute type of that value is not found, an error is thrown.\n\nSee also [`LDAPConnect`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapconnect) and [`LDAPExecute`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapexecute)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -337,6 +344,7 @@ export class LDAPRename extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 4; + this.docs = "Once a connection is established, `LDAPRename` is used to change the distinguished name of an entry in the connected directory.\n\nSee also [`LDAPConnect`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapconnect) and [`LDAPExecute`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapexecute)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -400,6 +408,7 @@ export class LDAPReplace extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Once a connection is established, `LDAPReplace` is used to replace an existing attribute's value with a new value.\n\nSee also [`LDAPConnect`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapconnect) and [`LDAPExecute`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapexecute)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -458,6 +467,7 @@ export class LDAPSearch extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 4; this.maxArgs = 100; + this.docs = "Once a connection is established, `LDAPSearch` is used to search within the connected directory.\n\nSee also [`LDAPConnect`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapconnect) and [`LDAPExecute`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/ldap-functions/#ldapfunctions-ldapexecute)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { diff --git a/src/api/functions/log.ts b/src/api/functions/log.ts index 91ef79a..3fb3053 100644 --- a/src/api/functions/log.ts +++ b/src/api/functions/log.ts @@ -21,6 +21,7 @@ export class WriteToOperationLog extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Writes a message to the operation log."; } call(args: RuntimeVal[], scope: Scope) { diff --git a/src/api/functions/logical.ts b/src/api/functions/logical.ts index 0320475..f5a9aae 100644 --- a/src/api/functions/logical.ts +++ b/src/api/functions/logical.ts @@ -12,7 +12,7 @@ import { DeferrableFunc, Func, Parameter, Signature } from "../types"; * The implementation of `Case` function. * * This function evaluates pairs of arguments: if the evaluation of the expression - * in the first argument of a pair is true, it stops checking and returns the second argument + * in the first argument of a pair is `true`, it stops checking and returns the second argument * with the type preserved. Otherwise it will check the next pair, and so on. * If none of the pairs evaluate to `true`, `null` is returned. * @@ -37,6 +37,7 @@ export class Case extends DeferrableFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 100; + this.docs = "This function evaluates pairs of arguments: if the evaluation of the expression in the first argument of a pair is `true`, it stops checking and returns the second argument with the type preserved. Otherwise it will check the next pair, and so on. If none of the pairs evaluate to `true`, `null` is returned.\n\nTo create a default or fall-through case, use `true` and the desired return value as the last pair."; } async callEval(args: Expr[], scope: Scope) { @@ -96,7 +97,7 @@ export class Case extends DeferrableFunc { * The implemetation of `Equal` function. * * Performs a recursive comparison of two arrays. - * Returns true if all corresponding members of the arrays are equal, otherwise it returns false. + * Returns `true` if all corresponding members of the arrays are equal, otherwise it returns `false`. * It can also be used with simple types, and follows conversion rules to promote * different types to compare them. * @@ -130,6 +131,7 @@ export class Equal extends Func { ]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Performs a recursive comparison of two arrays. Returns `true` if all corresponding members of the arrays are equal, otherwise it returns `false`. It can also be used with simple types, and follows conversion rules to promote different types to compare them.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/logical-functions/#logicalfunctions-equal)."; } call(args: RuntimeVal[], scope: Scope) { @@ -203,8 +205,8 @@ export class Equal extends Func { * * Returns `trueResult` if condition is `true`, else it returns `falseResult`. * - * If the first argument (condition) is not a boolean data type, it is converted to a boolean before it is evaluated. - * If the optional third argument is not specified and condition is `false`, a `null` value is returned. + * If the first argument (`condition`) is not a boolean data type, it is converted to a boolean before it is evaluated. + * If the optional third argument is not specified and `condition` is `false`, a `null` value is returned. */ export class If extends DeferrableFunc { constructor() { @@ -221,6 +223,7 @@ export class If extends DeferrableFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 3; + this.docs = "Returns `trueResult` if condition is `true`, else it returns `falseResult`.\n\nIf the first argument (`condition`) is not a boolean data type, it is converted to a boolean before it is evaluated.\n\nIf the optional third argument is not specified and `condition` is `false`, a `null` value is returned."; } async callEval(args: Expr[], scope: Scope) { @@ -271,7 +274,7 @@ export class If extends DeferrableFunc { /** * The implementation of `While` function. * - * Repeatedly executes an expression as long as a condition is true. + * Repeatedly executes an expression as long as a condition is `true`. * * The Jitterbit variable `jitterbit.scripting.while.max_iterations` limits * the number of iterations. @@ -291,6 +294,7 @@ export class While extends DeferrableFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Repeatedly executes an expression as long as a condition is `true`.\n\nThe Jitterbit variable `jitterbit.scripting.while.max_iterations` limits the number of iterations. An error is reported if the maximum number of iterations is reached."; } async callEval(args: Expr[], scope: Scope) { diff --git a/src/api/functions/math.ts b/src/api/functions/math.ts index 1c20189..dd79f8b 100644 --- a/src/api/functions/math.ts +++ b/src/api/functions/math.ts @@ -10,7 +10,7 @@ import { Func, Parameter, Signature } from "../types"; * The implementation of `Ceiling` function. * * Returns the mathematical ceiling (rounded up to the nearest integer) of a given value as an integer. - * The argument should be a double and is first converted to a double if not. + * The argument should be a `double` and is first converted to a `double` if not. */ export class Ceiling extends Func { constructor() { @@ -23,6 +23,7 @@ export class Ceiling extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the mathematical ceiling (rounded up to the nearest integer) of a given value as an integer. The argument should be a `double` and is first converted to a `double` if not."; } call(args: RuntimeVal[], scope: Scope) { @@ -46,8 +47,8 @@ export class Ceiling extends Func { /** * The implementation of `Exp` function. * - * Returns the mathematical result e^d, or e to the power of d. - * The argument should be a double and is first converted to a double if not. + * Returns the mathematical result e^`d`, or e to the power of `d`. + * The argument should be a `double` and is first converted to a `double` if not. */ export class Exp extends Func { constructor() { @@ -60,6 +61,7 @@ export class Exp extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the mathematical result e^`d`, or e to the power of `d`. The argument should be a `double` and is first converted to a `double` if not."; } call(args: RuntimeVal[], scope: Scope) { @@ -84,7 +86,7 @@ export class Exp extends Func { * The implementation of `Floor` function. * * Returns the mathematical floor (rounded down to the nearest integer) of a given value as an integer. - * The argument should be a double and is first converted to a double if not. + * The argument should be a `double` and is first converted to a `double` if not. */ export class Floor extends Func { constructor() { @@ -97,6 +99,7 @@ export class Floor extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the mathematical floor (rounded down to the nearest integer) of a given value as an integer. The argument should be a `double` and is first converted to a `double` if not."; } call(args: RuntimeVal[], scope: Scope) { @@ -121,7 +124,7 @@ export class Floor extends Func { * The implementation of `Log` function. * * Returns the natural log (logarithm to the base e) of a given value. - * The argument should be a double and is first converted to a double if not. + * The argument should be a `double` and is first converted to a `double` if not. */ export class Log extends Func { constructor() { @@ -134,6 +137,7 @@ export class Log extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the natural log (logarithm to the base e) of a given value. The argument should be a `double` and is first converted to a `double` if not."; } call(args: RuntimeVal[], scope: Scope) { @@ -162,7 +166,7 @@ export class Log extends Func { /** * The implementation of `Log10` function. * - * Returns the logarithm to the base 10 of a given value. The argument should be a double and is first converted to a double if not. + * Returns the logarithm to the base 10 of a given value. The argument should be a `double` and is first converted to a `double` if not. */ export class Log10 extends Func { constructor() { @@ -175,6 +179,7 @@ export class Log10 extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the logarithm to the base 10 of a given value. The argument should be a `double` and is first converted to a `double` if not."; } call(args: RuntimeVal[], scope: Scope) { @@ -205,7 +210,7 @@ export class Log10 extends Func { * * Calculates the modulus (the remainder) of the division of the numerator by the denominator. * The return value has the same sign as the numerator. - * If the denominator is 0, the numerator is returned. + * If the denominator is `0`, the numerator is returned. */ export class Mod extends Func { constructor() { @@ -221,6 +226,7 @@ export class Mod extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Calculates the modulus (the remainder) of the division of the numerator by the denominator. The return value has the same sign as the numerator. If the denominator is `0`, the numerator is returned."; } call(args: RuntimeVal[], scope: Scope) { @@ -254,10 +260,10 @@ export class Mod extends Func { /** * The implementation of `Pow` function. * - * Returns the mathematical result base^exponent, or base to the power of exponent. - * The arguments should be doubles and are first converted to doubles if not. + * Returns the mathematical result `base^exponent`, or base to the power of exponent. + * The arguments should be `double` and are first converted to `double` if not. * - * `Pow(0, 0)` returns 1. + * `Pow(0, 0)` returns `1`. */ export class Pow extends Func { constructor() { @@ -273,6 +279,7 @@ export class Pow extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns the mathematical result `base^exponent`, or base to the power of exponent. The arguments should be `double` and are first converted to `double` if not."; } call(args: RuntimeVal[], scope: Scope) { @@ -304,7 +311,7 @@ export class Pow extends Func { * The implementation of `Round` function. * * Returns the given value rounded to a specified precision and then converted to a string. - * The argument should be a double and is first converted to a double if not. + * The argument should be a `double` and is first converted to a `double` if not. * This function is designed for displaying values (not computing) as the output is a string. * * This function is similar to the String `Format` function. @@ -323,6 +330,7 @@ export class Round extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Returns the given value rounded to a specified precision and then converted to a string. The argument should be a `double` and is first converted to a `double` if not. This function is designed for displaying values (not computing) as the output is a string."; } call(args: RuntimeVal[], scope: Scope) { @@ -371,7 +379,7 @@ export class Round extends Func { * The implementation of `RoundToInt` function. * * Returns the given value rounded to the nearest integer (no decimal places). - * The argument should be a double and is first converted to a double if not. + * The argument should be a `double` and is first converted to a `double` if not. */ export class RoundToInt extends Func { constructor() { @@ -386,6 +394,7 @@ export class RoundToInt extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the given value rounded to the nearest integer (no decimal places). The argument should be a `double` and is first converted to a `double` if not."; } call(args: RuntimeVal[], scope: Scope) { @@ -410,7 +419,7 @@ export class RoundToInt extends Func { * The implementation of `Sqrt` function. * * Returns the square root of a given value. - * The argument should be a double and is first converted to a double if not. + * The argument should be a `double` and is first converted to a `double` if not. * * This implementation throws instead of returning `-nan` for negative input. */ @@ -427,6 +436,7 @@ export class Sqrt extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the square root of a given value. The argument should be a `double` and is first converted to a `double` if not."; } call(args: RuntimeVal[], scope: Scope) { diff --git a/src/api/functions/netsuite.ts b/src/api/functions/netsuite.ts index 6bf8f7e..311a703 100644 --- a/src/api/functions/netsuite.ts +++ b/src/api/functions/netsuite.ts @@ -10,11 +10,11 @@ import { AsyncFunc, Parameter, Signature } from "../types"; * * Retrieves the picklist values for a field from NetSuite. * - * The function response is a dictionary (map), where: + * The function response is a `dictionary` (map), where: * - * 1. The dictionary keys are the picklist values. + * - The dictionary keys are the picklist values. * - * 2. The dictionary values are a map with two elements: the internal ID and the external ID for each picklist. + * - The dictionary values are a map with two elements: the internal ID and the external ID for each picklist. */ export class NetSuiteGetSelectValue extends AsyncFunc { constructor() { @@ -32,6 +32,7 @@ export class NetSuiteGetSelectValue extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 4; + this.docs = "Retrieves the picklist values for a field from NetSuite.\n\nThe function response is a `dictionary` (map), where:\n- The dictionary keys are the picklist values.\n- The dictionary values are a map with two elements: the internal ID and the external ID for each picklist."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -84,6 +85,7 @@ export class NetSuiteGetServerTime extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Retrieves the server date-time from a NetSuite server."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -127,6 +129,7 @@ export class NetSuiteLogin extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Retrieves a new session ID from a NetSuite endpoint for use in REST or SOAP calls that are used outside of the NetSuite connector. This provides a simple way to log in to NetSuite without requiring authentication headers for each web service call."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { diff --git a/src/api/functions/salesforce.ts b/src/api/functions/salesforce.ts index b02d002..791d7bb 100644 --- a/src/api/functions/salesforce.ts +++ b/src/api/functions/salesforce.ts @@ -41,6 +41,7 @@ export class GetSalesforceTimestamp extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 3; + this.docs = "Retrieves the current system time from Salesforce.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/salesforce-functions/#salesforcefunctions-getsalesforcetimestamp)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -117,6 +118,7 @@ export class LoginToSalesforceAndGetTimeStamp extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Logs in to Salesforce using a Salesforce endpoint and retrieves the current system time from Salesforce.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/salesforce-functions/#salesforcefunctions-logintosalesforceandgettimestamp)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -178,6 +180,7 @@ export class SalesforceLogin extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Logs into Salesforce, using the specified Salesforce endpoint.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/salesforce-functions/#salesforcefunctions-salesforcelogin)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -243,6 +246,7 @@ export class SetSalesforceSession extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Sets Salesforce session information for the specified Salesforce endpoint.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/salesforce-functions/#salesforcefunctions-setsalesforcesession)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -306,6 +310,7 @@ export class SfCacheLookup extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Logs into Salesforce (if necessary) and retrieves the result of the query from Salesforce.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/salesforce-functions/#salesforcefunctions-sfcachelookup)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -364,6 +369,7 @@ export class SfLookup extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Logs into Salesforce (if necessary) and retrieves the result of the query from Salesforce. Only the value from the first field of the first record is returned.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/salesforce-functions/#salesforcefunctions-sflookup)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -429,6 +435,7 @@ export class SfLookupAll extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Logs into Salesforce (if necessary) and retrieves the result of the query from Salesforce. The returned array is two-dimenional; an array of records, with each record an array of named fields.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/salesforce-functions/#salesforcefunctions-sflookupall)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -460,8 +467,7 @@ export class SfLookupAll extends AsyncFunc { /** * The implementation of `SfLookupAllToFile` function. * - * Logs into Salesforce (if necessary) and writes the results - * from Salesforce query to a CSV file. + * Logs into Salesforce (if necessary) and writes the results from Salesforce query to a CSV file. * The function returns the number of records retrieved. * * The login call is made using the credentials in the specified Salesforce endpoint. @@ -495,6 +501,7 @@ export class SfLookupAllToFile extends AsyncFunc { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Logs into Salesforce (if necessary) and writes the results from Salesforce query to a CSV file. Returns the number of retrieved records.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/salesforce-functions/#salesforcefunctions-sflookupalltofile)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { diff --git a/src/api/functions/string.ts b/src/api/functions/string.ts index a2c0e4d..5e0d258 100644 --- a/src/api/functions/string.ts +++ b/src/api/functions/string.ts @@ -25,6 +25,7 @@ export class CountSubString extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns the number of times a sub-string appears in a string."; } call(args: RuntimeVal[], scope: Scope) { @@ -80,6 +81,7 @@ export class DQuote extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Places a string in double quotes and returns the result. Embedded double quotes are not escaped."; } call(args: RuntimeVal[], scope: Scope) { @@ -132,6 +134,7 @@ export class Format extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns a string in the format specified by a format string.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-format)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -199,6 +202,7 @@ export class Index extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 3; + this.docs = "Returns the position of a sub-string within a string.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-index)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -230,9 +234,9 @@ export class Index extends Func { /** * The implementation of `IsValidString` function. * - * Returns true if each character in a string is valid. - * Valid characters are ASCII codes 32 through 126 inclusive and any of linefeed (LF), - * carriage return (CR), or tab (TAB) characters. + * Returns `true` if each character in a string is valid. + * Valid characters are ASCII codes 32 through 126 inclusive and any of linefeed (`LF`), + * carriage return (`CR`), or tab (`TAB`) characters. */ export class IsValidString extends Func { constructor() { @@ -247,6 +251,7 @@ export class IsValidString extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns `true` if each character in a string is valid. Valid characters are ASCII codes 32 through 126 inclusive and any of linefeed (`LF`), carriage return (`CR`), or tab (`TAB`) characters."; } call(args: RuntimeVal[], scope: Scope) { @@ -296,6 +301,7 @@ export class Left extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns `n` characters of a string, counting from the left (the beginning) of a string.\n\nSee also [`Mid`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-mid) and [`Right`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-right)."; } call(args: RuntimeVal[], scope: Scope) { @@ -344,6 +350,7 @@ export class LPad extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Adds spaces to the left (the beginning) of a string until the string contains `n` characters. Strings containing `n` or more characters are truncated to `n` characters."; } call(args: RuntimeVal[], scope: Scope) { @@ -400,6 +407,7 @@ export class LPadChar extends Func { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Adds a padding character to the left (the beginning) of a string until the string contains `n` characters. Strings containing `n` or more characters are truncated to `n` characters."; } call(args: RuntimeVal[], scope: Scope) { @@ -460,6 +468,7 @@ export class LTrim extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Removes whitespace (spaces, tabs) from the left (the beginning) of a string and returns the remaining characters."; } call(args: RuntimeVal[], scope: Scope) { @@ -509,6 +518,7 @@ export class LTrimChars extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Removes any leading characters in a string from the left (the beginning) that match those in the trimming characters and returns the remaining characters.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-ltrimchars)."; } call(args: RuntimeVal[], scope: Scope) { @@ -568,6 +578,7 @@ export class Mid extends Func { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Returns a portion of a string, starting with the character at position `m` for a length of `n` characters."; } call(args: RuntimeVal[], scope: Scope) { @@ -622,6 +633,7 @@ export class ParseURL extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Parses a URL string and returns an array of decoded parameter values."; } call(args: RuntimeVal[], scope: Scope) { @@ -673,6 +685,7 @@ export class Quote extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Places a string in single quotes and returns the result. Embedded single quotes are not escaped."; } call(args: RuntimeVal[], scope: Scope) { @@ -737,6 +750,7 @@ export class RegExMatch extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 100; + this.docs = "Matches a regular expression with an input string, stores the marked sub-expressions in variables, and returns the number of matches.\n\nReturns the total number of marked sub-expressions (which could be more or less than the number of variables actually supplied). Any additional matches that exceed the number of variables supplied are discarded. If there are no matches, `-1` is returned.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-regexmatch)."; } call(args: RuntimeVal[], scope: Scope) { @@ -832,6 +846,7 @@ export class RegExReplace extends Func { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Replaces all sub-strings in a string that match an expression, using a specifed format to replace each sub-string. Any sections of the string that do not match the expression are passed through to the returned string unchanged.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-regexreplace)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -881,6 +896,7 @@ export class Replace extends Func { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Searches a string for sub-strings matching the `old` argument and replaces a matching sub-string with the `new` argument."; } call(args: RuntimeVal[], scope: Scope) { @@ -938,6 +954,7 @@ export class Right extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns `n` characters of a string, counting from the right (the end) of a string."; } call(args: RuntimeVal[], scope: Scope) { @@ -988,6 +1005,7 @@ export class RPad extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Adds spaces to the right (the end) of a string until the string contains `n` characters. Strings containing `n` or more characters are truncated to `n` characters."; } call(args: RuntimeVal[], scope: Scope) { @@ -1043,6 +1061,7 @@ export class RPadChar extends Func { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Adds a padding character to the right (the end) of a string until the string contains `n` characters. Strings containing `n` or more characters are truncated to `n` characters."; } call(args: RuntimeVal[], scope: Scope) { @@ -1103,6 +1122,7 @@ export class RTrim extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Removes whitespace (spaces, tabs) from the right (the end) of a string and returns the remaining characters."; } call(args: RuntimeVal[], scope: Scope) { @@ -1152,6 +1172,7 @@ export class RTrimChars extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Removes any trailing characters in a string from the end that match those in the trimming characters and returns the remaining characters.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-rtrimchars)."; } call(args: RuntimeVal[], scope: Scope) { @@ -1213,6 +1234,7 @@ export class Split extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Splits a string using a delimiter string, returning the result as an array.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-split)."; } call(args: RuntimeVal[], scope: Scope) { @@ -1272,6 +1294,7 @@ export class SplitCSV extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 3; + this.docs = "Splits a CSV-formatted string and returns an array with the individual column values.\n\nBy default, the delimiter is a comma (`,`) and the string qualifier is a double quote (`\"`). This can be changed by specifying the optional second and third arguments respectively."; } call(args: RuntimeVal[], scope: Scope): never { @@ -1333,6 +1356,7 @@ export class StringLength extends Func { ]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns the length of a string.\n\nThe function returns an array if the argument is an array, with each element of the returned array the length of the corresponding element of the argument array."; } call(args: RuntimeVal[], scope: Scope) { @@ -1387,6 +1411,7 @@ export class ToLower extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts all ASCII uppercase characters (A through Z, ASCII 65 through 90) in a string to lowercase."; } call(args: RuntimeVal[], scope: Scope) { @@ -1427,6 +1452,7 @@ export class ToProper extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts a string to proper case (the first letter of every word being capitalized). This is distinct from title case, which only capitalizes selected and longer words in a string."; } call(args: RuntimeVal[], scope: Scope): never { @@ -1465,6 +1491,7 @@ export class ToUpper extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Converts all ASCII lowercase characters (a through z, ASCII 97 through 122) in a string to uppercase."; } call(args: RuntimeVal[], scope: Scope) { @@ -1504,6 +1531,7 @@ export class Trim extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Removes whitespace from the beginning and end of a string and returns the remaining characters."; } call(args: RuntimeVal[], scope: Scope) { @@ -1553,6 +1581,7 @@ export class TrimChars extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Removes any leading or trailing characters in a string that match those in the trimming characters and returns the remaining characters.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-trimchars)."; } call(args: RuntimeVal[], scope: Scope) { @@ -1625,6 +1654,7 @@ export class Truncate extends Func { this.signature = this.signatures[0]; this.minArgs = 3; this.maxArgs = 3; + this.docs = "Deletes `firstChars` characters from the left (the beginning) and `lastChars` characters from the right (the end) of a string and returns the remaining string."; } call(args: RuntimeVal[], scope: Scope) { @@ -1678,6 +1708,7 @@ export class URLDecode extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Parse a URL string and return the decoded value of the URL parameter with the specified name. The case of the name is ignored. If the name is not found in parameters of the URL, an empty string (`\"\"`) is returned."; } call(args: RuntimeVal[], scope: Scope) { @@ -1748,6 +1779,7 @@ export class URLEncode extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Encodes a string following RFC 1738.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/string-functions/#stringfunctions-urlencode)."; } call(args: RuntimeVal[], scope: Scope) { diff --git a/src/api/functions/text.ts b/src/api/functions/text.ts index b712bbc..d101f6a 100644 --- a/src/api/functions/text.ts +++ b/src/api/functions/text.ts @@ -39,6 +39,7 @@ export class Validate extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 3; + this.docs = "This function is intended to be called from a script used for text validation. It provides for that validation script the same validation as can be defined for a text document file format.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/text-validation-functions/#textvalidationfunctions-validate)."; } call(args: RuntimeVal[], scope: Scope): never { diff --git a/src/api/functions/xml.ts b/src/api/functions/xml.ts index ad847c7..cc17f92 100644 --- a/src/api/functions/xml.ts +++ b/src/api/functions/xml.ts @@ -32,6 +32,7 @@ export class Attribute extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Creates an attribute for an XML node. See also [`CreateNode`](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-createnode)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -92,6 +93,7 @@ export class CreateNode extends Func { this.minArgs = 2; // POD: subelement limit this.maxArgs = 100; + this.docs = "Creates a string representing an XML node.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-createnode)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -151,6 +153,7 @@ export class GetNodeName extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Retrieves the name of a node.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-getnodename)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -199,6 +202,7 @@ export class GetNodeValue extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Retrieves the value of a node.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-getnodevalue)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -248,6 +252,7 @@ export class GetXMLString extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 2; + this.docs = "Returns (when used in a transformation mapping) the corresponding XML string found in the source XML document at the specified path.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-getxmlstring)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -277,7 +282,7 @@ export class GetXMLString extends Func { * The implementation of `IsNil` function. * * Returns (when used in a Formula Builder mapping) if the corresponding XML node has - * the attribute `xsi:nil` with the value of true (or 1). + * the attribute `xsi:nil` with the value of `true` (or `1`). * * To enter a path to a node into the function for the path parameter, * drag and drop the desired XML node folder from the Source Objects tab @@ -301,6 +306,7 @@ export class IsNil extends Func { this.signature = this.signatures[0]; this.minArgs = 1; this.maxArgs = 1; + this.docs = "Returns (when used in a Formula Builder mapping) if the corresponding XML node has the attribute `xsi:nil` with the value of `true` (or `1`).\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-isnil)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -353,6 +359,7 @@ export class RunXSLT extends AsyncFunc { this.minArgs = 2; // POD: XML document limit this.maxArgs = 100; + this.docs = "Supports running [XSLT](https://www.w3.org/TR/xslt-30/) on a number of input XML documents. Takes as input an XSLT stylesheet and one or more XML documents and returns an array of XML documents.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-runxslt)."; } callAsync(args: RuntimeVal[], scope: Scope): Promise { @@ -397,7 +404,7 @@ export class RunXSLT extends AsyncFunc { /** * The implementation of `SelectNodeFromXMLAny` function. * - * Returns the first XML node from a list of XML Any nodes that match the node name. + * Returns the first XML node from a list of XML `Any` nodes that match the node name. * * To enter a path to an array of XML nodes into the function for the `anyNodes` parameter, * drag and drop the desired XML node folder from the Source Objects tab @@ -419,6 +426,7 @@ export class SelectNodeFromXMLAny extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 2; + this.docs = "Returns the first XML node from a list of XML `Any` nodes that match the node name.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-selectnodefromxmlany)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -481,6 +489,7 @@ export class SelectNodes extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 100; + this.docs = "Runs an [XPath](https://www.w3.org/TR/xpath-31/) query on either an XML fragment or an XML node returned from another function, and returns the results of the query.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-selectnodes)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -553,6 +562,7 @@ export class SelectNodesFromXMLAny extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 100; + this.docs = "Returns an array of all the XML nodes that are matched by an [XPath](https://www.w3.org/TR/xpath-31/) query run against either a path of a value node of an XML Any element or an array of XML nodes.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-selectnodesfromxmlany)."; } call(args: RuntimeVal[], scope: Scope): never { @@ -630,6 +640,7 @@ export class SelectSingleNode extends Func { this.signature = this.signatures[0]; this.minArgs = 2; this.maxArgs = 100; + this.docs = "Runs an [XPath](https://www.w3.org/TR/xpath-31/) query on either an XML fragment or an XML node returned from another function, and returns the first node in the results of the query.\n\nSee full documentation [here](https://success.jitterbit.com/cloud-studio/cloud-studio-reference/functions/xml-functions/#xmlfunctions-selectsinglenode)."; } call(args: RuntimeVal[], scope: Scope): never { diff --git a/src/api/types.ts b/src/api/types.ts index 377d231..94f230f 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -14,6 +14,7 @@ export abstract class Func { signature!: Signature; minArgs!: number; maxArgs!: number; + docs!: string; /** * Validates argument list and executes the function's implementation.