Skip to content

Commit e337fa0

Browse files
Esievesunlei
authored andcommitted
feat: Asana
1 parent 57d63da commit e337fa0

File tree

1 file changed

+13
-14
lines changed
  • server/node-service/src/plugins/asana

1 file changed

+13
-14
lines changed

server/node-service/src/plugins/asana/index.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,25 @@ import { ConfigToType, DataSourcePlugin } from "openblocks-sdk/dataSource";
66
import { runOpenApi } from "../openApi";
77
import { parseOpenApi, ParseOpenApiOptions } from "../openApi/parse";
88

9+
910
const spec = readYaml(path.join(__dirname, "./asana.spec.yaml"));
1011

12+
1113
const dataSourceConfig = {
1214
type: "dataSource",
1315
params: [
1416
{
15-
type: "groupTitle",
16-
key: "personalAccessToken",
17-
label: "Api Token Auth",
17+
"type": "groupTitle",
18+
"key": "personalAccessToken",
19+
"label": "Api Token Auth"
1820
},
1921
{
20-
type: "password",
21-
key: "personalAccessToken.value",
22-
label: "Token",
23-
tooltip:
24-
"A personal access token allows access to the api for the user who created it. This should be kept a secret and be treated like a password.",
25-
placeholder:
26-
"A personal access token allows access to the api for the user who created it. This should be kept a secret and be treated like a password.",
27-
},
28-
],
22+
"type": "password",
23+
"key": "personalAccessToken.value",
24+
"label": "Token",
25+
"tooltip": "A [personal access token](https://developers.asana.com/docs/personal-access-token) allows access to the api for the user who created it. This should be kept a secret and be treated like a password.",
26+
}
27+
]
2928
} as const;
3029

3130
const parseOptions: ParseOpenApiOptions = {
@@ -43,12 +42,12 @@ const asanaPlugin: DataSourcePlugin<any, DataSourceConfigType> = {
4342
category: "api",
4443
dataSourceConfig,
4544
queryConfig: async () => {
46-
const { actions, categories } = await parseOpenApi(spec, parseOptions);
45+
const { actions, categories } = await parseOpenApi(spec as OpenAPI.Document, parseOptions);
4746
return {
4847
type: "query",
4948
label: "Action",
5049
categories: {
51-
label: "Category",
50+
label: "Resources",
5251
items: categories,
5352
},
5453
actions,

0 commit comments

Comments
 (0)