@prismatic-io/spectral 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +55 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +73 -0
- package/dist/testing.d.ts +72 -0
- package/dist/testing.js +130 -0
- package/dist/types/ActionDefinition.d.ts +25 -0
- package/dist/types/ActionDefinition.js +2 -0
- package/dist/types/ActionInputParameters.d.ts +24 -0
- package/dist/types/ActionInputParameters.js +2 -0
- package/dist/types/ActionLogger.d.ts +20 -0
- package/dist/types/ActionLogger.js +8 -0
- package/dist/types/ActionPerformFunction.d.ts +14 -0
- package/dist/types/ActionPerformFunction.js +2 -0
- package/dist/types/AuthorizationDefinition.d.ts +14 -0
- package/dist/types/AuthorizationDefinition.js +19 -0
- package/dist/types/Credential.d.ts +58 -0
- package/dist/types/Credential.js +8 -0
- package/dist/types/DisplayDefinition.d.ts +26 -0
- package/dist/types/DisplayDefinition.js +5 -0
- package/dist/types/InputFieldType.d.ts +12 -0
- package/dist/types/InputFieldType.js +2 -0
- package/dist/types/Inputs.d.ts +37 -0
- package/dist/types/Inputs.js +2 -0
- package/dist/types/PerformReturn.d.ts +19 -0
- package/dist/types/PerformReturn.js +2 -0
- package/dist/types/conditional-logic.d.ts +91 -0
- package/dist/types/conditional-logic.js +67 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.js +27 -0
- package/dist/types/server-types.d.ts +135 -0
- package/dist/types/server-types.js +8 -0
- package/dist/util.d.ts +33 -0
- package/dist/util.js +337 -0
- package/dist/util.test.d.ts +1 -0
- package/dist/util.test.js +286 -0
- package/package.json +84 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Actions' perform functions receive a logger object as part of their first parameter.
|
|
3
|
+
* Types in this file define the shape of the logger that is passed to an action.
|
|
4
|
+
* For information on the logger object, see:
|
|
5
|
+
* https://prismatic.io/docs/custom-components/writing-custom-components#contextlogger
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A logger function, similar to `console.log()` or `console.error()`.
|
|
9
|
+
*/
|
|
10
|
+
export declare type ActionLoggerFunction = (...args: unknown[]) => void;
|
|
11
|
+
/**
|
|
12
|
+
* An object containing logger functions.
|
|
13
|
+
*/
|
|
14
|
+
export interface ActionLogger {
|
|
15
|
+
debug: ActionLoggerFunction;
|
|
16
|
+
info: ActionLoggerFunction;
|
|
17
|
+
log: ActionLoggerFunction;
|
|
18
|
+
warn: ActionLoggerFunction;
|
|
19
|
+
error: ActionLoggerFunction;
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Actions' perform functions receive a logger object as part of their first parameter.
|
|
4
|
+
* Types in this file define the shape of the logger that is passed to an action.
|
|
5
|
+
* For information on the logger object, see:
|
|
6
|
+
* https://prismatic.io/docs/custom-components/writing-custom-components#contextlogger
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Credential, Inputs, PerformReturn, ActionInputParameters, ActionLogger } from ".";
|
|
2
|
+
/** Definition of the function to perform when an Action is invoked. */
|
|
3
|
+
export declare type ActionPerformFunction<T extends Inputs, AllowsBranching extends boolean, ReturnData extends PerformReturn<AllowsBranching, unknown>> = (context: ActionContext, params: ActionInputParameters<T>) => Promise<ReturnData>;
|
|
4
|
+
/** Context provided to perform method containing helpers and contextual data */
|
|
5
|
+
export interface ActionContext {
|
|
6
|
+
/** Credential for the action, optional since not all actions will require a credential */
|
|
7
|
+
credential?: Credential;
|
|
8
|
+
/** Logger for permanent logging; console calls are also captured */
|
|
9
|
+
logger: ActionLogger;
|
|
10
|
+
/** A key/value store that may be used to store small amounts of data that is persisted between Instance executions */
|
|
11
|
+
instanceState: Record<string, unknown>;
|
|
12
|
+
/** A unique id that corresponds to the step on the Integration */
|
|
13
|
+
stepId: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Authorization settings for a component */
|
|
2
|
+
export interface AuthorizationDefinition {
|
|
3
|
+
/** Whether authorization is required */
|
|
4
|
+
required: boolean;
|
|
5
|
+
/** Supported authorization methods */
|
|
6
|
+
methods: AuthorizationMethod[];
|
|
7
|
+
}
|
|
8
|
+
declare const authorizationMethods: readonly ["basic", "api_key", "api_key_secret", "private_key", "oauth2", "oauth2_client_credentials"];
|
|
9
|
+
export declare type AuthorizationMethod = typeof authorizationMethods[number];
|
|
10
|
+
export declare const AvailableAuthorizationMethods: AuthorizationMethod[];
|
|
11
|
+
declare const oauth2AuthorizationMethods: readonly ["oauth2", "oauth2_client_credentials"];
|
|
12
|
+
export declare type OAuth2AuthorizationMethod = typeof oauth2AuthorizationMethods[number];
|
|
13
|
+
export declare const AvailableOAuth2AuthorizationMethods: OAuth2AuthorizationMethod[];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AvailableOAuth2AuthorizationMethods = exports.AvailableAuthorizationMethods = void 0;
|
|
4
|
+
const authorizationMethods = [
|
|
5
|
+
"basic",
|
|
6
|
+
"api_key",
|
|
7
|
+
"api_key_secret",
|
|
8
|
+
"private_key",
|
|
9
|
+
"oauth2",
|
|
10
|
+
"oauth2_client_credentials",
|
|
11
|
+
];
|
|
12
|
+
exports.AvailableAuthorizationMethods = [
|
|
13
|
+
...authorizationMethods,
|
|
14
|
+
];
|
|
15
|
+
const oauth2AuthorizationMethods = [
|
|
16
|
+
"oauth2",
|
|
17
|
+
"oauth2_client_credentials",
|
|
18
|
+
];
|
|
19
|
+
exports.AvailableOAuth2AuthorizationMethods = [...oauth2AuthorizationMethods];
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types defined in this file describe the shape of credentials
|
|
3
|
+
* that can be passed to actions' perform functions.
|
|
4
|
+
* Read about the credential object at:
|
|
5
|
+
* https://prismatic.io/docs/custom-components/writing-custom-components#contextcredential
|
|
6
|
+
*/
|
|
7
|
+
/** */
|
|
8
|
+
import { OAuth2AuthorizationMethod } from ".";
|
|
9
|
+
export declare type Credential = BasicCredential | ApiKeyCredential | ApiKeySecretCredential | PrivateKeyCredential | OAuth2Credential;
|
|
10
|
+
export interface BasicCredential {
|
|
11
|
+
authorizationMethod: "basic";
|
|
12
|
+
fields: {
|
|
13
|
+
username: string;
|
|
14
|
+
password: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface ApiKeyCredential {
|
|
18
|
+
authorizationMethod: "api_key";
|
|
19
|
+
fields: {
|
|
20
|
+
api_key: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface ApiKeySecretCredential {
|
|
24
|
+
authorizationMethod: "api_key_secret";
|
|
25
|
+
fields: {
|
|
26
|
+
api_key: string;
|
|
27
|
+
api_secret: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface PrivateKeyCredential {
|
|
31
|
+
authorizationMethod: "private_key";
|
|
32
|
+
fields: {
|
|
33
|
+
username: string;
|
|
34
|
+
private_key: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface OAuth2Credential {
|
|
38
|
+
authorizationMethod: OAuth2AuthorizationMethod;
|
|
39
|
+
redirectUri: string;
|
|
40
|
+
fields: {
|
|
41
|
+
client_id: string;
|
|
42
|
+
client_secret: string;
|
|
43
|
+
token_uri: string;
|
|
44
|
+
auth_uri?: string;
|
|
45
|
+
scopes?: string;
|
|
46
|
+
headers?: Record<string, string>;
|
|
47
|
+
};
|
|
48
|
+
token: {
|
|
49
|
+
access_token: string;
|
|
50
|
+
token_type: string;
|
|
51
|
+
refresh_token?: string;
|
|
52
|
+
expires_in?: string;
|
|
53
|
+
[key: string]: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
context: {
|
|
56
|
+
[key: string]: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Types defined in this file describe the shape of credentials
|
|
4
|
+
* that can be passed to actions' perform functions.
|
|
5
|
+
* Read about the credential object at:
|
|
6
|
+
* https://prismatic.io/docs/custom-components/writing-custom-components#contextcredential
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types in this file describe how an action or component should appear in the Prismatic web app.
|
|
3
|
+
*/
|
|
4
|
+
/** Base definition of Display properties. */
|
|
5
|
+
interface DisplayDefinition {
|
|
6
|
+
/** Label/name to display. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Description to display to the user. */
|
|
9
|
+
description: string;
|
|
10
|
+
}
|
|
11
|
+
interface ExtraDisplayDefinitionFields {
|
|
12
|
+
/** Path to icon to use for this Component. Path should be relative to component roto index. */
|
|
13
|
+
iconPath?: string;
|
|
14
|
+
/** Category of the Component. */
|
|
15
|
+
category?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Component extensions for display properties. */
|
|
18
|
+
export declare type ComponentDisplayDefinition<T extends boolean> = T extends true ? DisplayDefinition & Required<ExtraDisplayDefinitionFields> : DisplayDefinition & ExtraDisplayDefinitionFields;
|
|
19
|
+
/** Action-specific Display attributes. */
|
|
20
|
+
export interface ActionDisplayDefinition extends DisplayDefinition {
|
|
21
|
+
/** Directions to help guide the user if additional configuration is required for this Action. */
|
|
22
|
+
directions?: string;
|
|
23
|
+
/** Indicate that this Action is important and/or commonly used from the parent Component. Should be enabled sparingly. */
|
|
24
|
+
important?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConditionalExpression } from "./conditional-logic";
|
|
2
|
+
/** InputField type enumeration. */
|
|
3
|
+
export declare type InputFieldType = keyof InputFieldTypeMap;
|
|
4
|
+
export declare type InputFieldTypeMap = {
|
|
5
|
+
string: unknown;
|
|
6
|
+
data: unknown;
|
|
7
|
+
text: unknown;
|
|
8
|
+
password: unknown;
|
|
9
|
+
boolean: unknown;
|
|
10
|
+
code: unknown;
|
|
11
|
+
conditional: ConditionalExpression;
|
|
12
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InputFieldType } from ".";
|
|
2
|
+
export declare type Inputs = Record<string, InputFieldDefinition>;
|
|
3
|
+
export declare type InputFieldDefinition = DefaultInputFieldDefinition | CodeInputFieldDefinition;
|
|
4
|
+
/** Defines attributes of a InputField. */
|
|
5
|
+
export interface DefaultInputFieldDefinition {
|
|
6
|
+
/** Interface label of the InputField. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Data type the InputField will collect. */
|
|
9
|
+
type: InputFieldType;
|
|
10
|
+
/** Collection type of the InputField */
|
|
11
|
+
collection?: InputFieldCollection;
|
|
12
|
+
/** Text to show as the InputField placeholder. */
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/** Default value for this field. */
|
|
15
|
+
default?: string;
|
|
16
|
+
/** Additional text to give guidance to the user configuring the InputField. */
|
|
17
|
+
comments?: string;
|
|
18
|
+
/** Example valid input for this InputField. */
|
|
19
|
+
example?: string;
|
|
20
|
+
/** Indicate if this InputField is required. */
|
|
21
|
+
required?: boolean;
|
|
22
|
+
/** Dictates possible choices for the input. */
|
|
23
|
+
model?: InputFieldChoice[];
|
|
24
|
+
}
|
|
25
|
+
export interface CodeInputFieldDefinition extends DefaultInputFieldDefinition {
|
|
26
|
+
type: "code";
|
|
27
|
+
language?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Defines a single Choice option for a InputField. */
|
|
30
|
+
export interface InputFieldChoice {
|
|
31
|
+
/** Label to display for this Choice. */
|
|
32
|
+
label: string;
|
|
33
|
+
/** Value to use if this Choice is chosen. */
|
|
34
|
+
value: string;
|
|
35
|
+
}
|
|
36
|
+
/** InputField collection enumeration */
|
|
37
|
+
export declare type InputFieldCollection = "valuelist" | "keyvaluelist";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Used to represent a binary or serialized data return as content type must be specified */
|
|
2
|
+
export interface PerformDataReturn<ReturnData> {
|
|
3
|
+
/** Data payload containing data of the specified contentType */
|
|
4
|
+
data: ReturnData;
|
|
5
|
+
/** The Content Type of the payload data */
|
|
6
|
+
contentType?: string;
|
|
7
|
+
/** The HTTP Status code that will be used if this terminates a synchronous invocation */
|
|
8
|
+
statusCode?: number;
|
|
9
|
+
/** An optional object, the keys and values of which will be persisted in the instanceState and available for subsequent actions and executions */
|
|
10
|
+
state?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
/** Used to represent a branching return of conventional data and does not require content type to be specified */
|
|
13
|
+
/** Used to represent a binary or serialized data branching return as content type must be specified */
|
|
14
|
+
export interface PerformBranchingDataReturn<ReturnData> extends PerformDataReturn<ReturnData> {
|
|
15
|
+
/** Name of the Branch to take. */
|
|
16
|
+
branch: string;
|
|
17
|
+
}
|
|
18
|
+
/** Required return type of all action perform functions */
|
|
19
|
+
export declare type PerformReturn<AllowsBranching extends boolean, ReturnData extends unknown> = (AllowsBranching extends true ? PerformBranchingDataReturn<ReturnData> : PerformDataReturn<ReturnData>) | void;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains types to help define conditional logic for the Prismatic
|
|
3
|
+
* branch component, https://prismatic.io/docs/components/branch
|
|
4
|
+
*/
|
|
5
|
+
/** @ignore */
|
|
6
|
+
export declare enum BooleanOperator {
|
|
7
|
+
and = "and",
|
|
8
|
+
or = "or"
|
|
9
|
+
}
|
|
10
|
+
export declare const BooleanOperatorPhrase: string[];
|
|
11
|
+
export declare enum UnaryOperator {
|
|
12
|
+
isTrue = "isTrue",
|
|
13
|
+
isFalse = "isFalse",
|
|
14
|
+
doesNotExist = "doesNotExist",
|
|
15
|
+
exists = "exists"
|
|
16
|
+
}
|
|
17
|
+
export declare const UnaryOperatorPhrase: {
|
|
18
|
+
isTrue: string;
|
|
19
|
+
isFalse: string;
|
|
20
|
+
doesNotExist: string;
|
|
21
|
+
exists: string;
|
|
22
|
+
};
|
|
23
|
+
export declare enum BinaryOperator {
|
|
24
|
+
equal = "equal",
|
|
25
|
+
notEqual = "notEqual",
|
|
26
|
+
greaterThan = "greaterThan",
|
|
27
|
+
greaterThanOrEqual = "greaterThanOrEqual",
|
|
28
|
+
lessThan = "lessThan",
|
|
29
|
+
lessThanOrEqual = "lessThanOrEqual",
|
|
30
|
+
in = "in",
|
|
31
|
+
notIn = "notIn",
|
|
32
|
+
exactlyMatches = "exactlyMatches",
|
|
33
|
+
doesNotExactlyMatch = "doesNotExactlyMatch",
|
|
34
|
+
startsWith = "startsWith",
|
|
35
|
+
doesNotStartWith = "doesNotStartWith",
|
|
36
|
+
endsWith = "endsWith",
|
|
37
|
+
doesNotEndWith = "doesNotEndWith",
|
|
38
|
+
dateTimeAfter = "dateTimeAfter",
|
|
39
|
+
dateTimeBefore = "dateTimeBefore",
|
|
40
|
+
dateTimeSame = "dateTimeSame"
|
|
41
|
+
}
|
|
42
|
+
export declare const BinaryOperatorPhrase: {
|
|
43
|
+
equal: string;
|
|
44
|
+
notEqual: string;
|
|
45
|
+
greaterThan: string;
|
|
46
|
+
greaterThanOrEqual: string;
|
|
47
|
+
lessThan: string;
|
|
48
|
+
lessThanOrEqual: string;
|
|
49
|
+
in: string;
|
|
50
|
+
notIn: string;
|
|
51
|
+
exactlyMatches: string;
|
|
52
|
+
doesNotExactlyMatch: string;
|
|
53
|
+
startsWith: string;
|
|
54
|
+
doesNotStartWith: string;
|
|
55
|
+
endsWith: string;
|
|
56
|
+
doesNotEndWith: string;
|
|
57
|
+
dateTimeAfter: string;
|
|
58
|
+
dateTimeBefore: string;
|
|
59
|
+
dateTimeSame: string;
|
|
60
|
+
};
|
|
61
|
+
export declare type TermOperator = UnaryOperator | BinaryOperator;
|
|
62
|
+
export declare const TermOperatorPhrase: {
|
|
63
|
+
equal: string;
|
|
64
|
+
notEqual: string;
|
|
65
|
+
greaterThan: string;
|
|
66
|
+
greaterThanOrEqual: string;
|
|
67
|
+
lessThan: string;
|
|
68
|
+
lessThanOrEqual: string;
|
|
69
|
+
in: string;
|
|
70
|
+
notIn: string;
|
|
71
|
+
exactlyMatches: string;
|
|
72
|
+
doesNotExactlyMatch: string;
|
|
73
|
+
startsWith: string;
|
|
74
|
+
doesNotStartWith: string;
|
|
75
|
+
endsWith: string;
|
|
76
|
+
doesNotEndWith: string;
|
|
77
|
+
dateTimeAfter: string;
|
|
78
|
+
dateTimeBefore: string;
|
|
79
|
+
dateTimeSame: string;
|
|
80
|
+
isTrue: string;
|
|
81
|
+
isFalse: string;
|
|
82
|
+
doesNotExist: string;
|
|
83
|
+
exists: string;
|
|
84
|
+
};
|
|
85
|
+
export declare type Term = unknown;
|
|
86
|
+
export declare type TermExpression = [TermOperator, Term, Term?];
|
|
87
|
+
export declare type BooleanExpression = [
|
|
88
|
+
BooleanOperator.and | BooleanOperator.or,
|
|
89
|
+
...ConditionalExpression[]
|
|
90
|
+
];
|
|
91
|
+
export declare type ConditionalExpression = TermExpression | BooleanExpression;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file contains types to help define conditional logic for the Prismatic
|
|
4
|
+
* branch component, https://prismatic.io/docs/components/branch
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.TermOperatorPhrase = exports.BinaryOperatorPhrase = exports.BinaryOperator = exports.UnaryOperatorPhrase = exports.UnaryOperator = exports.BooleanOperatorPhrase = exports.BooleanOperator = void 0;
|
|
8
|
+
/** @ignore */
|
|
9
|
+
var BooleanOperator;
|
|
10
|
+
(function (BooleanOperator) {
|
|
11
|
+
BooleanOperator["and"] = "and";
|
|
12
|
+
BooleanOperator["or"] = "or";
|
|
13
|
+
})(BooleanOperator = exports.BooleanOperator || (exports.BooleanOperator = {}));
|
|
14
|
+
exports.BooleanOperatorPhrase = Object.keys(BooleanOperator);
|
|
15
|
+
var UnaryOperator;
|
|
16
|
+
(function (UnaryOperator) {
|
|
17
|
+
UnaryOperator["isTrue"] = "isTrue";
|
|
18
|
+
UnaryOperator["isFalse"] = "isFalse";
|
|
19
|
+
UnaryOperator["doesNotExist"] = "doesNotExist";
|
|
20
|
+
UnaryOperator["exists"] = "exists";
|
|
21
|
+
})(UnaryOperator = exports.UnaryOperator || (exports.UnaryOperator = {}));
|
|
22
|
+
exports.UnaryOperatorPhrase = {
|
|
23
|
+
[UnaryOperator.isTrue]: "is true",
|
|
24
|
+
[UnaryOperator.isFalse]: "is false",
|
|
25
|
+
[UnaryOperator.doesNotExist]: "does not exist",
|
|
26
|
+
[UnaryOperator.exists]: "exists",
|
|
27
|
+
};
|
|
28
|
+
var BinaryOperator;
|
|
29
|
+
(function (BinaryOperator) {
|
|
30
|
+
BinaryOperator["equal"] = "equal";
|
|
31
|
+
BinaryOperator["notEqual"] = "notEqual";
|
|
32
|
+
BinaryOperator["greaterThan"] = "greaterThan";
|
|
33
|
+
BinaryOperator["greaterThanOrEqual"] = "greaterThanOrEqual";
|
|
34
|
+
BinaryOperator["lessThan"] = "lessThan";
|
|
35
|
+
BinaryOperator["lessThanOrEqual"] = "lessThanOrEqual";
|
|
36
|
+
BinaryOperator["in"] = "in";
|
|
37
|
+
BinaryOperator["notIn"] = "notIn";
|
|
38
|
+
BinaryOperator["exactlyMatches"] = "exactlyMatches";
|
|
39
|
+
BinaryOperator["doesNotExactlyMatch"] = "doesNotExactlyMatch";
|
|
40
|
+
BinaryOperator["startsWith"] = "startsWith";
|
|
41
|
+
BinaryOperator["doesNotStartWith"] = "doesNotStartWith";
|
|
42
|
+
BinaryOperator["endsWith"] = "endsWith";
|
|
43
|
+
BinaryOperator["doesNotEndWith"] = "doesNotEndWith";
|
|
44
|
+
BinaryOperator["dateTimeAfter"] = "dateTimeAfter";
|
|
45
|
+
BinaryOperator["dateTimeBefore"] = "dateTimeBefore";
|
|
46
|
+
BinaryOperator["dateTimeSame"] = "dateTimeSame";
|
|
47
|
+
})(BinaryOperator = exports.BinaryOperator || (exports.BinaryOperator = {}));
|
|
48
|
+
exports.BinaryOperatorPhrase = {
|
|
49
|
+
[BinaryOperator.equal]: "equal",
|
|
50
|
+
[BinaryOperator.notEqual]: "does not equal",
|
|
51
|
+
[BinaryOperator.greaterThan]: "is greater than",
|
|
52
|
+
[BinaryOperator.greaterThanOrEqual]: "is greater than or equal to",
|
|
53
|
+
[BinaryOperator.lessThan]: "is less than",
|
|
54
|
+
[BinaryOperator.lessThanOrEqual]: "is less than or equal to",
|
|
55
|
+
[BinaryOperator.in]: "contained in",
|
|
56
|
+
[BinaryOperator.notIn]: "not contained in",
|
|
57
|
+
[BinaryOperator.exactlyMatches]: "exactly matches",
|
|
58
|
+
[BinaryOperator.doesNotExactlyMatch]: "does not exactly match",
|
|
59
|
+
[BinaryOperator.startsWith]: "starts with",
|
|
60
|
+
[BinaryOperator.doesNotStartWith]: "does not start with",
|
|
61
|
+
[BinaryOperator.endsWith]: "ends with",
|
|
62
|
+
[BinaryOperator.doesNotEndWith]: "does not end with",
|
|
63
|
+
[BinaryOperator.dateTimeAfter]: "is after (date/time)",
|
|
64
|
+
[BinaryOperator.dateTimeBefore]: "is before (date/time)",
|
|
65
|
+
[BinaryOperator.dateTimeSame]: "is the same (date/time)",
|
|
66
|
+
};
|
|
67
|
+
exports.TermOperatorPhrase = Object.assign(Object.assign({}, exports.UnaryOperatorPhrase), exports.BinaryOperatorPhrase);
|