@superblocksteam/shared 0.9431.0 → 0.9433.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.
- package/dist/plugins/templates/databricks.d.ts +1 -0
- package/dist/plugins/templates/databricks.d.ts.map +1 -1
- package/dist/plugins/templates/databricks.js +170 -7
- package/dist/plugins/templates/databricks.js.map +1 -1
- package/dist/types/datasource/auth.d.ts +1 -0
- package/dist/types/datasource/auth.d.ts.map +1 -1
- package/dist/types/datasource/auth.js.map +1 -1
- package/dist/types/datasource/index.d.ts +4 -1
- package/dist/types/datasource/index.d.ts.map +1 -1
- package/dist/types/datasource/index.js.map +1 -1
- package/dist-esm/plugins/templates/databricks.d.ts +1 -0
- package/dist-esm/plugins/templates/databricks.d.ts.map +1 -1
- package/dist-esm/plugins/templates/databricks.js +170 -7
- package/dist-esm/plugins/templates/databricks.js.map +1 -1
- package/dist-esm/types/datasource/auth.d.ts +1 -0
- package/dist-esm/types/datasource/auth.d.ts.map +1 -1
- package/dist-esm/types/datasource/auth.js.map +1 -1
- package/dist-esm/types/datasource/index.d.ts +4 -1
- package/dist-esm/types/datasource/index.d.ts.map +1 -1
- package/dist-esm/types/datasource/index.js.map +1 -1
- package/package.json +2 -2
- package/src/plugins/templates/databricks.ts +179 -8
- package/src/types/datasource/auth.ts +1 -0
- package/src/types/datasource/index.ts +5 -1
|
@@ -13,17 +13,20 @@ import { makeDropdownItem } from './shared/db';
|
|
|
13
13
|
|
|
14
14
|
export const DatabricksPluginVersions = {
|
|
15
15
|
V1: '0.0.1',
|
|
16
|
-
V2: '0.0.2'
|
|
16
|
+
V2: '0.0.2',
|
|
17
|
+
V3: '0.0.3'
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
enum ConnectionType {
|
|
20
21
|
PERSONAL_ACCESS_TOKEN = '1',
|
|
21
|
-
MACHINE_TO_MACHINE = '2'
|
|
22
|
+
MACHINE_TO_MACHINE = '2',
|
|
23
|
+
OAUTH_TOKEN_FEDERATION = '3'
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
const CONNECTION_METHODS_AND_DISPLAY_NAMES_V2 = {
|
|
25
27
|
[ConnectionType.PERSONAL_ACCESS_TOKEN]: 'Personal access token',
|
|
26
|
-
[ConnectionType.MACHINE_TO_MACHINE]: 'Machine-to-machine'
|
|
28
|
+
[ConnectionType.MACHINE_TO_MACHINE]: 'Machine-to-machine',
|
|
29
|
+
[ConnectionType.OAUTH_TOKEN_FEDERATION]: 'OAuth token federation'
|
|
27
30
|
};
|
|
28
31
|
|
|
29
32
|
const BASE_HOST = {
|
|
@@ -73,6 +76,50 @@ const BASE_DEFAULT_SCHEMA = {
|
|
|
73
76
|
placeholder: 'default'
|
|
74
77
|
};
|
|
75
78
|
|
|
79
|
+
const BASE_SUBJECT_TOKEN_SOURCE = {
|
|
80
|
+
label: 'Subject token source',
|
|
81
|
+
name: 'authConfig.subjectTokenSource',
|
|
82
|
+
componentType: FormComponentType.DROPDOWN,
|
|
83
|
+
initialValue: 'SUBJECT_TOKEN_SOURCE_LOGIN_IDENTITY_PROVIDER',
|
|
84
|
+
rules: [{ required: true, message: 'Subject token source is required' }],
|
|
85
|
+
options: [
|
|
86
|
+
makeDropdownItem('SUBJECT_TOKEN_SOURCE_LOGIN_IDENTITY_PROVIDER', 'Login Identity Provider'),
|
|
87
|
+
makeDropdownItem('SUBJECT_TOKEN_SOURCE_STATIC_TOKEN', 'Static Token')
|
|
88
|
+
]
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const BASE_TOKEN_URL = {
|
|
92
|
+
label: 'Token URL',
|
|
93
|
+
name: 'authConfig.tokenUrl',
|
|
94
|
+
componentType: FormComponentType.INPUT_TEXT,
|
|
95
|
+
placeholder: 'https://your-token-endpoint.com/oauth/token',
|
|
96
|
+
rules: [{ required: true, message: 'Token URL is required' }]
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const BASE_CLIENT_ID = {
|
|
100
|
+
label: 'Service Principal UUID',
|
|
101
|
+
name: 'authConfig.clientId',
|
|
102
|
+
componentType: FormComponentType.INPUT_TEXT,
|
|
103
|
+
placeholder: 'optional-service-principal-uuid',
|
|
104
|
+
rules: [{ required: false }]
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const BASE_STATIC_TOKEN = {
|
|
108
|
+
label: 'Static Token',
|
|
109
|
+
name: 'authConfig.subjectTokenSourceStaticToken',
|
|
110
|
+
componentType: FormComponentType.INPUT_TEXT,
|
|
111
|
+
dataType: InputDataType.PASSWORD, // Hidden input for security
|
|
112
|
+
rules: [{ required: true, message: 'Static token is required when using static token source' }]
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const BASE_SCOPE = {
|
|
116
|
+
label: 'Scope',
|
|
117
|
+
name: 'authConfig.scope',
|
|
118
|
+
componentType: FormComponentType.INPUT_TEXT,
|
|
119
|
+
initialValue: 'all-apis',
|
|
120
|
+
rules: [{ required: true }]
|
|
121
|
+
};
|
|
122
|
+
|
|
76
123
|
export const DatabricksPlugin: Plugin = {
|
|
77
124
|
id: 'databricks',
|
|
78
125
|
name: 'Databricks',
|
|
@@ -98,6 +145,48 @@ export const DatabricksPlugin: Plugin = {
|
|
|
98
145
|
placeholder: 'ProdDB',
|
|
99
146
|
rules: [{ required: true, message: 'Display name is required' }]
|
|
100
147
|
},
|
|
148
|
+
{
|
|
149
|
+
label: 'Auth Type Field',
|
|
150
|
+
name: 'authTypeField',
|
|
151
|
+
hidden: true,
|
|
152
|
+
componentType: FormComponentType.INPUT_TEXT,
|
|
153
|
+
startVersion: DatabricksPluginVersions.V3,
|
|
154
|
+
initialValue: 'oauthType',
|
|
155
|
+
rules: [{ required: false }],
|
|
156
|
+
display: {
|
|
157
|
+
show: {
|
|
158
|
+
'connection.connectionType': [ConnectionType.OAUTH_TOKEN_FEDERATION]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: 'OAuth Type',
|
|
164
|
+
name: 'oauthType',
|
|
165
|
+
hidden: true,
|
|
166
|
+
componentType: FormComponentType.INPUT_TEXT,
|
|
167
|
+
startVersion: DatabricksPluginVersions.V3,
|
|
168
|
+
initialValue: 'oauth-token-exchange',
|
|
169
|
+
rules: [{ required: false }],
|
|
170
|
+
display: {
|
|
171
|
+
show: {
|
|
172
|
+
'connection.connectionType': [ConnectionType.OAUTH_TOKEN_FEDERATION]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
label: 'Subject Token Type',
|
|
178
|
+
name: 'authConfig.subjectTokenType',
|
|
179
|
+
hidden: true,
|
|
180
|
+
componentType: FormComponentType.INPUT_TEXT,
|
|
181
|
+
startVersion: DatabricksPluginVersions.V3,
|
|
182
|
+
initialValue: 'urn:ietf:params:oauth:token-type:jwt',
|
|
183
|
+
rules: [{ required: false }],
|
|
184
|
+
display: {
|
|
185
|
+
show: {
|
|
186
|
+
'connection.connectionType': [ConnectionType.OAUTH_TOKEN_FEDERATION]
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
101
190
|
// HOST
|
|
102
191
|
{
|
|
103
192
|
...BASE_HOST,
|
|
@@ -109,7 +198,11 @@ export const DatabricksPlugin: Plugin = {
|
|
|
109
198
|
startVersion: DatabricksPluginVersions.V2,
|
|
110
199
|
display: {
|
|
111
200
|
show: {
|
|
112
|
-
'connection.connectionType': [
|
|
201
|
+
'connection.connectionType': [
|
|
202
|
+
ConnectionType.PERSONAL_ACCESS_TOKEN,
|
|
203
|
+
ConnectionType.MACHINE_TO_MACHINE,
|
|
204
|
+
ConnectionType.OAUTH_TOKEN_FEDERATION
|
|
205
|
+
]
|
|
113
206
|
}
|
|
114
207
|
}
|
|
115
208
|
} as FormItem,
|
|
@@ -124,7 +217,11 @@ export const DatabricksPlugin: Plugin = {
|
|
|
124
217
|
startVersion: DatabricksPluginVersions.V2,
|
|
125
218
|
display: {
|
|
126
219
|
show: {
|
|
127
|
-
'connection.connectionType': [
|
|
220
|
+
'connection.connectionType': [
|
|
221
|
+
ConnectionType.PERSONAL_ACCESS_TOKEN,
|
|
222
|
+
ConnectionType.MACHINE_TO_MACHINE,
|
|
223
|
+
ConnectionType.OAUTH_TOKEN_FEDERATION
|
|
224
|
+
]
|
|
128
225
|
}
|
|
129
226
|
}
|
|
130
227
|
} as FormItem,
|
|
@@ -139,7 +236,11 @@ export const DatabricksPlugin: Plugin = {
|
|
|
139
236
|
startVersion: DatabricksPluginVersions.V2,
|
|
140
237
|
display: {
|
|
141
238
|
show: {
|
|
142
|
-
'connection.connectionType': [
|
|
239
|
+
'connection.connectionType': [
|
|
240
|
+
ConnectionType.PERSONAL_ACCESS_TOKEN,
|
|
241
|
+
ConnectionType.MACHINE_TO_MACHINE,
|
|
242
|
+
ConnectionType.OAUTH_TOKEN_FEDERATION
|
|
243
|
+
]
|
|
143
244
|
}
|
|
144
245
|
}
|
|
145
246
|
} as FormItem,
|
|
@@ -154,7 +255,11 @@ export const DatabricksPlugin: Plugin = {
|
|
|
154
255
|
startVersion: DatabricksPluginVersions.V2,
|
|
155
256
|
display: {
|
|
156
257
|
show: {
|
|
157
|
-
'connection.connectionType': [
|
|
258
|
+
'connection.connectionType': [
|
|
259
|
+
ConnectionType.PERSONAL_ACCESS_TOKEN,
|
|
260
|
+
ConnectionType.MACHINE_TO_MACHINE,
|
|
261
|
+
ConnectionType.OAUTH_TOKEN_FEDERATION
|
|
262
|
+
]
|
|
158
263
|
}
|
|
159
264
|
}
|
|
160
265
|
} as FormItem,
|
|
@@ -169,7 +274,11 @@ export const DatabricksPlugin: Plugin = {
|
|
|
169
274
|
startVersion: DatabricksPluginVersions.V2,
|
|
170
275
|
display: {
|
|
171
276
|
show: {
|
|
172
|
-
'connection.connectionType': [
|
|
277
|
+
'connection.connectionType': [
|
|
278
|
+
ConnectionType.PERSONAL_ACCESS_TOKEN,
|
|
279
|
+
ConnectionType.MACHINE_TO_MACHINE,
|
|
280
|
+
ConnectionType.OAUTH_TOKEN_FEDERATION
|
|
281
|
+
]
|
|
173
282
|
}
|
|
174
283
|
}
|
|
175
284
|
} as FormItem,
|
|
@@ -177,6 +286,18 @@ export const DatabricksPlugin: Plugin = {
|
|
|
177
286
|
label: 'Connection method',
|
|
178
287
|
name: 'connection.connectionType',
|
|
179
288
|
startVersion: DatabricksPluginVersions.V2,
|
|
289
|
+
endVersion: DatabricksPluginVersions.V2,
|
|
290
|
+
componentType: FormComponentType.DROPDOWN,
|
|
291
|
+
initialValue: ConnectionType.PERSONAL_ACCESS_TOKEN,
|
|
292
|
+
rules: [{ required: true }],
|
|
293
|
+
options: Object.entries(CONNECTION_METHODS_AND_DISPLAY_NAMES_V2).map(([value, displayName]) =>
|
|
294
|
+
makeDropdownItem(value, displayName)
|
|
295
|
+
)
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
label: 'Connection method',
|
|
299
|
+
name: 'connection.connectionType',
|
|
300
|
+
startVersion: DatabricksPluginVersions.V3,
|
|
180
301
|
componentType: FormComponentType.DROPDOWN,
|
|
181
302
|
initialValue: ConnectionType.PERSONAL_ACCESS_TOKEN,
|
|
182
303
|
rules: [{ required: true }],
|
|
@@ -225,6 +346,56 @@ export const DatabricksPlugin: Plugin = {
|
|
|
225
346
|
'connection.connectionType': [ConnectionType.MACHINE_TO_MACHINE]
|
|
226
347
|
}
|
|
227
348
|
}
|
|
349
|
+
} as FormItem,
|
|
350
|
+
|
|
351
|
+
{
|
|
352
|
+
...BASE_SUBJECT_TOKEN_SOURCE,
|
|
353
|
+
startVersion: DatabricksPluginVersions.V3,
|
|
354
|
+
display: {
|
|
355
|
+
show: {
|
|
356
|
+
'connection.connectionType': [ConnectionType.OAUTH_TOKEN_FEDERATION]
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
} as FormItem,
|
|
360
|
+
{
|
|
361
|
+
...BASE_STATIC_TOKEN,
|
|
362
|
+
startVersion: DatabricksPluginVersions.V3,
|
|
363
|
+
display: {
|
|
364
|
+
show: {
|
|
365
|
+
'connection.connectionType': [ConnectionType.OAUTH_TOKEN_FEDERATION],
|
|
366
|
+
'authConfig.subjectTokenSource': ['SUBJECT_TOKEN_SOURCE_STATIC_TOKEN']
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
} as FormItem,
|
|
370
|
+
{
|
|
371
|
+
...BASE_TOKEN_URL,
|
|
372
|
+
startVersion: DatabricksPluginVersions.V3,
|
|
373
|
+
display: {
|
|
374
|
+
show: {
|
|
375
|
+
'connection.connectionType': [ConnectionType.OAUTH_TOKEN_FEDERATION]
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
} as FormItem,
|
|
379
|
+
{
|
|
380
|
+
...BASE_CLIENT_ID,
|
|
381
|
+
startVersion: DatabricksPluginVersions.V3,
|
|
382
|
+
display: {
|
|
383
|
+
show: {
|
|
384
|
+
'connection.connectionType': [ConnectionType.OAUTH_TOKEN_FEDERATION]
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
} as FormItem,
|
|
388
|
+
{
|
|
389
|
+
...BASE_SCOPE,
|
|
390
|
+
startVersion: DatabricksPluginVersions.V3,
|
|
391
|
+
// NOTE: @joeyagreco - `all-apis` is the only scope that databricks allows, so we just hardcode and hide to prevent users from changing and having connection issues
|
|
392
|
+
hidden: true,
|
|
393
|
+
initialValue: 'all-apis',
|
|
394
|
+
display: {
|
|
395
|
+
show: {
|
|
396
|
+
'connection.connectionType': [ConnectionType.OAUTH_TOKEN_FEDERATION]
|
|
397
|
+
}
|
|
398
|
+
}
|
|
228
399
|
} as FormItem
|
|
229
400
|
]
|
|
230
401
|
}
|
|
@@ -432,7 +432,11 @@ export type CouchbaseDatasourceConfiguration = Pick<
|
|
|
432
432
|
'name' | 'connection' | 'tunnel' | 'dynamicWorkflowConfiguration'
|
|
433
433
|
>;
|
|
434
434
|
|
|
435
|
-
export type DatabricksDatasourceConfiguration = Pick<DatabricksPlugin.Plugin, 'name' | 'connection' | 'dynamicWorkflowConfiguration'
|
|
435
|
+
export type DatabricksDatasourceConfiguration = Pick<DatabricksPlugin.Plugin, 'name' | 'connection' | 'dynamicWorkflowConfiguration'> &
|
|
436
|
+
AuthenticatedDatasourceConfig & {
|
|
437
|
+
authTypeField?: string;
|
|
438
|
+
oauthType?: IntegrationAuthType.OAUTH2_TOKEN_EXCHANGE;
|
|
439
|
+
};
|
|
436
440
|
|
|
437
441
|
export type OracleDbDatasourceConfiguration = Pick<OracleDbPlugin.Plugin, 'name' | 'connection' | 'dynamicWorkflowConfiguration'> & {
|
|
438
442
|
connectionType?: 'fields' | 'url';
|