Skip to content

Commit

Permalink
Merge pull request #5616 from gooddata/nen-lx-655-databricks-client
Browse files Browse the repository at this point in the history
feat: extend DS with databrick credentials
  • Loading branch information
xMort authored Nov 28, 2024
2 parents 97890ad + e385072 commit fb8951f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libs/sdk-backend-tiger/api/sdk-backend-tiger.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ export interface IDataSourceConnectionInfo {
// (undocumented)
cacheStrategy?: IDataSourceCacheStrategy;
// (undocumented)
clientId?: string;
// (undocumented)
decodedParameters?: Array<DataSourceParameter> | null;
// (undocumented)
id: string;
Expand Down Expand Up @@ -198,6 +200,10 @@ export interface IDataSourcePatchRequest {
// (undocumented)
cacheStrategy?: IDataSourceCacheStrategy;
// (undocumented)
clientId?: string | null;
// (undocumented)
clientSecret?: string | null;
// (undocumented)
id: string;
// (undocumented)
name?: string;
Expand Down Expand Up @@ -226,6 +232,10 @@ export type IDataSourcePermission = "MANAGE" | "USE";

// @internal (undocumented)
export interface IDataSourceTestConnectionRequest {
// (undocumented)
clientId?: string;
// (undocumented)
clientSecret?: string;
// (undocumented)
parameters?: Array<DataSourceParameter>;
// (undocumented)
Expand Down Expand Up @@ -262,6 +272,10 @@ export interface IDataSourceUpsertRequest {
// (undocumented)
cacheStrategy?: IDataSourceCacheStrategy;
// (undocumented)
clientId?: string;
// (undocumented)
clientSecret?: string;
// (undocumented)
id: string;
// (undocumented)
name: string;
Expand Down
21 changes: 21 additions & 0 deletions libs/sdk-backend-tiger/src/backend/tigerSpecificFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export interface IDataSourceConnectionInfo {
name: string;
schema: string;
username?: string;
clientId?: string;
url?: string | null;
permissions?: IDataSourcePermission[];
parameters?: Array<DataSourceParameter> | null;
Expand Down Expand Up @@ -166,6 +167,8 @@ export interface IDataSourceUpsertRequest {
cacheStrategy?: IDataSourceCacheStrategy;
privateKey?: string;
privateKeyPassphrase?: string;
clientId?: string;
clientSecret?: string;
}

/**
Expand All @@ -184,6 +187,8 @@ export interface IDataSourcePatchRequest {
cacheStrategy?: IDataSourceCacheStrategy;
privateKey?: string | null;
privateKeyPassphrase?: string | null;
clientId?: string | null;
clientSecret?: string | null;
}

/**
Expand All @@ -199,6 +204,8 @@ export interface IDataSourceTestConnectionRequest {
parameters?: Array<DataSourceParameter>;
privateKey?: string;
privateKeyPassphrase?: string;
clientId?: string;
clientSecret?: string;
}

/**
Expand Down Expand Up @@ -574,6 +581,7 @@ const dataSourceResponseAsDataSourceConnectionInfo = (
decodedParameters,
cacheStrategy,
authenticationType,
clientId,
} = attributes;
return {
id,
Expand All @@ -582,6 +590,7 @@ const dataSourceResponseAsDataSourceConnectionInfo = (
schema,
username: username ?? undefined,
url,
clientId: clientId ?? undefined,
permissions: meta?.permissions ?? [],
parameters,
decodedParameters,
Expand Down Expand Up @@ -1036,6 +1045,8 @@ export const buildTigerSpecificFunctions = (
cacheStrategy,
privateKey,
privateKeyPassphrase,
clientId,
clientSecret,
} = requestData;
try {
return await authApiCall(async (sdk) => {
Expand All @@ -1055,6 +1066,8 @@ export const buildTigerSpecificFunctions = (
cacheStrategy,
privateKey,
privateKeyPassphrase,
clientId,
clientSecret,
},
id,
type: JsonApiDataSourceInTypeEnum.DATA_SOURCE,
Expand Down Expand Up @@ -1083,6 +1096,8 @@ export const buildTigerSpecificFunctions = (
cacheStrategy,
privateKey,
privateKeyPassphrase,
clientId,
clientSecret,
} = requestData;
try {
return await authApiCall(async (sdk) => {
Expand All @@ -1103,6 +1118,8 @@ export const buildTigerSpecificFunctions = (
cacheStrategy,
privateKey,
privateKeyPassphrase,
clientId,
clientSecret,
},
id: requestDataId,
type: JsonApiDataSourceInTypeEnum.DATA_SOURCE,
Expand Down Expand Up @@ -1131,6 +1148,8 @@ export const buildTigerSpecificFunctions = (
cacheStrategy,
privateKey,
privateKeyPassphrase,
clientId,
clientSecret,
} = requestData;
try {
return await authApiCall(async (sdk) => {
Expand All @@ -1151,6 +1170,8 @@ export const buildTigerSpecificFunctions = (
cacheStrategy,
privateKey,
privateKeyPassphrase,
clientId,
clientSecret,
},
id: requestDataId,
type: JsonApiDataSourceInTypeEnum.DATA_SOURCE,
Expand Down

0 comments on commit fb8951f

Please sign in to comment.