@prismatic-io/spectral 10.0.0 → 10.0.1
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.
|
@@ -334,7 +334,7 @@ const convertInputValue = (value, collectionType) => {
|
|
|
334
334
|
};
|
|
335
335
|
/** Converts a Config Var into the structure necessary for YAML generation. */
|
|
336
336
|
const convertConfigVar = (key, configVar, referenceKey, componentRegistry) => {
|
|
337
|
-
var _a;
|
|
337
|
+
var _a, _b, _c;
|
|
338
338
|
if ((0, types_1.isOrganizationActivatedConnectionConfigVar)(configVar)) {
|
|
339
339
|
const { stableKey } = (0, lodash_1.pick)(configVar, ["stableKey"]);
|
|
340
340
|
return {
|
|
@@ -387,7 +387,7 @@ const convertConfigVar = (key, configVar, referenceKey, componentRegistry) => {
|
|
|
387
387
|
} });
|
|
388
388
|
}, {}),
|
|
389
389
|
orgOnly,
|
|
390
|
-
meta,
|
|
390
|
+
meta: Object.assign(Object.assign({}, meta), ("oauth2Config" in configVar ? (_a = configVar.oauth2Config) !== null && _a !== void 0 ? _a : {} : {})),
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
393
|
if ((0, types_1.isConnectionReferenceConfigVar)(configVar)) {
|
|
@@ -402,7 +402,7 @@ const convertConfigVar = (key, configVar, referenceKey, componentRegistry) => {
|
|
|
402
402
|
connection: Object.assign(Object.assign({}, ref), { template }),
|
|
403
403
|
inputs,
|
|
404
404
|
orgOnly,
|
|
405
|
-
meta,
|
|
405
|
+
meta: Object.assign(Object.assign({}, meta), ("oauth2Config" in configVar ? (_b = configVar.oauth2Config) !== null && _b !== void 0 ? _b : {} : {})),
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
408
|
const rawDefaultValue = "defaultValue" in configVar
|
|
@@ -426,7 +426,7 @@ const convertConfigVar = (key, configVar, referenceKey, componentRegistry) => {
|
|
|
426
426
|
result.scheduleType = "custom";
|
|
427
427
|
}
|
|
428
428
|
if ((0, types_1.isJsonFormConfigVar)(configVar) || (0, types_1.isJsonFormDataSourceConfigVar)(configVar)) {
|
|
429
|
-
result.meta = Object.assign(Object.assign({}, result.meta), { validationMode: (
|
|
429
|
+
result.meta = Object.assign(Object.assign({}, result.meta), { validationMode: (_c = configVar === null || configVar === void 0 ? void 0 : configVar.validationMode) !== null && _c !== void 0 ? _c : "ValidateAndShow" });
|
|
430
430
|
}
|
|
431
431
|
if ((0, types_1.isDataSourceDefinitionConfigVar)(configVar)) {
|
|
432
432
|
result.dataType = configVar.dataSourceType;
|
|
@@ -28,9 +28,13 @@ interface OAuth2Config {
|
|
|
28
28
|
overrideGrantType?: string;
|
|
29
29
|
allowedTokenParams?: string[];
|
|
30
30
|
}
|
|
31
|
+
export interface OAuth2UrlOverrides {
|
|
32
|
+
oAuthSuccessRedirectUri?: string;
|
|
33
|
+
oAuthFailureRedirectUri?: string;
|
|
34
|
+
}
|
|
31
35
|
interface OAuth2AuthorizationCodeConnectionDefinition extends BaseConnectionDefinition {
|
|
32
36
|
oauth2Type: OAuth2Type.AuthorizationCode;
|
|
33
|
-
oauth2Config?: OAuth2Config;
|
|
37
|
+
oauth2Config?: OAuth2Config & OAuth2UrlOverrides;
|
|
34
38
|
/** The PKCE method (S256 or plain) that this OAuth 2.0 connection uses (if any) */
|
|
35
39
|
oauth2PkceMethod?: OAuth2PkceMethod;
|
|
36
40
|
inputs: {
|
|
@@ -44,6 +48,7 @@ interface OAuth2AuthorizationCodeConnectionDefinition extends BaseConnectionDefi
|
|
|
44
48
|
}
|
|
45
49
|
interface OAuth2ClientCredentialConnectionDefinition extends BaseConnectionDefinition {
|
|
46
50
|
oauth2Type: OAuth2Type.ClientCredentials;
|
|
51
|
+
oauth2Config?: OAuth2UrlOverrides;
|
|
47
52
|
inputs: {
|
|
48
53
|
tokenUrl: ConnectionInput;
|
|
49
54
|
scopes: ConnectionInput;
|