@prismatic-io/spectral 7.6.2 → 7.6.4-rc.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.
|
@@ -40,15 +40,15 @@ export declare enum BinaryOperator {
|
|
|
40
40
|
}
|
|
41
41
|
export declare const BinaryOperatorPhrase: {
|
|
42
42
|
equal: string;
|
|
43
|
+
exactlyMatches: string;
|
|
43
44
|
notEqual: string;
|
|
45
|
+
doesNotExactlyMatch: string;
|
|
44
46
|
greaterThan: string;
|
|
45
47
|
greaterThanOrEqual: string;
|
|
46
48
|
lessThan: string;
|
|
47
49
|
lessThanOrEqual: string;
|
|
48
50
|
in: string;
|
|
49
51
|
notIn: string;
|
|
50
|
-
exactlyMatches: string;
|
|
51
|
-
doesNotExactlyMatch: string;
|
|
52
52
|
startsWith: string;
|
|
53
53
|
doesNotStartWith: string;
|
|
54
54
|
endsWith: string;
|
|
@@ -60,15 +60,15 @@ export declare const BinaryOperatorPhrase: {
|
|
|
60
60
|
export declare type TermOperator = UnaryOperator | BinaryOperator;
|
|
61
61
|
export declare const TermOperatorPhrase: {
|
|
62
62
|
equal: string;
|
|
63
|
+
exactlyMatches: string;
|
|
63
64
|
notEqual: string;
|
|
65
|
+
doesNotExactlyMatch: string;
|
|
64
66
|
greaterThan: string;
|
|
65
67
|
greaterThanOrEqual: string;
|
|
66
68
|
lessThan: string;
|
|
67
69
|
lessThanOrEqual: string;
|
|
68
70
|
in: string;
|
|
69
71
|
notIn: string;
|
|
70
|
-
exactlyMatches: string;
|
|
71
|
-
doesNotExactlyMatch: string;
|
|
72
72
|
startsWith: string;
|
|
73
73
|
doesNotStartWith: string;
|
|
74
74
|
endsWith: string;
|
|
@@ -47,20 +47,20 @@ var BinaryOperator;
|
|
|
47
47
|
BinaryOperator["dateTimeSame"] = "dateTimeSame";
|
|
48
48
|
})(BinaryOperator = exports.BinaryOperator || (exports.BinaryOperator = {}));
|
|
49
49
|
exports.BinaryOperatorPhrase = {
|
|
50
|
-
[BinaryOperator.equal]: "
|
|
50
|
+
[BinaryOperator.equal]: "equals",
|
|
51
|
+
[BinaryOperator.exactlyMatches]: "exactly matches",
|
|
51
52
|
[BinaryOperator.notEqual]: "does not equal",
|
|
53
|
+
[BinaryOperator.doesNotExactlyMatch]: "does not exactly match",
|
|
52
54
|
[BinaryOperator.greaterThan]: "is greater than",
|
|
53
55
|
[BinaryOperator.greaterThanOrEqual]: "is greater than or equal to",
|
|
54
56
|
[BinaryOperator.lessThan]: "is less than",
|
|
55
57
|
[BinaryOperator.lessThanOrEqual]: "is less than or equal to",
|
|
56
58
|
[BinaryOperator.in]: "contained in",
|
|
57
59
|
[BinaryOperator.notIn]: "not contained in",
|
|
58
|
-
[BinaryOperator.
|
|
59
|
-
[BinaryOperator.
|
|
60
|
-
[BinaryOperator.
|
|
61
|
-
[BinaryOperator.
|
|
62
|
-
[BinaryOperator.endsWith]: "ends with",
|
|
63
|
-
[BinaryOperator.doesNotEndWith]: "does not end with",
|
|
60
|
+
[BinaryOperator.startsWith]: "starts the string",
|
|
61
|
+
[BinaryOperator.doesNotStartWith]: "does not start the string",
|
|
62
|
+
[BinaryOperator.endsWith]: "ends the string",
|
|
63
|
+
[BinaryOperator.doesNotEndWith]: "does not end the string",
|
|
64
64
|
[BinaryOperator.dateTimeAfter]: "is after (date/time)",
|
|
65
65
|
[BinaryOperator.dateTimeBefore]: "is before (date/time)",
|
|
66
66
|
[BinaryOperator.dateTimeSame]: "is the same (date/time)",
|
package/dist/testing.js
CHANGED
|
@@ -155,6 +155,12 @@ const baseDataSourceContext = {
|
|
|
155
155
|
id: "instanceId",
|
|
156
156
|
name: "Instance 1",
|
|
157
157
|
},
|
|
158
|
+
user: {
|
|
159
|
+
id: "userId",
|
|
160
|
+
email: "example@email.com",
|
|
161
|
+
externalId: "1234",
|
|
162
|
+
name: "Example",
|
|
163
|
+
},
|
|
158
164
|
};
|
|
159
165
|
/**
|
|
160
166
|
* Invokes specified DataSourceDefinition perform function using supplied params.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Inputs, DataSourceResult, DataSourceType, ActionInputParameters, ActionLogger, Customer, Instance } from ".";
|
|
1
|
+
import { Inputs, DataSourceResult, DataSourceType, ActionInputParameters, ActionLogger, Customer, Instance, User } from ".";
|
|
2
2
|
/** Context provided to perform method containing helpers and contextual data */
|
|
3
3
|
export interface DataSourceContext {
|
|
4
4
|
logger: ActionLogger;
|
|
5
5
|
customer: Customer;
|
|
6
6
|
instance: Instance;
|
|
7
|
+
user: User;
|
|
7
8
|
}
|
|
8
9
|
/** Definition of the function to perform when a Data Source is invoked. */
|
|
9
10
|
export declare type DataSourcePerformFunction<TInputs extends Inputs, TDataSourceType extends DataSourceType> = (context: DataSourceContext, params: ActionInputParameters<TInputs>) => Promise<DataSourceResult<TDataSourceType>>;
|