import { PipedreamClient } from "@pipedream/sdk";
// These secrets should be saved securely and passed to your environment
const client = new PipedreamClient({
clientId: "{oauth_client_id}",
clientSecret: "{oauth_client_secret}",
projectId: "{project_id}",
projectEnvironment: "development" // or "production"
});
await client.workflows.invokeForExternalUser(
"enabc123", // pass the endpoint ID or full URL here
"{external_user_id}", // The end user's ID in your system
"POST", // HTTP method
{
key: "value",
} // request body
)