update types
This commit is contained in:
parent
e9091b9946
commit
dec53de46e
4 changed files with 6 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ export function getCurlRunCode(
|
||||||
flowId: string,
|
flowId: string,
|
||||||
isAuth: boolean,
|
isAuth: boolean,
|
||||||
tweaksBuildedObject,
|
tweaksBuildedObject,
|
||||||
endpointName?: string,
|
endpointName?: string|null,
|
||||||
): string {
|
): string {
|
||||||
const tweaksObject = tweaksBuildedObject[0];
|
const tweaksObject = tweaksBuildedObject[0];
|
||||||
// show the endpoint name in the curl command if it exists
|
// 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.
|
* @param {string} options.endpointName - The name of the webhook endpoint.
|
||||||
* @returns {string} The cURL command.
|
* @returns {string} The cURL command.
|
||||||
*/
|
*/
|
||||||
export function getCurlWebhookCode(flowId, isAuth, endpointName?: string) {
|
export function getCurlWebhookCode(flowId, isAuth, endpointName?: string|null) {
|
||||||
return `curl -X POST \\
|
return `curl -X POST \\
|
||||||
"${window.location.protocol}//${window.location.host}/api/v1/webhook/${
|
"${window.location.protocol}//${window.location.host}/api/v1/webhook/${
|
||||||
endpointName || flowId
|
endpointName || flowId
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export default function getJsApiCode(
|
||||||
flowId: string,
|
flowId: string,
|
||||||
isAuth: boolean,
|
isAuth: boolean,
|
||||||
tweaksBuildedObject: any[],
|
tweaksBuildedObject: any[],
|
||||||
endpointName?: string,
|
endpointName?: string|null,
|
||||||
): string {
|
): string {
|
||||||
let tweaksString = "{}";
|
let tweaksString = "{}";
|
||||||
if (tweaksBuildedObject && tweaksBuildedObject.length > 0) {
|
if (tweaksBuildedObject && tweaksBuildedObject.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export default function getPythonApiCode(
|
||||||
flowId: string,
|
flowId: string,
|
||||||
isAuth: boolean,
|
isAuth: boolean,
|
||||||
tweaksBuildedObject: any[],
|
tweaksBuildedObject: any[],
|
||||||
endpointName?: string,
|
endpointName?: string|null,
|
||||||
): string {
|
): string {
|
||||||
let tweaksString = "{}";
|
let tweaksString = "{}";
|
||||||
if (tweaksBuildedObject && tweaksBuildedObject.length > 0) {
|
if (tweaksBuildedObject && tweaksBuildedObject.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ export function createTabsArray(
|
||||||
includeWebhookCurl = false,
|
includeWebhookCurl = false,
|
||||||
includeTweaks = false,
|
includeTweaks = false,
|
||||||
) {
|
) {
|
||||||
|
// console.log(includeTweaks)
|
||||||
|
console.log(includeWebhookCurl)
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{
|
{
|
||||||
name: "Run cURL",
|
name: "Run cURL",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue