@prismatic-io/spectral 7.6.2 → 7.6.3
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/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>>;
|