Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"identifier": "REST_AUTH_TYPE",
"name": [
{
"code": "en-US",
"content": "Webhook credential variant"
}
],
"alias": [
{
"code": "en-US",
"content": "webhook;rest;auth;credential;type;variant;bearer;basic;jwt"
}
],
"displayMessage": [
{
"code": "en-US",
"content": "Webhook credential variant"
}
],
"type": "'Bearer JWT' | 'Bearer static' | 'Basic'",
"linkedDataTypeIdentifiers": [],
"rules": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"identifier": "REST_AUTH_VALUE",
"name": [
{
"code": "en-US",
"content": "Webhook credential value"
}
],
"alias": [
{
"code": "en-US",
"content": "webhook;rest;auth;credential;value;bearer;basic;username;password;token"
}
],
"displayMessage": [
{
"code": "en-US",
"content": "Webhook credential value"
}
],
"genericKeys": ["T"],
"type": "T extends 'Basic' ? { username: string, password: string } : T extends undefined ? undefined : string",
"linkedDataTypeIdentifiers": [],
"rules": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
"linkedDataTypeIdentifiers": [
"OBJECT"
],
"type": "{ payload: T, headers: OBJECT<{}> }"
"type": "{ payload: T, headers: OBJECT<{}>, query_params: OBJECT<{}>, path_params: OBJECT<{}> }"
}
67 changes: 59 additions & 8 deletions definitions/draco_rest/flow_types/rest.proto.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,52 @@
"name": [
{
"code": "en-US",
"content": "Rest Endpoint"
"content": "Webhook"
}
],
"description": [
{
"code": "en-US",
"content": "A REST API is a web service that lets clients interact with data on a server using standard HTTP methods like GET, POST, PUT, and DELETE usually returning results in JSON format."
"content": "A Webhook is an HTTP endpoint that listens for incoming requests from external services or clients, allowing you to react to events in real time using standard HTTP methods like GET, POST, PUT, and DELETE."
}
],
"documentation": [],
"displayMessage": [
{
"code": "en-US",
"content": "Trigger Rest-Flow on ${httpMethod} with a Request to ${httpURL}"
"content": "Webhook on ${httpMethod} at ${httpURL}"
}
],
"alias": [
{
"code": "en-US",
"content": "http;rest;route;web;webhook"
"content": "webhook;http;rest;route;web"
}
],
"displayIcon": "tabler:world-www",
"signature": "<T>(input_schema: TYPE<T>, httpURL: HTTP_URL, httpMethod: HTTP_METHOD): REST_ADAPTER_INPUT<T>",
"signature": "<A extends REST_AUTH_TYPE, T>(httpSchema: HTTP_SCHEMA, httpURL: HTTP_URL, httpMethod: HTTP_METHOD, httpAuth: A, httpAuthValue: REST_AUTH_VALUE<A>, input_schema: TYPE<T>): REST_ADAPTER_INPUT<T>",
"linkedDataTypeIdentifiers": [
"HTTP_SCHEMA",
"HTTP_URL",
"HTTP_METHOD",
"REST_AUTH_TYPE",
"REST_AUTH_VALUE",
"REST_ADAPTER_INPUT"
],
"settings": [
Comment thread
nicosammito marked this conversation as resolved.
{
"identifier": "input_schema",
"identifier": "httpSchema",
"unique": "NONE",
"name": [
{
"code": "en-US",
"content": "Input schema"
"content": "Content Type"
}
],
"description": [
{
"code": "en-US",
"content": "Input schema which defines the expected structure of the incoming request data."
"content": "Specifies the MIME type of the incoming request payload, such as application/json, application/xml, or text/plain. This determines the expected format of the payload parameter."
}
]
},
Expand Down Expand Up @@ -82,6 +85,54 @@
"content": "Specifies the HTTP request method (e.g., GET, POST, PUT, DELETE)."
}
]
},
{
"identifier": "httpAuth",
"unique": "NONE",
"name": [
{
"code": "en-US",
"content": "Authentication type"
}
],
"description": [
{
"code": "en-US",
"content": "Specifies the authentication mechanism used for the incoming Webhook request (e.g., Bearer JWT, Bearer static, Basic)."
}
]
},
{
"identifier": "httpAuthValue",
"unique": "NONE",
"name": [
{
"code": "en-US",
"content": "Authentication value"
}
],
"description": [
{
"code": "en-US",
"content": "Provides the credential value matching the selected authentication type (e.g., token string or username/password pair)."
}
]
},
{
"identifier": "input_schema",
"unique": "NONE",
"name": [
{
"code": "en-US",
"content": "Input schema"
}
],
"description": [
{
"code": "en-US",
"content": "Input schema which defines the expected structure of the incoming request data."
}
]
}
]
}
25 changes: 22 additions & 3 deletions definitions/draco_rest/functions/rest_control_respond.proto.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@
],
"documentation": []
},
{
"runtimeName": "http_schema",
"defaultValue": null,
"name": [
{
"code": "en-US",
"content": "Content Type"
}
],
"description": [
{
"code": "en-US",
"content": "Specifies the MIME type of the response payload, such as application/json, application/xml, or text/plain. This determines the expected format of the payload parameter."
}
],
"documentation": []
},
{
"runtimeName": "payload",
"defaultValue": null,
Expand All @@ -48,7 +65,7 @@
"description": [
{
"code": "en-US",
"content": "Contains the response payload, such as JSON, XML, form data, or binary content, depending on the Content-Type header."
"content": "Contains the response payload. For application/json the value must be an OBJECT, for all other content types a plain string is expected."
}
],
"documentation": []
Expand Down Expand Up @@ -82,9 +99,11 @@
}
],
"displayIcon": "tabler:cube-send",
"signature": "<T>(http_status_code: HTTP_STATUS_CODE, headers: OBJECT<{}>, payload: T): void",
"signature": "<S extends HTTP_SCHEMA>(http_status_code: HTTP_STATUS_CODE, headers: OBJECT<{}>, http_schema: S, payload: HTTP_PAYLOAD<S>): void",
"linkedDataTypeIdentifiers": [
"HTTP_STATUS_CODE",
"OBJECT"
"OBJECT",
"HTTP_SCHEMA",
"HTTP_PAYLOAD"
]
}
4 changes: 2 additions & 2 deletions definitions/draco_rest/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"name": [
{
"code": "en-US",
"content": "REST"
"content": "Webhook"
}
],
"description": [
{
"code": "en-US",
"content": "Trigger Flows unsing a HTTP-Server."
"content": "Trigger webhook on a specified endpoint."
}
],
"documentation": "",
Expand Down
67 changes: 59 additions & 8 deletions definitions/draco_rest/runtime_flow_types/rest.proto.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,52 @@
"name": [
{
"code": "en-US",
"content": "Rest Endpoint"
"content": "Webhook"
}
],
"description": [
{
"code": "en-US",
"content": "A REST API is a web service that lets clients interact with data on a server using standard HTTP methods like GET, POST, PUT, and DELETE usually returning results in JSON format."
"content": "A Webhook is an HTTP endpoint that listens for incoming requests from external services or clients, allowing you to react to events in real time using standard HTTP methods like GET, POST, PUT, and DELETE."
}
],
"documentation": [],
"displayMessage": [
{
"code": "en-US",
"content": "Trigger Rest-Flow on ${httpMethod} with a Request to ${httpURL}"
"content": "Webhook on ${httpMethod} at ${httpURL}"
}
],
"alias": [
{
"code": "en-US",
"content": "http;rest;route;web;webhook"
"content": "webhook;http;rest;route;web"
}
],
"displayIcon": "tabler:world-www",
"signature": "<T>(input_schema: TYPE<T>, httpURL: HTTP_URL, httpMethod: HTTP_METHOD): REST_ADAPTER_INPUT<T>",
"signature": "<A extends REST_AUTH_TYPE, T>(httpSchema: HTTP_SCHEMA, httpURL: HTTP_URL, httpMethod: HTTP_METHOD, httpAuth: A, httpAuthValue: REST_AUTH_VALUE<A>, input_schema: TYPE<T>): REST_ADAPTER_INPUT<T>",
"linkedDataTypeIdentifiers": [
"HTTP_SCHEMA",
"HTTP_URL",
"HTTP_METHOD",
"REST_AUTH_TYPE",
"REST_AUTH_VALUE",
"REST_ADAPTER_INPUT"
],
"runtimeSettings": [
{
"identifier": "input_schema",
"identifier": "httpSchema",
"unique": "NONE",
"name": [
{
"code": "en-US",
"content": "Input schema"
"content": "Content Type"
}
],
"description": [
{
"code": "en-US",
"content": "Input schema which defines the expected structure of the incoming request data."
"content": "Specifies the MIME type of the incoming request payload, such as application/json, application/xml, or text/plain. This determines the expected format of the payload parameter."
}
]
},
Expand Down Expand Up @@ -81,6 +84,54 @@
"content": "Specifies the HTTP request method (e.g., GET, POST, PUT, DELETE)."
}
]
},
{
"identifier": "httpAuth",
"unique": "NONE",
"name": [
{
"code": "en-US",
"content": "Authentication type"
}
],
"description": [
{
"code": "en-US",
"content": "Specifies the authentication mechanism used for the incoming Webhook request (e.g., Bearer JWT, Bearer static, Basic)."
}
]
},
{
"identifier": "httpAuthValue",
"unique": "NONE",
"name": [
{
"code": "en-US",
"content": "Authentication value"
}
],
"description": [
{
"code": "en-US",
"content": "Provides the credential value matching the selected authentication type (e.g., token string or username/password pair)."
}
]
},
{
"identifier": "input_schema",
"unique": "NONE",
"name": [
{
"code": "en-US",
"content": "Input schema"
}
],
"description": [
{
"code": "en-US",
"content": "Input schema which defines the expected structure of the incoming request data."
}
]
}
]
}
Loading