@superblocksteam/shared 0.9558.8 → 0.9559.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.
- package/dist/plugins/index.d.ts +8 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +45 -1
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/templates/athena.d.ts +1 -0
- package/dist/plugins/templates/athena.d.ts.map +1 -1
- package/dist/plugins/templates/athena.js +55 -1
- package/dist/plugins/templates/athena.js.map +1 -1
- package/dist/plugins/templates/bigquery.d.ts +1 -0
- package/dist/plugins/templates/bigquery.d.ts.map +1 -1
- package/dist/plugins/templates/bigquery.js +38 -1
- package/dist/plugins/templates/bigquery.js.map +1 -1
- package/dist/plugins/templates/cockroachdb.d.ts +1 -0
- package/dist/plugins/templates/cockroachdb.d.ts.map +1 -1
- package/dist/plugins/templates/cockroachdb.js +38 -1
- package/dist/plugins/templates/cockroachdb.js.map +1 -1
- 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 +55 -1
- package/dist/plugins/templates/databricks.js.map +1 -1
- package/dist/plugins/templates/mariadb.d.ts +1 -0
- package/dist/plugins/templates/mariadb.d.ts.map +1 -1
- package/dist/plugins/templates/mariadb.js +62 -1
- package/dist/plugins/templates/mariadb.js.map +1 -1
- package/dist/plugins/templates/mssql.d.ts +1 -0
- package/dist/plugins/templates/mssql.d.ts.map +1 -1
- package/dist/plugins/templates/mssql.js +62 -1
- package/dist/plugins/templates/mssql.js.map +1 -1
- package/dist/plugins/templates/mysql.d.ts +1 -0
- package/dist/plugins/templates/mysql.d.ts.map +1 -1
- package/dist/plugins/templates/mysql.js +62 -1
- package/dist/plugins/templates/mysql.js.map +1 -1
- package/dist/plugins/templates/oracledb.d.ts +1 -0
- package/dist/plugins/templates/oracledb.d.ts.map +1 -1
- package/dist/plugins/templates/oracledb.js +55 -1
- package/dist/plugins/templates/oracledb.js.map +1 -1
- package/dist/plugins/templates/postgres.d.ts +1 -0
- package/dist/plugins/templates/postgres.d.ts.map +1 -1
- package/dist/plugins/templates/postgres.js +47 -2
- package/dist/plugins/templates/postgres.js.map +1 -1
- package/dist/plugins/templates/redshift.d.ts +1 -0
- package/dist/plugins/templates/redshift.d.ts.map +1 -1
- package/dist/plugins/templates/redshift.js +38 -1
- package/dist/plugins/templates/redshift.js.map +1 -1
- package/dist/plugins/templates/snowflake.d.ts +1 -0
- package/dist/plugins/templates/snowflake.d.ts.map +1 -1
- package/dist/plugins/templates/snowflake.js +38 -1
- package/dist/plugins/templates/snowflake.js.map +1 -1
- package/dist/socket/protocol.d.ts +10 -2
- package/dist/socket/protocol.d.ts.map +1 -1
- package/dist/types/ai/index.d.ts +33 -0
- package/dist/types/ai/index.d.ts.map +1 -1
- package/dist/types/ai/index.js +8 -0
- package/dist/types/ai/index.js.map +1 -1
- package/dist/types/api/action.d.ts +1 -0
- package/dist/types/api/action.d.ts.map +1 -1
- package/dist/types/api/action.js.map +1 -1
- package/dist/types/plugin/form.d.ts +5 -0
- package/dist/types/plugin/form.d.ts.map +1 -1
- package/dist/types/plugin/form.js.map +1 -1
- package/dist-esm/plugins/index.d.ts +8 -0
- package/dist-esm/plugins/index.d.ts.map +1 -1
- package/dist-esm/plugins/index.js +45 -1
- package/dist-esm/plugins/index.js.map +1 -1
- package/dist-esm/plugins/templates/athena.d.ts +1 -0
- package/dist-esm/plugins/templates/athena.d.ts.map +1 -1
- package/dist-esm/plugins/templates/athena.js +55 -1
- package/dist-esm/plugins/templates/athena.js.map +1 -1
- package/dist-esm/plugins/templates/bigquery.d.ts +1 -0
- package/dist-esm/plugins/templates/bigquery.d.ts.map +1 -1
- package/dist-esm/plugins/templates/bigquery.js +38 -1
- package/dist-esm/plugins/templates/bigquery.js.map +1 -1
- package/dist-esm/plugins/templates/cockroachdb.d.ts +1 -0
- package/dist-esm/plugins/templates/cockroachdb.d.ts.map +1 -1
- package/dist-esm/plugins/templates/cockroachdb.js +38 -1
- package/dist-esm/plugins/templates/cockroachdb.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 +55 -1
- package/dist-esm/plugins/templates/databricks.js.map +1 -1
- package/dist-esm/plugins/templates/mariadb.d.ts +1 -0
- package/dist-esm/plugins/templates/mariadb.d.ts.map +1 -1
- package/dist-esm/plugins/templates/mariadb.js +62 -1
- package/dist-esm/plugins/templates/mariadb.js.map +1 -1
- package/dist-esm/plugins/templates/mssql.d.ts +1 -0
- package/dist-esm/plugins/templates/mssql.d.ts.map +1 -1
- package/dist-esm/plugins/templates/mssql.js +62 -1
- package/dist-esm/plugins/templates/mssql.js.map +1 -1
- package/dist-esm/plugins/templates/mysql.d.ts +1 -0
- package/dist-esm/plugins/templates/mysql.d.ts.map +1 -1
- package/dist-esm/plugins/templates/mysql.js +62 -1
- package/dist-esm/plugins/templates/mysql.js.map +1 -1
- package/dist-esm/plugins/templates/oracledb.d.ts +1 -0
- package/dist-esm/plugins/templates/oracledb.d.ts.map +1 -1
- package/dist-esm/plugins/templates/oracledb.js +55 -1
- package/dist-esm/plugins/templates/oracledb.js.map +1 -1
- package/dist-esm/plugins/templates/postgres.d.ts +1 -0
- package/dist-esm/plugins/templates/postgres.d.ts.map +1 -1
- package/dist-esm/plugins/templates/postgres.js +47 -2
- package/dist-esm/plugins/templates/postgres.js.map +1 -1
- package/dist-esm/plugins/templates/redshift.d.ts +1 -0
- package/dist-esm/plugins/templates/redshift.d.ts.map +1 -1
- package/dist-esm/plugins/templates/redshift.js +38 -1
- package/dist-esm/plugins/templates/redshift.js.map +1 -1
- package/dist-esm/plugins/templates/snowflake.d.ts +1 -0
- package/dist-esm/plugins/templates/snowflake.d.ts.map +1 -1
- package/dist-esm/plugins/templates/snowflake.js +38 -1
- package/dist-esm/plugins/templates/snowflake.js.map +1 -1
- package/dist-esm/socket/protocol.d.ts +10 -2
- package/dist-esm/socket/protocol.d.ts.map +1 -1
- package/dist-esm/types/ai/index.d.ts +33 -0
- package/dist-esm/types/ai/index.d.ts.map +1 -1
- package/dist-esm/types/ai/index.js +7 -1
- package/dist-esm/types/ai/index.js.map +1 -1
- package/dist-esm/types/api/action.d.ts +1 -0
- package/dist-esm/types/api/action.d.ts.map +1 -1
- package/dist-esm/types/api/action.js.map +1 -1
- package/dist-esm/types/plugin/form.d.ts +5 -0
- package/dist-esm/types/plugin/form.d.ts.map +1 -1
- package/dist-esm/types/plugin/form.js.map +1 -1
- package/package.json +11 -11
- package/src/plugins/index.ts +47 -0
- package/src/plugins/templates/athena.ts +56 -1
- package/src/plugins/templates/bigquery.ts +39 -1
- package/src/plugins/templates/cockroachdb.ts +39 -1
- package/src/plugins/templates/databricks.ts +56 -1
- package/src/plugins/templates/mariadb.ts +63 -1
- package/src/plugins/templates/mssql.ts +63 -1
- package/src/plugins/templates/mysql.ts +63 -1
- package/src/plugins/templates/oracledb.ts +56 -1
- package/src/plugins/templates/postgres.ts +48 -2
- package/src/plugins/templates/redshift.ts +39 -1
- package/src/plugins/templates/snowflake.ts +39 -1
- package/src/socket/protocol.ts +11 -3
- package/src/types/ai/index.ts +36 -0
- package/src/types/api/action.ts +1 -0
- package/src/types/plugin/form.ts +5 -0
|
@@ -19,7 +19,8 @@ export const MariaDBPluginVersions = {
|
|
|
19
19
|
V8: '0.0.8',
|
|
20
20
|
V9: '0.0.9',
|
|
21
21
|
V10: '0.0.10',
|
|
22
|
-
V11: '0.0.11'
|
|
22
|
+
V11: '0.0.11',
|
|
23
|
+
V12: '0.0.12'
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
const BASE_HOST = {
|
|
@@ -336,6 +337,7 @@ export const MariaDBPlugin: Plugin = {
|
|
|
336
337
|
label: 'Operation',
|
|
337
338
|
name: 'operation',
|
|
338
339
|
startVersion: MariaDBPluginVersions.V10,
|
|
340
|
+
endVersion: MariaDBPluginVersions.V11,
|
|
339
341
|
componentType: FormComponentType.DROPDOWN,
|
|
340
342
|
options: [
|
|
341
343
|
{
|
|
@@ -351,6 +353,49 @@ export const MariaDBPlugin: Plugin = {
|
|
|
351
353
|
],
|
|
352
354
|
initialValue: SqlOperations.RUN_SQL
|
|
353
355
|
},
|
|
356
|
+
{
|
|
357
|
+
// Only show operation dropdown if UPDATE_ROWS was previously selected
|
|
358
|
+
// This effectively deprecates UPDATE_ROWS for new actions
|
|
359
|
+
label: 'Operation',
|
|
360
|
+
name: 'operation',
|
|
361
|
+
startVersion: MariaDBPluginVersions.V12,
|
|
362
|
+
componentType: FormComponentType.DROPDOWN,
|
|
363
|
+
options: [
|
|
364
|
+
{
|
|
365
|
+
displayName: 'Run SQL',
|
|
366
|
+
key: SqlOperations.RUN_SQL,
|
|
367
|
+
value: SqlOperations.RUN_SQL
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
displayName: 'Insert, update, or delete rows with form',
|
|
371
|
+
key: SqlOperations.UPDATE_ROWS,
|
|
372
|
+
value: SqlOperations.UPDATE_ROWS
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
initialValue: SqlOperations.RUN_SQL,
|
|
376
|
+
display: {
|
|
377
|
+
show: {
|
|
378
|
+
operation: [SqlOperations.UPDATE_ROWS]
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
label: 'Parameters (?, ?, ...)',
|
|
384
|
+
name: 'parameters',
|
|
385
|
+
startVersion: MariaDBPluginVersions.V12,
|
|
386
|
+
ldFlag: 'clark.parameterized-apis.v2.enabled',
|
|
387
|
+
componentType: FormComponentType.DYNAMIC_INPUT_TEXT,
|
|
388
|
+
placeholder: '[param1, param2, ...]',
|
|
389
|
+
tooltip: {
|
|
390
|
+
markdownText:
|
|
391
|
+
'JavaScript expression that evaluates to an array of parameter values. Use `?` placeholders in your SQL query to reference these parameters.'
|
|
392
|
+
},
|
|
393
|
+
display: {
|
|
394
|
+
show: {
|
|
395
|
+
operation: ['undefined', SqlOperations.RUN_SQL]
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
354
399
|
{
|
|
355
400
|
label: '', // Query
|
|
356
401
|
name: 'body',
|
|
@@ -617,6 +662,7 @@ export const MariaDBPlugin: Plugin = {
|
|
|
617
662
|
label: 'Use parameterized SQL',
|
|
618
663
|
name: 'usePreparedSql',
|
|
619
664
|
startVersion: MariaDBPluginVersions.V6,
|
|
665
|
+
endVersion: MariaDBPluginVersions.V11,
|
|
620
666
|
componentType: FormComponentType.SWITCH,
|
|
621
667
|
initialValue: true,
|
|
622
668
|
tooltip: {
|
|
@@ -627,6 +673,22 @@ export const MariaDBPlugin: Plugin = {
|
|
|
627
673
|
operation: ['undefined', SqlOperations.RUN_SQL]
|
|
628
674
|
}
|
|
629
675
|
}
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
label: 'Use parameterized SQL',
|
|
679
|
+
name: 'usePreparedSql',
|
|
680
|
+
startVersion: MariaDBPluginVersions.V12,
|
|
681
|
+
componentType: FormComponentType.SWITCH,
|
|
682
|
+
initialValue: true,
|
|
683
|
+
tooltip: {
|
|
684
|
+
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
685
|
+
},
|
|
686
|
+
display: {
|
|
687
|
+
show: {
|
|
688
|
+
operation: [SqlOperations.RUN_SQL],
|
|
689
|
+
parameters: ['undefined']
|
|
690
|
+
}
|
|
691
|
+
}
|
|
630
692
|
}
|
|
631
693
|
]
|
|
632
694
|
}
|
|
@@ -19,7 +19,8 @@ export const MicrosoftSQLPluginVersions = {
|
|
|
19
19
|
V7: '0.0.7',
|
|
20
20
|
V8: '0.0.8',
|
|
21
21
|
V9: '0.0.9',
|
|
22
|
-
V10: '0.0.10'
|
|
22
|
+
V10: '0.0.10',
|
|
23
|
+
V11: '0.0.11'
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
const BASE_HOST = {
|
|
@@ -216,6 +217,7 @@ export const MicrosoftSQLPlugin: Plugin = {
|
|
|
216
217
|
label: 'Operation',
|
|
217
218
|
name: 'operation',
|
|
218
219
|
startVersion: MicrosoftSQLPluginVersions.V9,
|
|
220
|
+
endVersion: MicrosoftSQLPluginVersions.V10,
|
|
219
221
|
componentType: FormComponentType.DROPDOWN,
|
|
220
222
|
options: [
|
|
221
223
|
{
|
|
@@ -231,6 +233,49 @@ export const MicrosoftSQLPlugin: Plugin = {
|
|
|
231
233
|
],
|
|
232
234
|
initialValue: SqlOperations.RUN_SQL
|
|
233
235
|
},
|
|
236
|
+
{
|
|
237
|
+
// Only show operation dropdown if UPDATE_ROWS was previously selected
|
|
238
|
+
// This effectively deprecates UPDATE_ROWS for new actions
|
|
239
|
+
label: 'Operation',
|
|
240
|
+
name: 'operation',
|
|
241
|
+
startVersion: MicrosoftSQLPluginVersions.V11,
|
|
242
|
+
componentType: FormComponentType.DROPDOWN,
|
|
243
|
+
options: [
|
|
244
|
+
{
|
|
245
|
+
displayName: 'Run SQL',
|
|
246
|
+
key: SqlOperations.RUN_SQL,
|
|
247
|
+
value: SqlOperations.RUN_SQL
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
displayName: 'Insert, update, or delete rows with form',
|
|
251
|
+
key: SqlOperations.UPDATE_ROWS,
|
|
252
|
+
value: SqlOperations.UPDATE_ROWS
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
initialValue: SqlOperations.RUN_SQL,
|
|
256
|
+
display: {
|
|
257
|
+
show: {
|
|
258
|
+
operation: [SqlOperations.UPDATE_ROWS]
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
label: 'Parameters (@PARAM_1, @PARAM_2, ...)',
|
|
264
|
+
name: 'parameters',
|
|
265
|
+
startVersion: MicrosoftSQLPluginVersions.V11,
|
|
266
|
+
ldFlag: 'clark.parameterized-apis.v2.enabled',
|
|
267
|
+
componentType: FormComponentType.DYNAMIC_INPUT_TEXT,
|
|
268
|
+
placeholder: '[param1, param2, ...]',
|
|
269
|
+
tooltip: {
|
|
270
|
+
markdownText:
|
|
271
|
+
'JavaScript expression that evaluates to an array of parameter values. Use `@PARAM_1`, `@PARAM_2`, etc. in your SQL query to reference these parameters.'
|
|
272
|
+
},
|
|
273
|
+
display: {
|
|
274
|
+
show: {
|
|
275
|
+
operation: ['undefined', SqlOperations.RUN_SQL]
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
234
279
|
{
|
|
235
280
|
label: '', // Query
|
|
236
281
|
name: 'body',
|
|
@@ -497,6 +542,7 @@ export const MicrosoftSQLPlugin: Plugin = {
|
|
|
497
542
|
label: 'Use parameterized SQL',
|
|
498
543
|
name: 'usePreparedSql',
|
|
499
544
|
startVersion: MicrosoftSQLPluginVersions.V6,
|
|
545
|
+
endVersion: MicrosoftSQLPluginVersions.V10,
|
|
500
546
|
componentType: FormComponentType.SWITCH,
|
|
501
547
|
initialValue: true,
|
|
502
548
|
tooltip: {
|
|
@@ -507,6 +553,22 @@ export const MicrosoftSQLPlugin: Plugin = {
|
|
|
507
553
|
operation: ['undefined', SqlOperations.RUN_SQL]
|
|
508
554
|
}
|
|
509
555
|
}
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
label: 'Use parameterized SQL',
|
|
559
|
+
name: 'usePreparedSql',
|
|
560
|
+
startVersion: MicrosoftSQLPluginVersions.V11,
|
|
561
|
+
componentType: FormComponentType.SWITCH,
|
|
562
|
+
initialValue: true,
|
|
563
|
+
tooltip: {
|
|
564
|
+
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
565
|
+
},
|
|
566
|
+
display: {
|
|
567
|
+
show: {
|
|
568
|
+
operation: [SqlOperations.RUN_SQL],
|
|
569
|
+
parameters: ['undefined']
|
|
570
|
+
}
|
|
571
|
+
}
|
|
510
572
|
}
|
|
511
573
|
]
|
|
512
574
|
}
|
|
@@ -19,7 +19,8 @@ export const MySQLPluginVersions = {
|
|
|
19
19
|
V8: '0.0.8',
|
|
20
20
|
V9: '0.0.9',
|
|
21
21
|
V10: '0.0.10',
|
|
22
|
-
V11: '0.0.11'
|
|
22
|
+
V11: '0.0.11',
|
|
23
|
+
V12: '0.0.12'
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
const BASE_HOST = {
|
|
@@ -356,6 +357,7 @@ export const MySQLPlugin: Plugin = {
|
|
|
356
357
|
label: 'Operation',
|
|
357
358
|
name: 'operation',
|
|
358
359
|
startVersion: MySQLPluginVersions.V10,
|
|
360
|
+
endVersion: MySQLPluginVersions.V11,
|
|
359
361
|
componentType: FormComponentType.DROPDOWN,
|
|
360
362
|
options: [
|
|
361
363
|
{
|
|
@@ -371,6 +373,49 @@ export const MySQLPlugin: Plugin = {
|
|
|
371
373
|
],
|
|
372
374
|
initialValue: SqlOperations.RUN_SQL
|
|
373
375
|
},
|
|
376
|
+
{
|
|
377
|
+
// Only show operation dropdown if UPDATE_ROWS was previously selected
|
|
378
|
+
// This effectively deprecates UPDATE_ROWS for new actions
|
|
379
|
+
label: 'Operation',
|
|
380
|
+
name: 'operation',
|
|
381
|
+
startVersion: MySQLPluginVersions.V12,
|
|
382
|
+
componentType: FormComponentType.DROPDOWN,
|
|
383
|
+
options: [
|
|
384
|
+
{
|
|
385
|
+
displayName: 'Run SQL',
|
|
386
|
+
key: SqlOperations.RUN_SQL,
|
|
387
|
+
value: SqlOperations.RUN_SQL
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
displayName: 'Insert, update, or delete rows with form',
|
|
391
|
+
key: SqlOperations.UPDATE_ROWS,
|
|
392
|
+
value: SqlOperations.UPDATE_ROWS
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
initialValue: SqlOperations.RUN_SQL,
|
|
396
|
+
display: {
|
|
397
|
+
show: {
|
|
398
|
+
operation: [SqlOperations.UPDATE_ROWS]
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
label: 'Parameters (?, ?, ...)',
|
|
404
|
+
name: 'parameters',
|
|
405
|
+
startVersion: MySQLPluginVersions.V12,
|
|
406
|
+
ldFlag: 'clark.parameterized-apis.v2.enabled',
|
|
407
|
+
componentType: FormComponentType.DYNAMIC_INPUT_TEXT,
|
|
408
|
+
placeholder: '[param1, param2, ...]',
|
|
409
|
+
tooltip: {
|
|
410
|
+
markdownText:
|
|
411
|
+
'JavaScript expression that evaluates to an array of parameter values. Use `?` placeholders in your SQL query to reference these parameters.'
|
|
412
|
+
},
|
|
413
|
+
display: {
|
|
414
|
+
show: {
|
|
415
|
+
operation: ['undefined', SqlOperations.RUN_SQL]
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
374
419
|
{
|
|
375
420
|
label: '', // Query
|
|
376
421
|
name: 'body',
|
|
@@ -637,6 +682,7 @@ export const MySQLPlugin: Plugin = {
|
|
|
637
682
|
label: 'Use parameterized SQL',
|
|
638
683
|
name: 'usePreparedSql',
|
|
639
684
|
startVersion: MySQLPluginVersions.V6,
|
|
685
|
+
endVersion: MySQLPluginVersions.V11,
|
|
640
686
|
componentType: FormComponentType.SWITCH,
|
|
641
687
|
initialValue: true,
|
|
642
688
|
tooltip: {
|
|
@@ -647,6 +693,22 @@ export const MySQLPlugin: Plugin = {
|
|
|
647
693
|
operation: ['undefined', SqlOperations.RUN_SQL]
|
|
648
694
|
}
|
|
649
695
|
}
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
label: 'Use parameterized SQL',
|
|
699
|
+
name: 'usePreparedSql',
|
|
700
|
+
startVersion: MySQLPluginVersions.V12,
|
|
701
|
+
componentType: FormComponentType.SWITCH,
|
|
702
|
+
initialValue: true,
|
|
703
|
+
tooltip: {
|
|
704
|
+
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
705
|
+
},
|
|
706
|
+
display: {
|
|
707
|
+
show: {
|
|
708
|
+
operation: [SqlOperations.RUN_SQL],
|
|
709
|
+
parameters: ['undefined']
|
|
710
|
+
}
|
|
711
|
+
}
|
|
650
712
|
}
|
|
651
713
|
]
|
|
652
714
|
}
|
|
@@ -13,7 +13,8 @@ import { CONNECTION_METHODS_AND_DISPLAY_NAMES, makeDropdownItem } from './shared
|
|
|
13
13
|
|
|
14
14
|
export const OracleDbPluginVersions = {
|
|
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
|
const BASE_HOST = {
|
|
@@ -186,10 +187,31 @@ export const OracleDbPlugin: Plugin = {
|
|
|
186
187
|
{
|
|
187
188
|
name: 'main',
|
|
188
189
|
items: [
|
|
190
|
+
{
|
|
191
|
+
label: 'Parameters (:1, :2, ...)',
|
|
192
|
+
name: 'runSql.parameters',
|
|
193
|
+
startVersion: OracleDbPluginVersions.V3,
|
|
194
|
+
ldFlag: 'clark.parameterized-apis.v2.enabled',
|
|
195
|
+
componentType: FormComponentType.DYNAMIC_INPUT_TEXT,
|
|
196
|
+
placeholder: '[param1, param2, ...]',
|
|
197
|
+
tooltip: {
|
|
198
|
+
markdownText:
|
|
199
|
+
'JavaScript expression that evaluates to an array of parameter values. Use `:1`, `:2`, etc. in your SQL query to reference these parameters.'
|
|
200
|
+
}
|
|
201
|
+
},
|
|
189
202
|
{
|
|
190
203
|
label: '', // Query
|
|
191
204
|
name: 'runSql.sqlBody',
|
|
192
205
|
startVersion: OracleDbPluginVersions.V1,
|
|
206
|
+
endVersion: OracleDbPluginVersions.V2,
|
|
207
|
+
componentType: FormComponentType.CODE_EDITOR,
|
|
208
|
+
language: EditorLanguage.SQL,
|
|
209
|
+
initialValue: DB_SQL_INITIAL_TEXT
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
label: '', // Query
|
|
213
|
+
name: 'runSql.sqlBody',
|
|
214
|
+
startVersion: OracleDbPluginVersions.V3,
|
|
193
215
|
componentType: FormComponentType.CODE_EDITOR,
|
|
194
216
|
language: EditorLanguage.SQL,
|
|
195
217
|
initialValue: DB_SQL_INITIAL_TEXT
|
|
@@ -203,10 +225,43 @@ export const OracleDbPlugin: Plugin = {
|
|
|
203
225
|
label: 'Use parameterized SQL',
|
|
204
226
|
name: 'runSql.useParameterized',
|
|
205
227
|
startVersion: OracleDbPluginVersions.V1,
|
|
228
|
+
endVersion: OracleDbPluginVersions.V2,
|
|
229
|
+
componentType: FormComponentType.SWITCH,
|
|
230
|
+
initialValue: true,
|
|
231
|
+
tooltip: {
|
|
232
|
+
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
label: 'Use parameterized SQL',
|
|
237
|
+
name: 'runSql.useParameterized',
|
|
238
|
+
startVersion: OracleDbPluginVersions.V3,
|
|
239
|
+
ldFlag: '!clark.parameterized-apis.v2.enabled',
|
|
206
240
|
componentType: FormComponentType.SWITCH,
|
|
207
241
|
initialValue: true,
|
|
208
242
|
tooltip: {
|
|
209
243
|
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
244
|
+
},
|
|
245
|
+
display: {
|
|
246
|
+
show: {
|
|
247
|
+
'runSql.parameters': ['undefined']
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
label: 'Use parameterized SQL',
|
|
253
|
+
name: 'runSql.useParameterized',
|
|
254
|
+
startVersion: OracleDbPluginVersions.V3,
|
|
255
|
+
ldFlag: 'clark.parameterized-apis.v2.enabled',
|
|
256
|
+
componentType: FormComponentType.SWITCH,
|
|
257
|
+
initialValue: undefined,
|
|
258
|
+
tooltip: {
|
|
259
|
+
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
260
|
+
},
|
|
261
|
+
display: {
|
|
262
|
+
show: {
|
|
263
|
+
'runSql.parameters': ['undefined']
|
|
264
|
+
}
|
|
210
265
|
}
|
|
211
266
|
}
|
|
212
267
|
]
|
|
@@ -19,7 +19,8 @@ export const PostgresPluginVersions = {
|
|
|
19
19
|
V8: '0.0.8',
|
|
20
20
|
V9: '0.0.9',
|
|
21
21
|
V10: '0.0.10',
|
|
22
|
-
V11: '0.0.11'
|
|
22
|
+
V11: '0.0.11',
|
|
23
|
+
V12: '0.0.12'
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
const BASE_HOST = {
|
|
@@ -344,6 +345,7 @@ export const PostgresPlugin: Plugin = {
|
|
|
344
345
|
label: 'Operation',
|
|
345
346
|
name: 'operation',
|
|
346
347
|
startVersion: PostgresPluginVersions.V10,
|
|
348
|
+
endVersion: PostgresPluginVersions.V11,
|
|
347
349
|
componentType: FormComponentType.DROPDOWN,
|
|
348
350
|
options: [
|
|
349
351
|
{
|
|
@@ -359,6 +361,49 @@ export const PostgresPlugin: Plugin = {
|
|
|
359
361
|
],
|
|
360
362
|
initialValue: SqlOperations.RUN_SQL
|
|
361
363
|
},
|
|
364
|
+
{
|
|
365
|
+
// Only show operation dropdown if UPDATE_ROWS was previously selected
|
|
366
|
+
// This effectively deprecates UPDATE_ROWS for new actions
|
|
367
|
+
label: 'Operation',
|
|
368
|
+
name: 'operation',
|
|
369
|
+
startVersion: PostgresPluginVersions.V12,
|
|
370
|
+
componentType: FormComponentType.DROPDOWN,
|
|
371
|
+
options: [
|
|
372
|
+
{
|
|
373
|
+
displayName: 'Run SQL',
|
|
374
|
+
key: SqlOperations.RUN_SQL,
|
|
375
|
+
value: SqlOperations.RUN_SQL
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
displayName: 'Insert, update, or delete rows with form',
|
|
379
|
+
key: SqlOperations.UPDATE_ROWS,
|
|
380
|
+
value: SqlOperations.UPDATE_ROWS
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
initialValue: SqlOperations.RUN_SQL,
|
|
384
|
+
display: {
|
|
385
|
+
show: {
|
|
386
|
+
operation: [SqlOperations.UPDATE_ROWS]
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
label: 'Parameters ($1, $2, ...)',
|
|
392
|
+
name: 'parameters',
|
|
393
|
+
startVersion: PostgresPluginVersions.V12,
|
|
394
|
+
ldFlag: 'clark.parameterized-apis.v2.enabled',
|
|
395
|
+
componentType: FormComponentType.DYNAMIC_INPUT_TEXT,
|
|
396
|
+
placeholder: '[param1, param2, ...]',
|
|
397
|
+
tooltip: {
|
|
398
|
+
markdownText:
|
|
399
|
+
'JavaScript expression that evaluates to an array of parameter values. Use `$1`, `$2`, etc. in your SQL query to reference these parameters.'
|
|
400
|
+
},
|
|
401
|
+
display: {
|
|
402
|
+
show: {
|
|
403
|
+
operation: ['undefined', SqlOperations.RUN_SQL]
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
},
|
|
362
407
|
{
|
|
363
408
|
label: '', // Query
|
|
364
409
|
name: 'body',
|
|
@@ -632,7 +677,8 @@ export const PostgresPlugin: Plugin = {
|
|
|
632
677
|
},
|
|
633
678
|
display: {
|
|
634
679
|
show: {
|
|
635
|
-
operation: ['undefined', SqlOperations.RUN_SQL]
|
|
680
|
+
operation: ['undefined', SqlOperations.RUN_SQL],
|
|
681
|
+
parameters: ['undefined']
|
|
636
682
|
}
|
|
637
683
|
}
|
|
638
684
|
}
|
|
@@ -6,7 +6,8 @@ export const RedshiftPluginVersions = {
|
|
|
6
6
|
V1: '0.0.1',
|
|
7
7
|
V2: '0.0.2',
|
|
8
8
|
V6: '0.0.6',
|
|
9
|
-
V7: '0.0.7'
|
|
9
|
+
V7: '0.0.7',
|
|
10
|
+
V8: '0.0.8'
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
const BASE_HOST = {
|
|
@@ -221,10 +222,31 @@ export const RedshiftPlugin: Plugin = {
|
|
|
221
222
|
{
|
|
222
223
|
name: 'main',
|
|
223
224
|
items: [
|
|
225
|
+
{
|
|
226
|
+
label: 'Parameters ($1, $2, ...)',
|
|
227
|
+
name: 'parameters',
|
|
228
|
+
startVersion: RedshiftPluginVersions.V8,
|
|
229
|
+
ldFlag: 'clark.parameterized-apis.v2.enabled',
|
|
230
|
+
componentType: FormComponentType.DYNAMIC_INPUT_TEXT,
|
|
231
|
+
placeholder: '[param1, param2, ...]',
|
|
232
|
+
tooltip: {
|
|
233
|
+
markdownText:
|
|
234
|
+
'JavaScript expression that evaluates to an array of parameter values. Use `$1`, `$2`, etc. in your SQL query to reference these parameters.'
|
|
235
|
+
}
|
|
236
|
+
},
|
|
224
237
|
{
|
|
225
238
|
label: '', // Query
|
|
226
239
|
name: 'body',
|
|
227
240
|
startVersion: RedshiftPluginVersions.V1,
|
|
241
|
+
endVersion: RedshiftPluginVersions.V7,
|
|
242
|
+
componentType: FormComponentType.CODE_EDITOR,
|
|
243
|
+
language: EditorLanguage.SQL,
|
|
244
|
+
initialValue: SQL_INITIAL_TEXT
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
label: '', // Query
|
|
248
|
+
name: 'body',
|
|
249
|
+
startVersion: RedshiftPluginVersions.V8,
|
|
228
250
|
componentType: FormComponentType.CODE_EDITOR,
|
|
229
251
|
language: EditorLanguage.SQL,
|
|
230
252
|
initialValue: SQL_INITIAL_TEXT
|
|
@@ -238,11 +260,27 @@ export const RedshiftPlugin: Plugin = {
|
|
|
238
260
|
label: 'Use parameterized SQL',
|
|
239
261
|
name: 'usePreparedSql',
|
|
240
262
|
startVersion: RedshiftPluginVersions.V6,
|
|
263
|
+
endVersion: RedshiftPluginVersions.V7,
|
|
241
264
|
componentType: FormComponentType.SWITCH,
|
|
242
265
|
initialValue: true,
|
|
243
266
|
tooltip: {
|
|
244
267
|
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
245
268
|
}
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
label: 'Use parameterized SQL',
|
|
272
|
+
name: 'usePreparedSql',
|
|
273
|
+
startVersion: RedshiftPluginVersions.V8,
|
|
274
|
+
componentType: FormComponentType.SWITCH,
|
|
275
|
+
initialValue: true,
|
|
276
|
+
tooltip: {
|
|
277
|
+
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
278
|
+
},
|
|
279
|
+
display: {
|
|
280
|
+
show: {
|
|
281
|
+
parameters: ['undefined']
|
|
282
|
+
}
|
|
283
|
+
}
|
|
246
284
|
}
|
|
247
285
|
]
|
|
248
286
|
}
|
|
@@ -27,7 +27,8 @@ export const SnowflakePluginVersions = {
|
|
|
27
27
|
V7: '0.0.7',
|
|
28
28
|
V8: '0.0.8',
|
|
29
29
|
V9: '0.0.9',
|
|
30
|
-
V10: '0.0.10'
|
|
30
|
+
V10: '0.0.10',
|
|
31
|
+
V11: '0.0.11'
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
const CONNECTION_TYPE_FIELD = 'connectionType';
|
|
@@ -461,10 +462,31 @@ export const SnowflakePlugin: Plugin = {
|
|
|
461
462
|
{
|
|
462
463
|
name: 'main',
|
|
463
464
|
items: [
|
|
465
|
+
{
|
|
466
|
+
label: 'Parameters (?, ?, ...)',
|
|
467
|
+
name: 'parameters',
|
|
468
|
+
startVersion: SnowflakePluginVersions.V11,
|
|
469
|
+
ldFlag: 'clark.parameterized-apis.v2.enabled',
|
|
470
|
+
componentType: FormComponentType.DYNAMIC_INPUT_TEXT,
|
|
471
|
+
placeholder: '[param1, param2, ...]',
|
|
472
|
+
tooltip: {
|
|
473
|
+
markdownText:
|
|
474
|
+
'JavaScript expression that evaluates to an array of parameter values. Use `?` placeholders in your SQL query to reference these parameters.'
|
|
475
|
+
}
|
|
476
|
+
},
|
|
464
477
|
{
|
|
465
478
|
label: '', // Query
|
|
466
479
|
name: 'body',
|
|
467
480
|
startVersion: SnowflakePluginVersions.V1,
|
|
481
|
+
endVersion: SnowflakePluginVersions.V10,
|
|
482
|
+
componentType: FormComponentType.CODE_EDITOR,
|
|
483
|
+
language: EditorLanguage.SQL,
|
|
484
|
+
initialValue: SQL_INITIAL_TEXT
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
label: '', // Query
|
|
488
|
+
name: 'body',
|
|
489
|
+
startVersion: SnowflakePluginVersions.V11,
|
|
468
490
|
componentType: FormComponentType.CODE_EDITOR,
|
|
469
491
|
language: EditorLanguage.SQL,
|
|
470
492
|
initialValue: SQL_INITIAL_TEXT
|
|
@@ -478,10 +500,26 @@ export const SnowflakePlugin: Plugin = {
|
|
|
478
500
|
label: 'Use parameterized SQL',
|
|
479
501
|
name: 'usePreparedSql',
|
|
480
502
|
startVersion: SnowflakePluginVersions.V6,
|
|
503
|
+
endVersion: SnowflakePluginVersions.V10,
|
|
504
|
+
componentType: FormComponentType.SWITCH,
|
|
505
|
+
initialValue: true,
|
|
506
|
+
tooltip: {
|
|
507
|
+
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
label: 'Use parameterized SQL',
|
|
512
|
+
name: 'usePreparedSql',
|
|
513
|
+
startVersion: SnowflakePluginVersions.V11,
|
|
481
514
|
componentType: FormComponentType.SWITCH,
|
|
482
515
|
initialValue: true,
|
|
483
516
|
tooltip: {
|
|
484
517
|
markdownText: PARAMETERIZED_SQL_DESCRIPTION
|
|
518
|
+
},
|
|
519
|
+
display: {
|
|
520
|
+
show: {
|
|
521
|
+
parameters: ['undefined']
|
|
522
|
+
}
|
|
485
523
|
}
|
|
486
524
|
}
|
|
487
525
|
]
|
package/src/socket/protocol.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { DirectoryEntry, PutManyRequestPayload, PutManyResponsePayload } from '../dbfs/types.js';
|
|
4
4
|
import { ApiToSign, ApiToVerify, AppToSign, AppToVerify, ApplicationSignatureTreeSigned, Signature } from '../signing/constants.js';
|
|
5
|
-
import { AiChatMessageDto, AiChatMessagePayload } from '../types/index.js';
|
|
5
|
+
import { AiChatMessageDto, AiChatMessagePayload, AiWorkflowEvent } from '../types/index.js';
|
|
6
6
|
import {
|
|
7
7
|
ApplicationConfiguration,
|
|
8
8
|
ApplicationPageClonePayload,
|
|
@@ -120,12 +120,20 @@ export interface ServerMethods {
|
|
|
120
120
|
chat: {
|
|
121
121
|
pushMessage: ServerMethodSchema<
|
|
122
122
|
{ applicationId: string; payload: AiChatMessagePayload; version?: number; branchName?: string | null },
|
|
123
|
-
|
|
123
|
+
{ chatmessageId: string }
|
|
124
|
+
>;
|
|
125
|
+
getMessages: ServerMethodSchema<
|
|
126
|
+
{ applicationId: string; branchName?: string | null; limit?: number },
|
|
127
|
+
{ messages: AiChatMessageDto[] }
|
|
124
128
|
>;
|
|
125
|
-
getMessages: ServerMethodSchema<{ applicationId: string; branchName?: string | null }, { messages: AiChatMessageDto[] }>;
|
|
126
129
|
new: ServerMethodSchema<{ applicationId: string; branchName?: string | null }, void>;
|
|
127
130
|
truncateAfterTimestamp: ServerMethodSchema<{ applicationId: string; sinceTimestamp: number }, void>;
|
|
128
131
|
};
|
|
132
|
+
billing: {
|
|
133
|
+
workflowSummary: {
|
|
134
|
+
submit: ServerMethodSchema<AiWorkflowEvent, void>;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
129
137
|
};
|
|
130
138
|
};
|
|
131
139
|
v2: {
|
package/src/types/ai/index.ts
CHANGED
|
@@ -7,3 +7,39 @@ export type AiChatMessageDto = {
|
|
|
7
7
|
authorEmail?: string | null;
|
|
8
8
|
authorName?: string | null;
|
|
9
9
|
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* System event trigger types for AI operations without prompt_id
|
|
13
|
+
*/
|
|
14
|
+
export enum AiSystemTriggerType {
|
|
15
|
+
COMMIT_MESSAGE = 'commit_message'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Attributes for AI workflow summary events (used in CloudEvents)
|
|
20
|
+
* These are the core metrics tracked for AI workflows
|
|
21
|
+
*/
|
|
22
|
+
export interface AiWorkflowAttributes {
|
|
23
|
+
/** Total number of tool invocations across all LLM calls */
|
|
24
|
+
tool_call_count?: number;
|
|
25
|
+
/** Total number of reasoning steps across all LLM calls */
|
|
26
|
+
step_count?: number;
|
|
27
|
+
/** Total lines of code added during workflow */
|
|
28
|
+
lines_added?: number;
|
|
29
|
+
/** Total lines of code edited during workflow */
|
|
30
|
+
lines_edited?: number;
|
|
31
|
+
/** Total lines of code removed during workflow */
|
|
32
|
+
lines_removed?: number;
|
|
33
|
+
/** When the workflow started (first LLM call) */
|
|
34
|
+
workflow_started_at?: string;
|
|
35
|
+
/** When the workflow completed (last LLM call) */
|
|
36
|
+
workflow_completed_at?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* AI workflow summary with promptId for socket protocol
|
|
41
|
+
*/
|
|
42
|
+
export interface AiWorkflowEvent {
|
|
43
|
+
promptId: string;
|
|
44
|
+
attributes: AiWorkflowAttributes;
|
|
45
|
+
}
|
package/src/types/api/action.ts
CHANGED
|
@@ -96,6 +96,7 @@ export type GoogleSheetsActionConfiguration = {
|
|
|
96
96
|
export type DBActionConfiguration = {
|
|
97
97
|
body?: string;
|
|
98
98
|
usePreparedSql?: boolean;
|
|
99
|
+
parameters?: string;
|
|
99
100
|
// When operation is undefined we assume it's RUN_SQL, otherwise it's part of the SqlOperations enum
|
|
100
101
|
operation?: string;
|
|
101
102
|
// When using operation UPDATE_ROWS the default behavior is to match by primary key- but
|
package/src/types/plugin/form.ts
CHANGED
|
@@ -150,6 +150,11 @@ export interface BaseFormItem {
|
|
|
150
150
|
agentType?: AgentType;
|
|
151
151
|
actionOptions?: { label?: string; value: string; children: { label: string; value: string; description?: string }[] }[];
|
|
152
152
|
transformation?: FormItemTransformation;
|
|
153
|
+
/**
|
|
154
|
+
* LaunchDarkly feature flag that controls whether this form item is shown.
|
|
155
|
+
* If the flag evaluates to false, the item is removed from the form.
|
|
156
|
+
* Supports negation with "!" prefix (e.g., "!feature.disabled" shows when flag is false).
|
|
157
|
+
*/
|
|
153
158
|
ldFlag?: string;
|
|
154
159
|
}
|
|
155
160
|
|