File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
server/node-service/src/plugins/googleCloudStorage Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { ConfigToType } from "lowcoder-sdk/dataSource" ;
2
+ import { specsToOptions } from "../../common/util" ;
2
3
4
+ const specs = {
5
+ "v1.0" : ""
6
+ }
3
7
export const dataSourceConfig = {
4
8
type : "dataSource" ,
5
9
params : [
@@ -18,6 +22,14 @@ export const dataSourceConfig = {
18
22
type : "textInput" ,
19
23
label : "Region" ,
20
24
} ,
25
+ {
26
+ label : "Spec Version" ,
27
+ key : "specVersion" ,
28
+ type : "select" ,
29
+ tooltip : "Version of the spec file." ,
30
+ placeholder : "v1.0" ,
31
+ options : specsToOptions ( specs )
32
+ } ,
21
33
] ,
22
34
} as const ;
23
35
Original file line number Diff line number Diff line change @@ -7,13 +7,18 @@ import { DataSourceDataType } from "./dataSourceConfig";
7
7
import run , { validateDataSourceConfig } from "./run" ;
8
8
import { dataSourceConfig } from "./dataSourceConfig" ;
9
9
10
+ const specs = {
11
+ "v1.0" : queryConfig
12
+ }
10
13
const gcsPlugin = {
11
14
id : "googleCloudStorage" ,
12
15
name : "Google Cloud Storage" ,
13
16
icon : "gcs.svg" ,
14
17
category : "api" ,
15
18
dataSourceConfig,
16
- queryConfig : queryConfig ,
19
+ queryConfig : async ( data : any ) => {
20
+ return specs [ data . specVersion as keyof typeof specs ] ;
21
+ } ,
17
22
18
23
validateDataSourceConfig : async ( dataSourceConfig : DataSourceDataType ) => {
19
24
return validateDataSourceConfig ( dataSourceConfig ) ;
You can’t perform that action at this time.
0 commit comments