@workfront/api-constants
Version:
Definitions for all constants which can be used to interact with Workfront API
437 lines (436 loc) • 17.9 kB
TypeScript
/**
* Copyright 2016 Workfront
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Hovhannes Babayan <bhovhannes at gmail dot com>
*/
/**
* Prefix for identifying a Sort field. Value is "_1_Sort" for first sort field, "_2_Sort", "_3_Sort" ... "_n_Sort".
* @readonly
* @type {String}
*/
export declare const SORT = "_Sort";
/**
* Suffix for specifying expression operators (ApiConstants.Operators) on a field. Value is "_Mod".
* @readonly
* @type {String}
*/
export declare const MOD = "_Mod";
/**
* A delimiter which is used to separate field name and its order key.<br/>
* Can be used for filters, sorting, etc.<br/>
* Example: <code>{name_1_Sort: 'ASC', id_2_Sort: 'DESC'}</code>
* @readonly
* @type {String}
*/
export declare const ORDERDOT = "_";
/**
* Key used to specify the index of the first result to return starting with .
* @readonly
* @type {String}
*/
export declare const FIRST = "$$FIRST";
/**
* Key used to specify a limit on the number of results. If this key is present, the value is used.<br/>
* If this value cannot be parsed or if it is less than or equal to 0, no limit is enforced.<br/>
* Value is "$$LIMIT"<br/>
* @readonly
* @type {String}
*/
export declare const LIMIT = "$$LIMIT";
/**
* Prefix used to identify an Data Extension parameter in the Query framework.<br/>
* Used for retrieval of custom data fields.<br/>
* @readonly
* @type {String}
*/
export declare const DATAEXTENSION = "DE:";
/**
* Suffix for specifying which fields will be added to the GROUP BY clause in a ReportQuery. Value is "_GroupBy".
* @readonly
* @type {String}
*/
export declare const GROUPBY = "_GroupBy";
/**
* Suffix for specifying force "_GroupBy". Value is "$$_ForceGroupBy".
*/
export declare const FORCE_GROUPBY = "$$_ForceGroupBy";
/**
* Suffix for specifying aggregate functions in a ReportQuery. Value is "_AggFunc".
*/
export declare const AGGFUNC = "_AggFunc";
/**
* Suffix for specifying comma-separated list of aggregated currency fields for the report
*/
export declare const AGGCURRENCY_FIELDS = "$$AggCurr";
export declare const GROUPCURRENCY_FIELDS = "$$GroupCurr";
export declare const SORTCURRENCY_FIELDS = "$$SortCurr";
export declare const FILTERCURRENCY_FIELDS = "$$FilterCurr";
/**
* Key used to specify that a GROUP BY query should be done WITH ROLLUP. Value is "$$ROLLUP"
*/
export declare const ROLLUP = "$$ROLLUP";
/**
* Prefix for constants.
* @readonly
* @type {String}
*/
export declare const INTERNAL_PREFIX = "$$";
/**
* Values which can be used as wildcards
* @readonly
* @enum {String}
*/
export declare const WildCards: {
/**
* Wildcard value for midnight (12:00AM) of the current Date. Wildcards are useful for Saved Searches.<br/>
* If this value is passed in for any search value, it is replaced with the current date.<br/>
* The following suffixes can also be used to modify this date: [b/e][+/-][# of units]["h" (hour)|"d" (day)|"w" (week)|"m" (month)|"q" (quarter)|"y" (year)]<br/>
* <code>$$TODAY+1d</code> would equal 12:00AM of the next day<br/>
* <code>$$TODAY-1d</code> would equal 12:00AM of the previous day<br/>
* <code>$$TODAY+2w</code> would equal 12:00AM of 2 weeks from today<br/>
* <code>$$TODAY+2m</code> would equal 12:00AM of 2 months from today<br/>
* <code>$$TODAYb</code> "the beginning of today" would equal 12:00AM today<br/>
* <code>$$TODAYe</code> "the end of today" would equal 12:00AM tomorrow<br/>
* <code>$$TODAYbm</code> "the beginning of the month" would equal 12:00AM of the first day of the month<br/>
* <code>$$TODAYe+1w</code> "the end of next week" would equal 12:00AM Sunday following the Saturday of next week<br/>
* Value is "$$TODAY"<br/>
*/
TODAY: string;
/**
* Wildcard value for the current time of the current Date. Wildcards are useful for Saved Searches.<br/>
* If this value is passed in for any search value, it is replaced with the current date and time.<br/>
* The following suffixes can also be used to modify this date: [b/e][+/-][# of units]["h" (hour)|"d" (day)|"w" (week)|"m" (month)|"q" (quarter)|"y" (year)]<br/>
* <code>$$NOW+1d</code> would equal the same time on the next day<br/>
* <code>$$NOW-1d</code> would equal the same time on the previous day<br/>
* <code>$$NOW+2w</code> would equal the same time on 2 weeks from now<br/>
* <code>$$NOW+2m</code> would equal the same time on 2 months from now<br/>
* Value is "$$NOW"
*/
NOW: string;
/**
* Wildcard value for the currently authenticated User. Wildcards are useful for Saved Searches.<br/>
* If this value is passed in for any search value, it is replaced with an attribute from the current User.<br/>
* The following suffixes can be used: <code>.[ID(default)|homeGroupID|accessLevelID|categoryID|companyID|roleID|roleIDs|otherGroupIDs|accessLevelRank]</code><br/>
* <code>$$USER</code> would equal the current User's ID<br/>
* <code>$$USER.homeGroupID</code> would equal the current User's Home Group ID<br/>
* <code>$$USER.accessLevelID</code> would equal the current User's Access Level ID<br/>
* <code>$$USER.otherGroupIDs</code> would equal the all of the current User's Other Group IDs. This would translate into an "IN" clause for that queried field.<br/>
* <code>$$USER.roleIDs</code> would equal the all of the current User's Roles. This would translate into an "IN" clause for that queried field.<br/>
* <code>$$USER.roleID</code> would equal the all of the current User's Primary Role ID.<br/>
* Value is "$$USER"
*/
USER: string;
/**
* Wildcard value for the account Customer. Wildcards are useful for Saved Searches.<br/>
* If this value is passed in for any search value, it is replaced with an attribute from the Customer.<br/>
*/
CUSTOMER: string;
/**
* Wildcard value for the account representative User. Wildcards are useful for Saved Searches.<br/>
* If this value is passed in for any search value, it is replaced with an attribute from the Account representative.<br/>
*/
ACCOUNTREP: string;
};
/**
* How to sort the result
* @readonly
* @enum {String}
*/
export declare const SortOrder: {
/**
* Ascending Sort. Value is "asc".
*/
ASC: string;
/**
* Descending Sort. Value is "desc".
*/
DESC: string;
/**
* Case-Insensitive Ascending Sort. Value is "ciasc".
*/
CIASC: string;
/**
* Case-Insensitive Descending Sort. Value is "cidesc".
*/
CIDESC: string;
};
/**
* Modifiers which can be used with filters (Mod suffix)
* @readonly
* @enum {String}
*/
export declare const Operators: {
/**
* Produces the SQL expression <code>field < value</code>. Value is "lt".
*/
LESSTHAN: string;
/**
* Produces the SQL expression <code>field <= value</code>. Value is "lte".
**/
LESSTHANEQUAL: string;
/**
* Produces the SQL expression <code>field > value</code>. Value is "gt".
**/
GREATERTHAN: string;
/**
* Produces the SQL expression <code>field >= value</code>. Value is "gte".
**/
GREATERTHANEQUAL: string;
/**
* Produces the SQL expression <code>field = value</code><br/>
* Note that this is the default Modifier used when 1 value exists. Value is "eq".
**/
EQUAL: string;
/**
* Produces the SQL expression <code>UPPER(field) = UPPER(value)</code>. Value is "cieq".
**/
CIEQUAL: string;
/**
* Produces the SQL expression <code>field <> value or field is null</code>. Value is "ne".
**/
NOTEQUAL: string;
/**
* Produces the SQL expression <code>field <> value</code>. This differs from NOTEQUAL in that null results are not
* returned. Value is "nee".
**/
NOTEQUALEXACT: string;
/**
* Produces the SQL expression <code>UPPER(field) <> UPPER(value)</code>. Value is "cine".
**/
CINOTEQUAL: string;
/**
* Produces the SQL expression <code>field LIKE '%value%'</code>. Value is "contains".
**/
CONTAINS: string;
/**
* Produces the SQL expression <code>UPPER(field) LIKE UPPER('%value%')</code>. Value is "cicontains".
**/
CICONTAINS: string;
/**
* Produces the SQL expression <code>UPPER(field) LIKE UPPER('%value1%') OR UPPER(field) LIKE UPPER('%value2%') ... </code> where value1, value2, etc. are the results of value.split(" "). Value is "cicontainsany".
**/
CICONTAINSANY: string;
/**
* Produces the SQL expression <code>UPPER(field) LIKE UPPER('%value1%') AND UPPER(field) LIKE UPPER('%value2%') ... </code> where value1, value2, etc. are the results of value.split(" "). Value is "cicontainsany".
**/
CICONTAINSALL: string;
/**
* Produces the SQL expression <code>UPPER(field) LIKE UPPER('%value1%') AND UPPER(field) LIKE UPPER('%value2%') ... </code> where value1, value2, etc. are the results of value.split(" "). Value is "cicontainsany".
**/
CINOTCONTAINSALL: string;
/**
* Produces the SQL expression <code>UPPER(field) LIKE UPPER('%value1%') AND UPPER(field) LIKE UPPER('%value2%') ... </code> where value1, value2, etc. are the results of value.split(" "). Value is "cicontainsany".
**/
CINOTCONTAINSANY: string;
/**
* Produces the SQL expression <code>field NOT LIKE '%value%'</code>. Value is "notcontains".
**/
NOTCONTAINS: string;
/**
* Produces the SQL expression <code>UPPER(field) NOT LIKE UPPER('%value%')</code>. Value is "cinotcontains".
**/
CINOTCONTAINS: string;
/**
* Produces the SQL expression <code>field LIKE 'value'</code>
* where value can contain replacement characters such as % and _. Value is "like".
**/
LIKE: string;
/**
* Produces the SQL expression <code>UPPER(field) LIKE UPPER('value')</code>
* where value can contain replacement characters such as % and _. Value is "cilike".
**/
CILIKE: string;
/**
* Produces the SQL expression <code>UPPER(field) LIKE UPPER('value%')</code>. Value is "startswith".
**/
STARTSWITH: string;
/**
* Produces the SQL expression <code>SOUNDEX(field) = SOUNDEX(value)</code>. Value is "soundex".
**/
SOUNDEX: string;
/**
* Use of this Modifier requires the inclusion of a <code>value_Range</code> parameter.<br/>
* Produces the SQL expression <code>field BETWEEN value AND value_Range</code>.<br/>
* Note that this is the default Modifier used when a <code>_Range</code> value exists. Value is "between".
**/
BETWEEN: string;
/**
* Use of this Modifier required the inclusion of a <code>value_Range</code> parameter.<br/>
* Produces the SQL expression <code>UPPER(field) BETWEEN UPPER(value) AND UPPER(value_Range)</code>. Value is "cibetween".
**/
CIBETWEEN: string;
/**
* Use of this Modifier required the inclusion of a <code>value_Range</code> parameter.<br/>
* Produces the SQL expression <code>fieldNOT BETWEEN value AND value_Range</code>. Value is "notbetween".
**/
NOTBETWEEN: string;
/**
* Use of this Modifier required the inclusion of a <code>value_Range</code> parameter.<br/>
* Produces the SQL expression <code>UPPER(field)NOT BETWEEN UPPER(value) AND UPPER(value_Range)</code>. Value is "cinotbetween".
**/
CINOTBETWEEN: string;
/**
* Use of this Modifier assumes multiple <code>value</code> fields with different values.<br/>
* Produces the SQL expression <code>field IN ( value1, value2, ..., valuen)</code><br/>
* Note that this is the default Modifier used when multiple <code>value</code> fields exist. Value is "in".
**/
IN: string;
/**
* Use of this Modifier assumes multiple <code>value</code> fields with different values.<br/>
* Produces the SQL expression <code>UPPER(field) IN ( UPPER(value1), UPPER(value2), ..., UPPER(valuen))</code>
**/
CIIN: string;
/**
* Use of this Modifier assumes multiple <code>value</code> fields with different values.<br/>
* Produces the SQL expression <code>field NOT IN ( value1, value2, ..., valuen)</code>. Value is "notin".
**/
NOTIN: string;
/**
* Use of this Modifier assumes multiple <code>value</code> fields with different values.<br/>
* Produces the SQL expression <code>UPPER(field) NOT IN ( UPPER(value1), UPPER(value2), ..., UPPER(valuen))</code>
**/
CINOTIN: string;
/**
* Produces the SQL expression <code>field & value > 0</code>. Value is "bitwiseor".<br/>
* Useful for checking if any of a group of bits is set.
**/
BITWISE_OR: string;
/**
* Produces the SQL expression <code>field & value = value</code>. Value is "bitwiseand".<br/>
* Useful for checking if all of a group of bits is set.
**/
BITWISE_AND: string;
/**
* Produces the SQL expression <code>field & value = 0</code>. Value is "bitwisenand".<br/>
* Useful for checking if none of a group of bits is set.
**/
BITWISE_NAND: string;
/**
* By default, searches for a date value generate the following SQL filter <code>field between <00:00:00:000 of day> and <23:59:59:999 of day></code>.<br/>
* This is for convenience so that date searches return any match on items that fall on that date.<br/>
* However, if it is desired to find an exact match on a specific time of day as well as the date, this Modifier enforces that rule.<br/>
* The SQL filter generated by this Modifier is <code>field = value</code>. Value is "exacttime".
*/
EXACT_TIME: string;
/**
* Searches based on the string length of the given field.
*/
LENGTH_LT: string;
LENGTH_EQ: string;
LENGTH_GT: string;
/**
* Used for DE queries that allow multiple values.<br/>
* This Modifier requires that DE fields have all of the specified values. Value is "allof".
*/
ALLOF: string;
/**
* Produces the SQL expression <code>field IS NULL</code>.<br/>
* The <code>value</code> and <code>value_Mod</code> are both required, but the <code>value</code> is ignored. Value is "isnull".
*/
ISNULL: string;
/**
* Produces the SQL expression <code>field IS NOT NULL</code>.<br/>
* The <code>value</code> and <code>value_Mod</code> are both required, but the <code>value</code> is ignored. Value is "notnull".
*/
NOTNULL: string;
/**
* Produces the SQL expression <code>field IS NULL OR field = ''</code>.<br/>
* The <code>value</code> and <code>value_Mod</code> are both required, but the <code>value</code> is ignored. Value is "isblank".
*/
ISBLANK: string;
/**
* Produces the SQL expression <code>field IS NOT NULL AND field <> ''</code>.<br/>
* The <code>value</code> and <code>value_Mod</code> are both required, but the <code>value</code> is ignored. Value is "notblank".
*/
NOTBLANK: string;
};
/**
* Aggregate functions which can be used with the AGGFUNC suffix.
* @readonly
* @enum {String}
*/
export declare const Functions: {
/**
* Maximum value aggregate function.<br/>
* Can only be used with the AGGFUNC suffix. Value is "max".
*/
MAX: string;
/**
* Minimum value aggregate function.<br/>
* Can only be used with the AGGFUNC suffix. Value is "min".
**/
MIN: string;
/**
* Average value aggregate function.<br/>
* Can only be used with the AGGFUNC suffix. Value is "avg".
**/
AVG: string;
/**
* Summation aggregate function.
* Can only be used with the AGGFUNC suffix. Value is "sum".
**/
SUM: string;
/**
* Count aggregate function.<br/>
* Can only be used with the AGGFUNC suffix. Value is "count".
**/
COUNT: string;
/**
* Standard Deviation aggregate function.<br/>
* Can only be used with the AGGFUNC suffix. Value is "std".
**/
STD: string;
/**
* Variance aggregate function.<br/>
* Can only be used with the AGGFUNC suffix. Value is "var".
**/
VAR: string;
/**
* Maximum value aggregate function (distinct mode).<br/>
* Can only be used with the AGGFUNC suffix. Value is "dmax".
**/
DMAX: string;
/**
* Minimum value aggregate function (distinct mode).<br/>
* Can only be used with the AGGFUNC suffix. Value is "dmin".
**/
DMIN: string;
/**
* Average value aggregate function (distinct mode).<br/>
* Can only be used with the AGGFUNC suffix. Value is "davg".
**/
DAVG: string;
/**
* Summation aggregate function (distinct mode).<br/>
* Can only be used with the AGGFUNC suffix. Value is "dsum".
**/
DSUM: string;
/**
* Count aggregate function (distinct mode).<br/>
* Can only be used with the AGGFUNC suffix. Value is "dcount".
**/
DCOUNT: string;
/**
* Standard Deviation aggregate function (distinct mode).<br/>
* Can only be used with the AGGFUNC suffix. Value is "dstd".
**/
DSTD: string;
/**
* Variance aggregate function (distinct mode).<br/>
* Can only be used with the AGGFUNC suffix. Value is "dvar".
**/
DVAR: string;
};