Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0b2c9f

Browse files
Esievesunlei
authored andcommitted
feat: OneSignal
1 parent 46a0ec3 commit c0b2c9f

File tree

1 file changed

+12
-20
lines changed
  • server/node-service/src/plugins/oneSignal

1 file changed

+12
-20
lines changed

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

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,18 @@ const dataSourceConfig = {
1010
type: "dataSource",
1111
params: [
1212
{
13-
type: "groupTitle",
14-
key: "app_key",
15-
label: "Api Token Auth",
13+
"type": "password",
14+
"key": "app_key.value",
15+
"label": "REST API Key",
16+
'tooltip': 'Private key used for most API calls like sending push notifications and updating users. [Documentation](https://documentation.onesignal.com/docs/accounts-and-keys#rest-api-key)'
1617
},
1718
{
18-
type: "password",
19-
key: "app_key.value",
20-
label: "Token",
21-
},
22-
{
23-
type: "groupTitle",
24-
key: "user_key",
25-
label: "Api Token Auth",
26-
},
27-
{
28-
type: "password",
29-
key: "user_key.value",
30-
label: "Token",
31-
},
32-
],
19+
"type": "password",
20+
"key": "user_key.value",
21+
"label": "User Auth Key",
22+
'tooltip': 'Another type of REST API key used for viewing Apps and related updates. [Documentation](https://documentation.onesignal.com/docs/accounts-and-keys#user-auth-key)'
23+
}
24+
]
3325
} as const;
3426

3527
const parseOptions: ParseOpenApiOptions = {
@@ -47,12 +39,12 @@ const oneSignalPlugin: DataSourcePlugin<any, DataSourceConfigType> = {
4739
category: "api",
4840
dataSourceConfig,
4941
queryConfig: async () => {
50-
const { actions, categories } = await parseOpenApi(spec as OpenAPI.Document, parseOptions);
42+
const { actions, categories } = await parseOpenApi(spec as unknown as OpenAPI.Document, parseOptions);
5143
return {
5244
type: "query",
5345
label: "Action",
5446
categories: {
55-
label: "Category",
47+
label: "Resources",
5648
items: categories,
5749
},
5850
actions,

0 commit comments

Comments
 (0)