@prismatic-io/spectral 7.6.1 → 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.
|
|
@@ -3,6 +3,10 @@ export declare enum OAuth2Type {
|
|
|
3
3
|
ClientCredentials = "client_credentials",
|
|
4
4
|
AuthorizationCode = "authorization_code"
|
|
5
5
|
}
|
|
6
|
+
export declare enum OAuth2PkceMethod {
|
|
7
|
+
Plain = "plain",
|
|
8
|
+
S256 = "S256"
|
|
9
|
+
}
|
|
6
10
|
interface BaseConnectionDefinition {
|
|
7
11
|
key: string;
|
|
8
12
|
label: string;
|
|
@@ -17,6 +21,8 @@ export interface DefaultConnectionDefinition extends BaseConnectionDefinition {
|
|
|
17
21
|
}
|
|
18
22
|
interface OAuth2AuthorizationCodeConnectionDefinition extends BaseConnectionDefinition {
|
|
19
23
|
oauth2Type: OAuth2Type.AuthorizationCode;
|
|
24
|
+
/** The PKCE method (S256 or plain) that this OAuth 2.0 connection uses (if any) */
|
|
25
|
+
oauth2PkceMethod?: OAuth2PkceMethod;
|
|
20
26
|
inputs: {
|
|
21
27
|
authorizeUrl: ConnectionInput;
|
|
22
28
|
tokenUrl: ConnectionInput;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OAuth2Type = void 0;
|
|
3
|
+
exports.OAuth2PkceMethod = exports.OAuth2Type = void 0;
|
|
4
4
|
var OAuth2Type;
|
|
5
5
|
(function (OAuth2Type) {
|
|
6
6
|
OAuth2Type["ClientCredentials"] = "client_credentials";
|
|
7
7
|
OAuth2Type["AuthorizationCode"] = "authorization_code";
|
|
8
8
|
})(OAuth2Type = exports.OAuth2Type || (exports.OAuth2Type = {}));
|
|
9
|
+
var OAuth2PkceMethod;
|
|
10
|
+
(function (OAuth2PkceMethod) {
|
|
11
|
+
OAuth2PkceMethod["Plain"] = "plain";
|
|
12
|
+
OAuth2PkceMethod["S256"] = "S256";
|
|
13
|
+
})(OAuth2PkceMethod = exports.OAuth2PkceMethod || (exports.OAuth2PkceMethod = {}));
|
|
@@ -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>>;
|