UNPKG

@prismatic-io/spectral

Version:

Utility library for building Prismatic connectors and code-native integrations

93 lines (92 loc) 2.53 kB
export declare enum BooleanOperator { and = "and", or = "or" } export declare const BooleanOperatorPhrase: string[]; export declare enum UnaryOperator { isTrue = "isTrue", isFalse = "isFalse", doesNotExist = "doesNotExist", exists = "exists", isEmpty = "isEmpty", isNotEmpty = "isNotEmpty" } export declare const UnaryOperatorPhrase: { isTrue: string; isFalse: string; doesNotExist: string; exists: string; isEmpty: string; isNotEmpty: string; }; export declare enum BinaryOperator { equal = "equal", notEqual = "notEqual", greaterThan = "greaterThan", greaterThanOrEqual = "greaterThanOrEqual", lessThan = "lessThan", lessThanOrEqual = "lessThanOrEqual", in = "in", notIn = "notIn", exactlyMatches = "exactlyMatches", doesNotExactlyMatch = "doesNotExactlyMatch", startsWith = "startsWith", doesNotStartWith = "doesNotStartWith", endsWith = "endsWith", doesNotEndWith = "doesNotEndWith", dateTimeAfter = "dateTimeAfter", dateTimeBefore = "dateTimeBefore", dateTimeSame = "dateTimeSame" } export declare const BinaryOperatorPhrase: { equal: string; exactlyMatches: string; notEqual: string; doesNotExactlyMatch: string; greaterThan: string; greaterThanOrEqual: string; lessThan: string; lessThanOrEqual: string; in: string; notIn: string; startsWith: string; doesNotStartWith: string; endsWith: string; doesNotEndWith: string; dateTimeAfter: string; dateTimeBefore: string; dateTimeSame: string; }; export type TermOperator = UnaryOperator | BinaryOperator; export declare const TermOperatorPhrase: { equal: string; exactlyMatches: string; notEqual: string; doesNotExactlyMatch: string; greaterThan: string; greaterThanOrEqual: string; lessThan: string; lessThanOrEqual: string; in: string; notIn: string; startsWith: string; doesNotStartWith: string; endsWith: string; doesNotEndWith: string; dateTimeAfter: string; dateTimeBefore: string; dateTimeSame: string; isTrue: string; isFalse: string; doesNotExist: string; exists: string; isEmpty: string; isNotEmpty: string; }; export type Term = unknown; export type TermExpression = [TermOperator, Term, Term?]; export type BooleanExpression = [ BooleanOperator.and | BooleanOperator.or, ...ConditionalExpression[] ]; export type ConditionalExpression = TermExpression | BooleanExpression;