update types

This commit is contained in:
anovazzi1 2024-06-26 21:16:56 -03:00 committed by Gabriel Luiz Freitas Almeida
commit dec53de46e
4 changed files with 6 additions and 4 deletions

View file

@ -8,7 +8,7 @@ export function getCurlRunCode(
flowId: string,
isAuth: boolean,
tweaksBuildedObject,
endpointName?: string,
endpointName?: string|null,
): string {
const tweaksObject = tweaksBuildedObject[0];
// show the endpoint name in the curl command if it exists
@ -35,7 +35,7 @@ export function getCurlRunCode(
* @param {string} options.endpointName - The name of the webhook endpoint.
* @returns {string} The cURL command.
*/
export function getCurlWebhookCode(flowId, isAuth, endpointName?: string) {
export function getCurlWebhookCode(flowId, isAuth, endpointName?: string|null) {
return `curl -X POST \\
"${window.location.protocol}//${window.location.host}/api/v1/webhook/${
endpointName || flowId

View file

@ -10,7 +10,7 @@ export default function getJsApiCode(
flowId: string,
isAuth: boolean,
tweaksBuildedObject: any[],
endpointName?: string,
endpointName?: string|null,
): string {
let tweaksString = "{}";
if (tweaksBuildedObject && tweaksBuildedObject.length > 0) {

View file

@ -10,7 +10,7 @@ export default function getPythonApiCode(
flowId: string,
isAuth: boolean,
tweaksBuildedObject: any[],
endpointName?: string,
endpointName?: string|null,
): string {
let tweaksString = "{}";
if (tweaksBuildedObject && tweaksBuildedObject.length > 0) {

View file

@ -3,6 +3,8 @@ export function createTabsArray(
includeWebhookCurl = false,
includeTweaks = false,
) {
// console.log(includeTweaks)
console.log(includeWebhookCurl)
const tabs = [
{
name: "Run cURL",