Skip to content

Commit d371675

Browse files
committed
feat: adding auth providers to webhook flow type
1 parent 8b11555 commit d371675

4 files changed

Lines changed: 119 additions & 2 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"identifier": "REST_AUTH_TYPE",
3+
"name": [
4+
{
5+
"code": "en-US",
6+
"content": "Webhook credential variant"
7+
}
8+
],
9+
"alias": [
10+
{
11+
"code": "en-US",
12+
"content": "http;method;get;post;put;delete;path;head"
13+
}
14+
],
15+
"displayMessage": [
16+
{
17+
"code": "en-US",
18+
"content": "Webhook credential variant"
19+
}
20+
],
21+
"type": "'Bearer JWT' | 'Bearer static' | 'Basic'",
22+
"linkedDataTypeIdentifiers": [],
23+
"rules": []
24+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"identifier": "REST_AUTH_VALUE",
3+
"name": [
4+
{
5+
"code": "en-US",
6+
"content": "Webhook credential value"
7+
}
8+
],
9+
"alias": [
10+
{
11+
"code": "en-US",
12+
"content": "http;method;get;post;put;delete;path;head"
13+
}
14+
],
15+
"displayMessage": [
16+
{
17+
"code": "en-US",
18+
"content": "Webhook credential value"
19+
}
20+
],
21+
"genericKeys": ["T"],
22+
"type": "T extends 'Basic' ? { username: string, password: string } : T extends undefined ? undefined : string",
23+
"linkedDataTypeIdentifiers": [],
24+
"rules": []
25+
}

definitions/draco_rest/flow_types/rest.proto.json

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
}
2929
],
3030
"displayIcon": "tabler:world-www",
31-
"signature": "<T>(input_schema: TYPE<T>, httpURL: HTTP_URL, httpMethod: HTTP_METHOD): REST_ADAPTER_INPUT<T>",
31+
"signature": "<A extends REST_AUTH_TYPE, T>(input_schema: TYPE<T>, httpURL: HTTP_URL, httpMethod: HTTP_METHOD, httpAuth: A, httpAuthValue: REST_AUTH_VALUE<A>): REST_ADAPTER_INPUT<T>",
3232
"linkedDataTypeIdentifiers": [
3333
"HTTP_URL",
3434
"HTTP_METHOD",
35+
"REST_AUTH_TYPE",
36+
"REST_AUTH_VALUE",
3537
"REST_ADAPTER_INPUT"
3638
],
3739
"settings": [
@@ -82,6 +84,38 @@
8284
"content": "Specifies the HTTP request method (e.g., GET, POST, PUT, DELETE)."
8385
}
8486
]
87+
},
88+
{
89+
"identifier": "httpAuth",
90+
"unique": "NONE",
91+
"name": [
92+
{
93+
"code": "en-US",
94+
"content": "Authentication type"
95+
}
96+
],
97+
"description": [
98+
{
99+
"code": "en-US",
100+
"content": "Specifies the authentication mechanism used for the incoming Webhook request (e.g., Bearer JWT, Bearer static, Basic)."
101+
}
102+
]
103+
},
104+
{
105+
"identifier": "httpAuthValue",
106+
"unique": "NONE",
107+
"name": [
108+
{
109+
"code": "en-US",
110+
"content": "Authentication value"
111+
}
112+
],
113+
"description": [
114+
{
115+
"code": "en-US",
116+
"content": "Provides the credential value matching the selected authentication type (e.g., token string or username/password pair)."
117+
}
118+
]
85119
}
86120
]
87121
}

definitions/draco_rest/runtime_flow_types/rest.proto.json

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@
2727
}
2828
],
2929
"displayIcon": "tabler:world-www",
30-
"signature": "<T>(input_schema: TYPE<T>, httpURL: HTTP_URL, httpMethod: HTTP_METHOD): REST_ADAPTER_INPUT<T>",
30+
"signature": "<A extends REST_AUTH_TYPE, T>(input_schema: TYPE<T>, httpURL: HTTP_URL, httpMethod: HTTP_METHOD, httpAuth: A, httpAuthValue: REST_AUTH_VALUE<A>): REST_ADAPTER_INPUT<T>",
3131
"linkedDataTypeIdentifiers": [
3232
"HTTP_URL",
3333
"HTTP_METHOD",
34+
"REST_AUTH_TYPE",
35+
"REST_AUTH_VALUE",
3436
"REST_ADAPTER_INPUT"
3537
],
3638
"runtimeSettings": [
@@ -81,6 +83,38 @@
8183
"content": "Specifies the HTTP request method (e.g., GET, POST, PUT, DELETE)."
8284
}
8385
]
86+
},
87+
{
88+
"identifier": "httpAuth",
89+
"unique": "NONE",
90+
"name": [
91+
{
92+
"code": "en-US",
93+
"content": "Authentication type"
94+
}
95+
],
96+
"description": [
97+
{
98+
"code": "en-US",
99+
"content": "Specifies the authentication mechanism used for the incoming Webhook request (e.g., Bearer JWT, Bearer static, Basic)."
100+
}
101+
]
102+
},
103+
{
104+
"identifier": "httpAuthValue",
105+
"unique": "NONE",
106+
"name": [
107+
{
108+
"code": "en-US",
109+
"content": "Authentication value"
110+
}
111+
],
112+
"description": [
113+
{
114+
"code": "en-US",
115+
"content": "Provides the credential value matching the selected authentication type (e.g., token string or username/password pair)."
116+
}
117+
]
84118
}
85119
]
86120
}

0 commit comments

Comments
 (0)