diff --git a/src/integrations/index.js b/src/integrations/index.js
new file mode 100644
index 0000000..8003cb1
--- /dev/null
+++ b/src/integrations/index.js
@@ -0,0 +1,9 @@
+import openai from './openai';
+import slack from './slack';
+import resend from './resend';
+import sendgrid from './sendgrid';
+import stripe from './stripe';
+import pdfmonkey from './pdfmonkey';
+import twilio from './twilio';
+
+export default [openai, slack, resend, sendgrid, stripe, pdfmonkey, twilio];
\ No newline at end of file
diff --git a/src/integrations/openai.js b/src/integrations/openai.js
new file mode 100644
index 0000000..ffd58f9
--- /dev/null
+++ b/src/integrations/openai.js
@@ -0,0 +1,2659 @@
+export default {
+ "name": "OpenAI",
+ "slug": "openai",
+ "version": "0.1.59",
+ "shortDescription": "Access OpenAI API solutions",
+ "description": "OpenAI integration for WeWeb that provides comprehensive access to the OpenAI platform including chat completions, embeddings, moderation, image generation, audio processing, assistants API, vision, fine-tuning, file management, and model information.",
+ "svgLogo": "",
+ "secrets": [
+ {
+ "name": "OPENAI_API_KEY",
+ "description": "Your OpenAI API Key"
+ },
+ {
+ "name": "OPENAI_ORGANIZATION_ID",
+ "description": "Your OpenAI Organization ID (optional)"
+ }
+ ],
+ "methods": {
+ "create_chat_completion": {
+ "name": "Chat Completion",
+ "description": "Generate text responses from OpenAI's GPT models based on conversation history.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "messages",
+ "type": "array",
+ "required": true,
+ "description": "A list of messages comprising the conversation.",
+ "fields": [
+ {
+ "name": "role",
+ "type": "string",
+ "required": true,
+ "description": "The role of the message author (system, user, assistant, or tool)."
+ },
+ {
+ "name": "content",
+ "type": "string",
+ "required": true,
+ "description": "The content of the message."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "The name of the author of this message."
+ },
+ {
+ "name": "tool_call_id",
+ "type": "string",
+ "required": false,
+ "description": "For tool messages, the ID of the tool call this message is responding to."
+ }
+ ]
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "ID of the model to use (e.g., gpt-4, gpt-3.5-turbo)."
+ },
+ {
+ "name": "temperature",
+ "type": "number",
+ "required": false,
+ "description": "Controls randomness in the output (0-2). Lower values make output more deterministic."
+ },
+ {
+ "name": "max_tokens",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of tokens to generate in the completion."
+ },
+ {
+ "name": "top_p",
+ "type": "number",
+ "required": false,
+ "description": "Alternative to temperature, nucleus sampling. Top-p = 0.1 means only tokens comprising the top 10% probability mass are considered."
+ },
+ {
+ "name": "frequency_penalty",
+ "type": "number",
+ "required": false,
+ "description": "Decreases likelihood of repeating the same tokens (-2.0 to 2.0)."
+ },
+ {
+ "name": "presence_penalty",
+ "type": "number",
+ "required": false,
+ "description": "Increases likelihood of new topics (-2.0 to 2.0)."
+ },
+ {
+ "name": "stream",
+ "type": "boolean",
+ "required": false,
+ "description": "Stream partial progress back rather than waiting for completion."
+ },
+ {
+ "name": "stop",
+ "type": "string|array",
+ "required": false,
+ "description": "One or more sequences where the API will stop generating further tokens."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the chat completion."
+ },
+ {
+ "name": "choices",
+ "type": "array",
+ "required": true,
+ "description": "The list of completion choices generated.",
+ "fields": [
+ {
+ "name": "message",
+ "type": "object",
+ "required": true,
+ "description": "The message output by the model.",
+ "fields": [
+ {
+ "name": "role",
+ "type": "string",
+ "required": true,
+ "description": "The role of the author of this message."
+ },
+ {
+ "name": "content",
+ "type": "string",
+ "required": true,
+ "description": "The content of the message."
+ },
+ {
+ "name": "tool_calls",
+ "type": "array",
+ "required": false,
+ "description": "Tool calls generated by the model.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the tool call."
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "required": true,
+ "description": "The type of the tool call."
+ },
+ {
+ "name": "function",
+ "type": "object",
+ "required": true,
+ "description": "Function call details."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "finish_reason",
+ "type": "string",
+ "required": true,
+ "description": "The reason the model stopped generating (stop, length, content_filter, tool_calls, etc.)"
+ },
+ {
+ "name": "index",
+ "type": "number",
+ "required": true,
+ "description": "Index of this completion choice."
+ }
+ ]
+ },
+ {
+ "name": "created",
+ "type": "number",
+ "required": true,
+ "description": "UNIX timestamp of when the completion was created."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The model used for completion."
+ },
+ {
+ "name": "usage",
+ "type": "object",
+ "required": true,
+ "description": "Usage statistics for the completion request.",
+ "fields": [
+ {
+ "name": "prompt_tokens",
+ "type": "number",
+ "required": true,
+ "description": "Number of tokens in the prompt."
+ },
+ {
+ "name": "completion_tokens",
+ "type": "number",
+ "required": true,
+ "description": "Number of tokens in the completion."
+ },
+ {
+ "name": "total_tokens",
+ "type": "number",
+ "required": true,
+ "description": "Total number of tokens used (prompt + completion)."
+ }
+ ]
+ }
+ ]
+ },
+ "create_embeddings": {
+ "name": "Text Embeddings",
+ "description": "Convert text into vector embeddings for semantic search, clustering, and similarity analysis.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "input",
+ "type": "string|array",
+ "required": true,
+ "description": "Input text to embed, can be a string or array of strings."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "ID of the model to use (e.g., text-embedding-ada-002)."
+ },
+ {
+ "name": "encoding_format",
+ "type": "string",
+ "required": false,
+ "description": "The format to return the embeddings in (float or base64)."
+ },
+ {
+ "name": "dimensions",
+ "type": "number",
+ "required": false,
+ "description": "The number of dimensions the resulting output embeddings should have."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of embedding objects.",
+ "fields": [
+ {
+ "name": "embedding",
+ "type": "array",
+ "required": true,
+ "description": "The embedding vector, which is a list of floats."
+ },
+ {
+ "name": "index",
+ "type": "number",
+ "required": true,
+ "description": "The index of the embedding in the list."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'embedding')."
+ }
+ ]
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The model used for generating embeddings."
+ },
+ {
+ "name": "usage",
+ "type": "object",
+ "required": true,
+ "description": "Usage statistics for the request.",
+ "fields": [
+ {
+ "name": "prompt_tokens",
+ "type": "number",
+ "required": true,
+ "description": "Number of tokens in the prompt."
+ },
+ {
+ "name": "total_tokens",
+ "type": "number",
+ "required": true,
+ "description": "Total number of tokens used."
+ }
+ ]
+ }
+ ]
+ },
+ "generate_image": {
+ "name": "Image Generation",
+ "description": "Create images from textual descriptions using DALL-E models.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "prompt",
+ "type": "string",
+ "required": true,
+ "description": "Text description of the desired image."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": false,
+ "description": "The model to use for image generation (e.g., dall-e-3)."
+ },
+ {
+ "name": "n",
+ "type": "number",
+ "required": false,
+ "description": "Number of images to generate (default 1)."
+ },
+ {
+ "name": "size",
+ "type": "string",
+ "required": false,
+ "description": "Size of the generated images (e.g., 1024x1024, 1792x1024, 1024x1792)."
+ },
+ {
+ "name": "quality",
+ "type": "string",
+ "required": false,
+ "description": "Quality of the generated images (standard or hd)."
+ },
+ {
+ "name": "style",
+ "type": "string",
+ "required": false,
+ "description": "Style of the generated images (vivid or natural)."
+ },
+ {
+ "name": "response_format",
+ "type": "string",
+ "required": false,
+ "description": "Format in which to return the generated images (url or b64_json)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "created",
+ "type": "number",
+ "required": true,
+ "description": "UNIX timestamp of when the images were created."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of generated image objects.",
+ "fields": [
+ {
+ "name": "url",
+ "type": "string",
+ "required": false,
+ "description": "URL to the generated image (if response_format=url)."
+ },
+ {
+ "name": "b64_json",
+ "type": "string",
+ "required": false,
+ "description": "Base64-encoded JSON string of the generated image (if response_format=b64_json)."
+ },
+ {
+ "name": "revised_prompt",
+ "type": "string",
+ "required": false,
+ "description": "The prompt that was actually used to generate the image, after any revisions."
+ }
+ ]
+ }
+ ]
+ },
+ "create_vision_completion": {
+ "name": "Vision Completion",
+ "description": "Generate text responses from images using OpenAI's vision capabilities.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "ID of the model to use (must support vision, e.g., gpt-4-vision-preview)."
+ },
+ {
+ "name": "messages",
+ "type": "array",
+ "required": true,
+ "description": "A list of messages comprising the conversation, including image content.",
+ "fields": [
+ {
+ "name": "role",
+ "type": "string",
+ "required": true,
+ "description": "The role of the message author (system, user, assistant)."
+ },
+ {
+ "name": "content",
+ "type": "array|string",
+ "required": true,
+ "description": "The content of the message, either a string or an array of text and image URL objects."
+ }
+ ]
+ },
+ {
+ "name": "max_tokens",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of tokens to generate in the completion."
+ },
+ {
+ "name": "temperature",
+ "type": "number",
+ "required": false,
+ "description": "Controls randomness in the output (0-2)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the chat completion."
+ },
+ {
+ "name": "choices",
+ "type": "array",
+ "required": true,
+ "description": "The list of completion choices generated."
+ },
+ {
+ "name": "created",
+ "type": "number",
+ "required": true,
+ "description": "UNIX timestamp of when the completion was created."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The model used for completion."
+ },
+ {
+ "name": "usage",
+ "type": "object",
+ "required": true,
+ "description": "Usage statistics for the completion request."
+ }
+ ]
+ },
+ "create_moderation": {
+ "name": "Content Moderation",
+ "description": "Check if content violates OpenAI's content policy by detecting harmful or unsafe text.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "input",
+ "type": "string|array",
+ "required": true,
+ "description": "The input text to classify, can be a string or array of strings."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": false,
+ "description": "The moderation model to use (text-moderation-latest or text-moderation-stable)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the moderation request."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The moderation model used."
+ },
+ {
+ "name": "results",
+ "type": "array",
+ "required": true,
+ "description": "A list of moderation objects.",
+ "fields": [
+ {
+ "name": "categories",
+ "type": "object",
+ "required": true,
+ "description": "Categories of harmful content detected.",
+ "fields": [
+ {
+ "name": "sexual",
+ "type": "boolean",
+ "required": true,
+ "description": "Sexual content."
+ },
+ {
+ "name": "hate",
+ "type": "boolean",
+ "required": true,
+ "description": "Hateful content."
+ },
+ {
+ "name": "harassment",
+ "type": "boolean",
+ "required": true,
+ "description": "Harassment content."
+ },
+ {
+ "name": "self-harm",
+ "type": "boolean",
+ "required": true,
+ "description": "Self-harm content."
+ },
+ {
+ "name": "sexual/minors",
+ "type": "boolean",
+ "required": true,
+ "description": "Sexual content involving minors."
+ },
+ {
+ "name": "hate/threatening",
+ "type": "boolean",
+ "required": true,
+ "description": "Hateful/threatening content."
+ },
+ {
+ "name": "violence/graphic",
+ "type": "boolean",
+ "required": true,
+ "description": "Violent/graphic content."
+ },
+ {
+ "name": "self-harm/intent",
+ "type": "boolean",
+ "required": true,
+ "description": "Self-harm with intent."
+ },
+ {
+ "name": "self-harm/instructions",
+ "type": "boolean",
+ "required": true,
+ "description": "Self-harm instructions."
+ },
+ {
+ "name": "harassment/threatening",
+ "type": "boolean",
+ "required": true,
+ "description": "Harassment/threatening content."
+ },
+ {
+ "name": "violence",
+ "type": "boolean",
+ "required": true,
+ "description": "Violent content."
+ }
+ ]
+ },
+ {
+ "name": "category_scores",
+ "type": "object",
+ "required": true,
+ "description": "Score for each category.",
+ "fields": [
+ {
+ "name": "sexual",
+ "type": "number",
+ "required": true,
+ "description": "Score for sexual category."
+ },
+ {
+ "name": "hate",
+ "type": "number",
+ "required": true,
+ "description": "Score for hate category."
+ },
+ {
+ "name": "harassment",
+ "type": "number",
+ "required": true,
+ "description": "Score for harassment category."
+ },
+ {
+ "name": "self-harm",
+ "type": "number",
+ "required": true,
+ "description": "Score for self-harm category."
+ },
+ {
+ "name": "sexual/minors",
+ "type": "number",
+ "required": true,
+ "description": "Score for sexual/minors category."
+ },
+ {
+ "name": "hate/threatening",
+ "type": "number",
+ "required": true,
+ "description": "Score for hate/threatening category."
+ },
+ {
+ "name": "violence/graphic",
+ "type": "number",
+ "required": true,
+ "description": "Score for violence/graphic category."
+ },
+ {
+ "name": "self-harm/intent",
+ "type": "number",
+ "required": true,
+ "description": "Score for self-harm/intent category."
+ },
+ {
+ "name": "self-harm/instructions",
+ "type": "number",
+ "required": true,
+ "description": "Score for self-harm/instructions category."
+ },
+ {
+ "name": "harassment/threatening",
+ "type": "number",
+ "required": true,
+ "description": "Score for harassment/threatening category."
+ },
+ {
+ "name": "violence",
+ "type": "number",
+ "required": true,
+ "description": "Score for violence category."
+ }
+ ]
+ },
+ {
+ "name": "flagged",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the content was flagged as harmful."
+ }
+ ]
+ }
+ ]
+ },
+ "create_transcription": {
+ "name": "Audio Transcription",
+ "description": "Transcribe audio into text using OpenAI's speech-to-text models.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "file",
+ "type": "string",
+ "required": true,
+ "description": "Base64-encoded audio file to transcribe (MP3, MP4, MPEG, MPGA, M4A, WAV, or WEBM)."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "ID of the model to use (e.g., whisper-1)."
+ },
+ {
+ "name": "language",
+ "type": "string",
+ "required": false,
+ "description": "The language of the input audio (ISO-639-1 format)."
+ },
+ {
+ "name": "prompt",
+ "type": "string",
+ "required": false,
+ "description": "Optional text to guide the model's style or continue a previous audio segment."
+ },
+ {
+ "name": "response_format",
+ "type": "string",
+ "required": false,
+ "description": "Format of the transcript output (json, text, srt, verbose_json, or vtt)."
+ },
+ {
+ "name": "temperature",
+ "type": "number",
+ "required": false,
+ "description": "Sampling temperature between 0 and 1."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "text",
+ "type": "string",
+ "required": true,
+ "description": "The transcribed text."
+ }
+ ]
+ },
+ "create_translation": {
+ "name": "Audio Translation",
+ "description": "Translate audio into English text using OpenAI's speech-to-text models.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "file",
+ "type": "string",
+ "required": true,
+ "description": "Base64-encoded audio file to translate (MP3, MP4, MPEG, MPGA, M4A, WAV, or WEBM)."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "ID of the model to use (e.g., whisper-1)."
+ },
+ {
+ "name": "prompt",
+ "type": "string",
+ "required": false,
+ "description": "Optional text to guide the model's style or continue a previous audio segment."
+ },
+ {
+ "name": "response_format",
+ "type": "string",
+ "required": false,
+ "description": "Format of the translation output (json, text, srt, verbose_json, or vtt)."
+ },
+ {
+ "name": "temperature",
+ "type": "number",
+ "required": false,
+ "description": "Sampling temperature between 0 and 1."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "text",
+ "type": "string",
+ "required": true,
+ "description": "The translated text in English."
+ }
+ ]
+ },
+ "create_image_variation": {
+ "name": "Create Image Variation",
+ "description": "Create variations of an existing image.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "image",
+ "type": "string",
+ "required": true,
+ "description": "Base64-encoded image to use as the basis for variation creation."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": false,
+ "description": "The model to use for image variation generation."
+ },
+ {
+ "name": "n",
+ "type": "number",
+ "required": false,
+ "description": "Number of variations to generate (default 1)."
+ },
+ {
+ "name": "size",
+ "type": "string",
+ "required": false,
+ "description": "Size of the generated images (e.g., 1024x1024)."
+ },
+ {
+ "name": "response_format",
+ "type": "string",
+ "required": false,
+ "description": "Format in which to return the generated images (url or b64_json)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "created",
+ "type": "number",
+ "required": true,
+ "description": "UNIX timestamp of when the variations were created."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of generated image objects."
+ }
+ ]
+ },
+ "edit_image": {
+ "name": "Edit Image",
+ "description": "Edit an image by providing a prompt and mask.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "image",
+ "type": "string",
+ "required": true,
+ "description": "Base64-encoded image to edit."
+ },
+ {
+ "name": "mask",
+ "type": "string",
+ "required": false,
+ "description": "Base64-encoded mask image where transparent areas indicate where the image should be edited."
+ },
+ {
+ "name": "prompt",
+ "type": "string",
+ "required": true,
+ "description": "Text description of the desired edits."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": false,
+ "description": "The model to use for image editing."
+ },
+ {
+ "name": "n",
+ "type": "number",
+ "required": false,
+ "description": "Number of edited images to generate (default 1)."
+ },
+ {
+ "name": "size",
+ "type": "string",
+ "required": false,
+ "description": "Size of the generated images (e.g., 1024x1024)."
+ },
+ {
+ "name": "response_format",
+ "type": "string",
+ "required": false,
+ "description": "Format in which to return the generated images (url or b64_json)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "created",
+ "type": "number",
+ "required": true,
+ "description": "UNIX timestamp of when the edited images were created."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of generated image objects."
+ }
+ ]
+ },
+ "create_assistant": {
+ "name": "Create Assistant",
+ "description": "Create an AI assistant with specific capabilities and tools.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "ID of the model to use (e.g., gpt-4, gpt-3.5-turbo)."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "The name of the assistant."
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "The description of the assistant."
+ },
+ {
+ "name": "instructions",
+ "type": "string",
+ "required": false,
+ "description": "The system instructions that the assistant uses."
+ },
+ {
+ "name": "tools",
+ "type": "array",
+ "required": false,
+ "description": "A list of tools enabled on the assistant."
+ },
+ {
+ "name": "file_ids",
+ "type": "array",
+ "required": false,
+ "description": "A list of file IDs attached to this assistant."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the assistant."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the assistant."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'assistant')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the assistant was created."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "The name of the assistant."
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "The description of the assistant."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The model used by the assistant."
+ },
+ {
+ "name": "instructions",
+ "type": "string",
+ "required": false,
+ "description": "The system instructions that the assistant uses."
+ },
+ {
+ "name": "tools",
+ "type": "array",
+ "required": true,
+ "description": "A list of tools enabled on the assistant."
+ },
+ {
+ "name": "file_ids",
+ "type": "array",
+ "required": true,
+ "description": "A list of file IDs attached to this assistant."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the assistant."
+ }
+ ]
+ },
+ "list_assistants": {
+ "name": "List Assistants",
+ "description": "List all assistants belonging to the user's organization.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of assistants to return."
+ },
+ {
+ "name": "order",
+ "type": "string",
+ "required": false,
+ "description": "Sort order by the created_at timestamp (asc or desc)."
+ },
+ {
+ "name": "after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination for fetching the next page of assistants."
+ },
+ {
+ "name": "before",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination for fetching the previous page of assistants."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'list')."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "A list of assistant objects."
+ },
+ {
+ "name": "first_id",
+ "type": "string",
+ "required": false,
+ "description": "The ID of the first assistant in the list."
+ },
+ {
+ "name": "last_id",
+ "type": "string",
+ "required": false,
+ "description": "The ID of the last assistant in the list."
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more assistants to fetch."
+ }
+ ]
+ },
+ "retrieve_assistant": {
+ "name": "Retrieve Assistant",
+ "description": "Get information about a specific assistant.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "assistantId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the assistant to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the assistant."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always \"assistant\")."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the assistant was created."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "The name of the assistant."
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "The description of the assistant."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The model used by the assistant."
+ },
+ {
+ "name": "instructions",
+ "type": "string",
+ "required": false,
+ "description": "The system instructions that the assistant uses."
+ },
+ {
+ "name": "tools",
+ "type": "array",
+ "required": true,
+ "description": "A list of tools enabled on the assistant."
+ },
+ {
+ "name": "file_ids",
+ "type": "array",
+ "required": true,
+ "description": "A list of file IDs attached to this assistant."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the assistant."
+ }
+ ]
+ },
+ "update_assistant": {
+ "name": "Update Assistant",
+ "description": "Modify an existing assistant.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "assistantId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the assistant to modify."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": false,
+ "description": "ID of the model to use (e.g., gpt-4, gpt-3.5-turbo)."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "The name of the assistant."
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "The description of the assistant."
+ },
+ {
+ "name": "instructions",
+ "type": "string",
+ "required": false,
+ "description": "The system instructions that the assistant uses."
+ },
+ {
+ "name": "tools",
+ "type": "array",
+ "required": false,
+ "description": "A list of tools enabled on the assistant."
+ },
+ {
+ "name": "file_ids",
+ "type": "array",
+ "required": false,
+ "description": "A list of file IDs attached to this assistant."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the assistant."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the assistant."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'assistant')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the assistant was created."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "The name of the assistant."
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "The description of the assistant."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The model used by the assistant."
+ },
+ {
+ "name": "instructions",
+ "type": "string",
+ "required": false,
+ "description": "The system instructions that the assistant uses."
+ },
+ {
+ "name": "tools",
+ "type": "array",
+ "required": true,
+ "description": "A list of tools enabled on the assistant."
+ },
+ {
+ "name": "file_ids",
+ "type": "array",
+ "required": true,
+ "description": "A list of file IDs attached to this assistant."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the assistant."
+ }
+ ]
+ },
+ "delete_assistant": {
+ "name": "Delete Assistant",
+ "description": "Delete an assistant.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "assistantId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the assistant to delete."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the deleted assistant."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'assistant.deleted')."
+ },
+ {
+ "name": "deleted",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the assistant was successfully deleted."
+ }
+ ]
+ },
+ "create_thread": {
+ "name": "Create Thread",
+ "description": "Create a thread for conversation with an assistant.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "messages",
+ "type": "array",
+ "required": false,
+ "description": "A list of messages to start the thread with."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the thread."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the thread."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the thread was created."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the thread."
+ }
+ ]
+ },
+ "retrieve_thread": {
+ "name": "Retrieve Thread",
+ "description": "Get information about a specific thread.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the thread."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the thread was created."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the thread."
+ }
+ ]
+ },
+ "update_thread": {
+ "name": "Update Thread",
+ "description": "Modify a specific thread.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread to modify."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the thread."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the thread."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the thread was created."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the thread."
+ }
+ ]
+ },
+ "delete_thread": {
+ "name": "Delete Thread",
+ "description": "Delete a specific thread.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread to delete."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the deleted thread."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread.deleted')."
+ },
+ {
+ "name": "deleted",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the thread was successfully deleted."
+ }
+ ]
+ },
+ "create_thread_message": {
+ "name": "Create Thread Message",
+ "description": "Add a message to an existing thread.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread to add a message to."
+ },
+ {
+ "name": "message",
+ "type": "object",
+ "required": true,
+ "description": "The message to add to the thread.",
+ "fields": [
+ {
+ "name": "role",
+ "type": "string",
+ "required": true,
+ "description": "The role of the message author (user)."
+ },
+ {
+ "name": "content",
+ "type": "string",
+ "required": true,
+ "description": "The content of the message."
+ },
+ {
+ "name": "file_ids",
+ "type": "array",
+ "required": false,
+ "description": "A list of file IDs to attach to the message."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the message."
+ }
+ ]
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the message."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread.message')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the message was created."
+ },
+ {
+ "name": "thread_id",
+ "type": "string",
+ "required": true,
+ "description": "The thread ID that this message belongs to."
+ },
+ {
+ "name": "role",
+ "type": "string",
+ "required": true,
+ "description": "The role of the entity that created the message."
+ },
+ {
+ "name": "content",
+ "type": "array",
+ "required": true,
+ "description": "The content of the message."
+ },
+ {
+ "name": "file_ids",
+ "type": "array",
+ "required": true,
+ "description": "A list of file IDs that the message references."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the message."
+ }
+ ]
+ },
+ "list_thread_messages": {
+ "name": "List Thread Messages",
+ "description": "List all messages from a specific thread.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread to retrieve messages from."
+ },
+ {
+ "name": "options",
+ "type": "object",
+ "required": false,
+ "description": "Options for listing messages.",
+ "fields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of messages to return."
+ },
+ {
+ "name": "order",
+ "type": "string",
+ "required": false,
+ "description": "Sort order by the created_at timestamp (asc or desc)."
+ },
+ {
+ "name": "after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination for fetching the next page of messages."
+ },
+ {
+ "name": "before",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination for fetching the previous page of messages."
+ }
+ ]
+ }
+ ],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'list')."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "A list of message objects."
+ },
+ {
+ "name": "first_id",
+ "type": "string",
+ "required": false,
+ "description": "The ID of the first message in the list."
+ },
+ {
+ "name": "last_id",
+ "type": "string",
+ "required": false,
+ "description": "The ID of the last message in the list."
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more messages to fetch."
+ }
+ ]
+ },
+ "retrieve_thread_message": {
+ "name": "Retrieve Thread Message",
+ "description": "Get information about a specific message in a thread.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread the message belongs to."
+ },
+ {
+ "name": "messageId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the message to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the message."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread.message')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the message was created."
+ },
+ {
+ "name": "thread_id",
+ "type": "string",
+ "required": true,
+ "description": "The thread ID that this message belongs to."
+ },
+ {
+ "name": "role",
+ "type": "string",
+ "required": true,
+ "description": "The role of the entity that created the message."
+ },
+ {
+ "name": "content",
+ "type": "array",
+ "required": true,
+ "description": "The content of the message."
+ },
+ {
+ "name": "file_ids",
+ "type": "array",
+ "required": true,
+ "description": "A list of file IDs that the message references."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the message."
+ }
+ ]
+ },
+ "create_thread_run": {
+ "name": "Run Assistant on Thread",
+ "description": "Run an assistant on a thread to generate a response.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread to run the assistant on."
+ },
+ {
+ "name": "options",
+ "type": "object",
+ "required": true,
+ "description": "The run options.",
+ "fields": [
+ {
+ "name": "assistant_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the assistant to use."
+ },
+ {
+ "name": "instructions",
+ "type": "string",
+ "required": false,
+ "description": "Override for the assistant's instructions."
+ },
+ {
+ "name": "tools",
+ "type": "array",
+ "required": false,
+ "description": "Override for the assistant's tools."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the run."
+ }
+ ]
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the run."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread.run')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the run was created."
+ },
+ {
+ "name": "thread_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread associated with the run."
+ },
+ {
+ "name": "assistant_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the assistant associated with the run."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the run (queued, in_progress, requires_action, cancelling, cancelled, failed, completed, or expired)."
+ },
+ {
+ "name": "required_action",
+ "type": "object",
+ "required": false,
+ "description": "Details on the action required to continue the run."
+ },
+ {
+ "name": "last_error",
+ "type": "object",
+ "required": false,
+ "description": "The last error associated with this run."
+ },
+ {
+ "name": "started_at",
+ "type": "number",
+ "required": false,
+ "description": "The Unix timestamp (in seconds) for when the run was started."
+ },
+ {
+ "name": "completed_at",
+ "type": "number",
+ "required": false,
+ "description": "The Unix timestamp (in seconds) for when the run was completed."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the run."
+ }
+ ]
+ },
+ "retrieve_thread_run": {
+ "name": "Retrieve Thread Run",
+ "description": "Retrieve information about a specific run on a thread.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread the run belongs to."
+ },
+ {
+ "name": "runId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the run to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the run."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread.run')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the run was created."
+ },
+ {
+ "name": "thread_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread associated with the run."
+ },
+ {
+ "name": "assistant_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the assistant associated with the run."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the run (queued, in_progress, requires_action, cancelling, cancelled, failed, completed, or expired)."
+ },
+ {
+ "name": "required_action",
+ "type": "object",
+ "required": false,
+ "description": "Details on the action required to continue the run."
+ },
+ {
+ "name": "last_error",
+ "type": "object",
+ "required": false,
+ "description": "The last error associated with this run."
+ },
+ {
+ "name": "started_at",
+ "type": "number",
+ "required": false,
+ "description": "The Unix timestamp (in seconds) for when the run was started."
+ },
+ {
+ "name": "completed_at",
+ "type": "number",
+ "required": false,
+ "description": "The Unix timestamp (in seconds) for when the run was completed."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information about the run."
+ }
+ ]
+ },
+ "list_thread_runs": {
+ "name": "List Thread Runs",
+ "description": "List all runs for a specific thread.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread to list runs for."
+ },
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of runs to return."
+ },
+ {
+ "name": "order",
+ "type": "string",
+ "required": false,
+ "description": "Sort order by the created_at timestamp (asc or desc)."
+ },
+ {
+ "name": "after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination for fetching the next page of runs."
+ },
+ {
+ "name": "before",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination for fetching the previous page of runs."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'list')."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "A list of run objects."
+ },
+ {
+ "name": "first_id",
+ "type": "string",
+ "required": false,
+ "description": "The ID of the first run in the list."
+ },
+ {
+ "name": "last_id",
+ "type": "string",
+ "required": false,
+ "description": "The ID of the last run in the list."
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more runs to fetch."
+ }
+ ]
+ },
+ "cancel_thread_run": {
+ "name": "Cancel Thread Run",
+ "description": "Cancel a run that is in progress.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread the run belongs to."
+ },
+ {
+ "name": "runId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the run to cancel."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the run."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread.run')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the run was created."
+ },
+ {
+ "name": "thread_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread associated with the run."
+ },
+ {
+ "name": "assistant_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the assistant associated with the run."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the run (should be 'cancelling' or 'cancelled')."
+ }
+ ]
+ },
+ "list_thread_run_steps": {
+ "name": "List Thread Run Steps",
+ "description": "List all steps for a specific run.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread the run belongs to."
+ },
+ {
+ "name": "runId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the run to list steps for."
+ },
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of steps to return."
+ },
+ {
+ "name": "order",
+ "type": "string",
+ "required": false,
+ "description": "Sort order by the created_at timestamp (asc or desc)."
+ },
+ {
+ "name": "after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination for fetching the next page of steps."
+ },
+ {
+ "name": "before",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination for fetching the previous page of steps."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'list')."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "A list of run step objects."
+ },
+ {
+ "name": "first_id",
+ "type": "string",
+ "required": false,
+ "description": "The ID of the first step in the list."
+ },
+ {
+ "name": "last_id",
+ "type": "string",
+ "required": false,
+ "description": "The ID of the last step in the list."
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more steps to fetch."
+ }
+ ]
+ },
+ "submit_tool_outputs_to_run": {
+ "name": "Submit Tool Outputs To Run",
+ "description": "Submit tool outputs for a run that requires action.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "threadId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread the run belongs to."
+ },
+ {
+ "name": "runId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the run to submit tool outputs for."
+ },
+ {
+ "name": "tool_outputs",
+ "type": "array",
+ "required": true,
+ "description": "A list of tool outputs to submit.",
+ "fields": [
+ {
+ "name": "tool_call_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the tool call to associate with the output."
+ },
+ {
+ "name": "output",
+ "type": "string",
+ "required": true,
+ "description": "The output of the tool call."
+ }
+ ]
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The identifier for the run."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'thread.run')."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The Unix timestamp (in seconds) for when the run was created."
+ },
+ {
+ "name": "thread_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the thread associated with the run."
+ },
+ {
+ "name": "assistant_id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the assistant associated with the run."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the run (should be 'in_progress')."
+ }
+ ]
+ },
+ "list_models": {
+ "name": "List Models",
+ "description": "List all models available to use with the OpenAI API.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'list')."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "A list of model objects.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The model identifier."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'model')."
+ },
+ {
+ "name": "created",
+ "type": "number",
+ "required": true,
+ "description": "The timestamp when the model was created."
+ },
+ {
+ "name": "owned_by",
+ "type": "string",
+ "required": true,
+ "description": "The organization that owns the model."
+ }
+ ]
+ }
+ ]
+ },
+ "retrieve_model": {
+ "name": "Retrieve Model",
+ "description": "Get information about a specific model.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "modelId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the model to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The model identifier."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'model')."
+ },
+ {
+ "name": "created",
+ "type": "number",
+ "required": true,
+ "description": "The timestamp when the model was created."
+ },
+ {
+ "name": "owned_by",
+ "type": "string",
+ "required": true,
+ "description": "The organization that owns the model."
+ }
+ ]
+ },
+ "create_fine_tuning_job": {
+ "name": "Create Fine-Tuning Job",
+ "description": "Create a job to fine-tune a model to your specific training data.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "training_file",
+ "type": "string",
+ "required": true,
+ "description": "The ID of an uploaded file that contains training data."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The name of the base model to fine-tune."
+ },
+ {
+ "name": "validation_file",
+ "type": "string",
+ "required": false,
+ "description": "The ID of an uploaded file that contains validation data."
+ },
+ {
+ "name": "hyperparameters",
+ "type": "object",
+ "required": false,
+ "description": "The hyperparameters used for the fine-tuning job."
+ },
+ {
+ "name": "suffix",
+ "type": "string",
+ "required": false,
+ "description": "A suffix for the fine-tuned model name."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the fine-tuning job."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'fine_tuning.job')."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The name of the base model."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The timestamp for when the fine-tuning job was created."
+ },
+ {
+ "name": "finished_at",
+ "type": "number",
+ "required": false,
+ "description": "The timestamp for when the fine-tuning job finished."
+ },
+ {
+ "name": "fine_tuned_model",
+ "type": "string",
+ "required": false,
+ "description": "The name of the fine-tuned model, if the job succeeded."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the fine-tuning job (e.g., pending, running, succeeded, failed)."
+ }
+ ]
+ },
+ "list_fine_tuning_jobs": {
+ "name": "List Fine-Tuning Jobs",
+ "description": "List your organization's fine-tuning jobs.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Number of fine-tuning jobs to retrieve."
+ },
+ {
+ "name": "after",
+ "type": "string",
+ "required": false,
+ "description": "Identifier for pagination."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'list')."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "A list of fine-tuning jobs."
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more fine-tuning jobs to retrieve."
+ }
+ ]
+ },
+ "retrieve_fine_tuning_job": {
+ "name": "Retrieve Fine-Tuning Job",
+ "description": "Get information about a specific fine-tuning job.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "jobId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the fine-tuning job to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the fine-tuning job."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'fine_tuning.job')."
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "required": true,
+ "description": "The name of the base model."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The timestamp for when the fine-tuning job was created."
+ },
+ {
+ "name": "finished_at",
+ "type": "number",
+ "required": false,
+ "description": "The timestamp for when the fine-tuning job finished."
+ },
+ {
+ "name": "fine_tuned_model",
+ "type": "string",
+ "required": false,
+ "description": "The name of the fine-tuned model, if the job succeeded."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the fine-tuning job."
+ }
+ ]
+ },
+ "retrieve_fine_tuning_job_events": {
+ "name": "Retrieve Fine-Tuning Job Events",
+ "description": "Get status updates for a fine-tuning job.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "jobId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the fine-tuning job to get events for."
+ },
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Number of events to retrieve."
+ },
+ {
+ "name": "after",
+ "type": "string",
+ "required": false,
+ "description": "Identifier for pagination."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'list')."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "A list of fine-tuning event objects.",
+ "fields": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'fine_tuning.job.event')."
+ },
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the event."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The timestamp for when the event was created."
+ },
+ {
+ "name": "level",
+ "type": "string",
+ "required": true,
+ "description": "The log level of the event (info, warning, error)."
+ },
+ {
+ "name": "message",
+ "type": "string",
+ "required": true,
+ "description": "The event message."
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more events to retrieve."
+ }
+ ]
+ },
+ "cancel_fine_tuning_job": {
+ "name": "Cancel Fine-Tuning Job",
+ "description": "Cancel a fine-tuning job that is in progress.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "jobId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the fine-tuning job to cancel."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the fine-tuning job."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'fine_tuning.job')."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the fine-tuning job (should be 'cancelled')."
+ }
+ ]
+ },
+ "upload_file": {
+ "name": "Upload File",
+ "description": "Upload a file for use with various OpenAI features.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "file",
+ "type": "string",
+ "required": true,
+ "description": "Base64-encoded file content to upload."
+ },
+ {
+ "name": "purpose",
+ "type": "string",
+ "required": true,
+ "description": "The intended purpose of the file (e.g., 'fine-tune', 'assistants')."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the uploaded file."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'file')."
+ },
+ {
+ "name": "bytes",
+ "type": "number",
+ "required": true,
+ "description": "The size of the file in bytes."
+ },
+ {
+ "name": "created_at",
+ "type": "number",
+ "required": true,
+ "description": "The timestamp for when the file was created."
+ },
+ {
+ "name": "filename",
+ "type": "string",
+ "required": true,
+ "description": "The name of the file."
+ },
+ {
+ "name": "purpose",
+ "type": "string",
+ "required": true,
+ "description": "The purpose of the file."
+ }
+ ]
+ },
+ "list_files": {
+ "name": "List Files",
+ "description": "List all files that have been uploaded.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "purpose",
+ "type": "string",
+ "required": false,
+ "description": "Filter files by purpose (e.g., 'fine-tune', 'assistants')."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'list')."
+ },
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "A list of file objects."
+ }
+ ]
+ },
+ "retrieve_file_content": {
+ "name": "Retrieve File Content",
+ "description": "Get the contents of a specific file.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "fileId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the file to retrieve content from."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "content",
+ "type": "string",
+ "required": true,
+ "description": "The content of the file."
+ }
+ ]
+ },
+ "delete_file": {
+ "name": "Delete File",
+ "description": "Delete a specific file.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "fileId",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the file to delete."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the deleted file."
+ },
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type (always 'file')."
+ },
+ {
+ "name": "deleted",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the file was successfully deleted."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/integrations/pdfmonkey.js b/src/integrations/pdfmonkey.js
new file mode 100644
index 0000000..46585de
--- /dev/null
+++ b/src/integrations/pdfmonkey.js
@@ -0,0 +1,644 @@
+export default {
+ "name": "PDFMonkey",
+ "slug": "pdfmonkey",
+ "version": "0.1.25",
+ "shortDescription": "Access PDFMonkey API solutions",
+ "description": "PDFMonkey integration for WeWeb that provides comprehensive access to the PDFMonkey platform including document generation, template management, and PDF engine configuration.",
+ "secrets": [
+ {
+ "name": "PDFMONKEY_API_KEY",
+ "description": "Your PDFMonkey API Key"
+ }
+ ],
+ "methods": {
+ "list_documents": {
+ "name": "List Documents",
+ "description": "List all documents with optional filtering and pagination.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number for pagination."
+ },
+ {
+ "name": "documentTemplateId",
+ "type": "string",
+ "required": false,
+ "description": "Filter documents by template ID."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": false,
+ "description": "Filter documents by status (success, failure, draft)."
+ },
+ {
+ "name": "workspaceId",
+ "type": "string",
+ "required": false,
+ "description": "Filter documents by workspace ID."
+ },
+ {
+ "name": "updatedSince",
+ "type": "string",
+ "required": false,
+ "description": "Filter documents updated since the specified date (ISO 8601 format)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of document objects.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the document."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the document (success, failure, draft)."
+ },
+ {
+ "name": "download_url",
+ "type": "string",
+ "required": false,
+ "description": "URL to download the generated PDF."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "Timestamp when the document was created."
+ },
+ {
+ "name": "updated_at",
+ "type": "string",
+ "required": true,
+ "description": "Timestamp when the document was last updated."
+ }
+ ]
+ }
+ ]
+ },
+ "get_document": {
+ "name": "Get Document",
+ "description": "Get a specific document by ID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the document to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "document",
+ "type": "object",
+ "required": true,
+ "description": "The document object.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the document."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the document."
+ },
+ {
+ "name": "download_url",
+ "type": "string",
+ "required": false,
+ "description": "URL to download the generated PDF."
+ },
+ {
+ "name": "payload",
+ "type": "object",
+ "required": false,
+ "description": "Data used to generate the document."
+ },
+ {
+ "name": "meta",
+ "type": "object",
+ "required": false,
+ "description": "Metadata associated with the document."
+ }
+ ]
+ }
+ ]
+ },
+ "get_document_card": {
+ "name": "Get Document Card",
+ "description": "Get a document card by ID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the document card to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "document_card",
+ "type": "object",
+ "required": true,
+ "description": "The document card object.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the document card."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the document."
+ },
+ {
+ "name": "preview_url",
+ "type": "string",
+ "required": false,
+ "description": "URL to preview the document."
+ }
+ ]
+ }
+ ]
+ },
+ "create_document": {
+ "name": "Create Document",
+ "description": "Create a new document from a template.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "document_template_id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the template to use."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": false,
+ "description": "Initial status of the document (draft or pending)."
+ },
+ {
+ "name": "payload",
+ "type": "object",
+ "required": false,
+ "description": "Data to use when generating the document."
+ },
+ {
+ "name": "meta",
+ "type": "object",
+ "required": false,
+ "description": "Metadata to associate with the document."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "document",
+ "type": "object",
+ "required": true,
+ "description": "The created document object.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the document."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the document."
+ },
+ {
+ "name": "download_url",
+ "type": "string",
+ "required": false,
+ "description": "URL to download the generated PDF."
+ }
+ ]
+ }
+ ]
+ },
+ "update_document": {
+ "name": "Update Document",
+ "description": "Update an existing document.",
+ "recommendedHttpMethod": "PUT",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the document to update."
+ },
+ {
+ "name": "document_template_id",
+ "type": "string",
+ "required": false,
+ "description": "New template ID to use."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": false,
+ "description": "New status for the document."
+ },
+ {
+ "name": "payload",
+ "type": "object",
+ "required": false,
+ "description": "New data for generating the document."
+ },
+ {
+ "name": "meta",
+ "type": "object",
+ "required": false,
+ "description": "New metadata for the document."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "document",
+ "type": "object",
+ "required": true,
+ "description": "The updated document object.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the document."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the document."
+ },
+ {
+ "name": "download_url",
+ "type": "string",
+ "required": false,
+ "description": "URL to download the generated PDF."
+ }
+ ]
+ }
+ ]
+ },
+ "delete_document": {
+ "name": "Delete Document",
+ "description": "Delete a document.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the document to delete."
+ }
+ ],
+ "outputType": []
+ },
+ "list_templates": {
+ "name": "List Templates",
+ "description": "List all document templates with optional filtering and pagination.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number for pagination."
+ },
+ {
+ "name": "workspaceId",
+ "type": "string",
+ "required": false,
+ "description": "Filter templates by workspace ID."
+ },
+ {
+ "name": "folders",
+ "type": "string",
+ "required": false,
+ "description": "Filter templates by folder IDs (comma-separated)."
+ },
+ {
+ "name": "sort",
+ "type": "string",
+ "required": false,
+ "description": "Sort templates by field (identifier, created_at, updated_at)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of template objects.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the template."
+ },
+ {
+ "name": "identifier",
+ "type": "string",
+ "required": true,
+ "description": "Human-readable identifier for the template."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "Timestamp when the template was created."
+ },
+ {
+ "name": "updated_at",
+ "type": "string",
+ "required": true,
+ "description": "Timestamp when the template was last updated."
+ }
+ ]
+ }
+ ]
+ },
+ "get_template": {
+ "name": "Get Template",
+ "description": "Get a specific template by ID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The ID of the template to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "template",
+ "type": "object",
+ "required": true,
+ "description": "The template object.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the template."
+ },
+ {
+ "name": "identifier",
+ "type": "string",
+ "required": true,
+ "description": "Human-readable identifier for the template."
+ },
+ {
+ "name": "body",
+ "type": "string",
+ "required": false,
+ "description": "HTML content of the template."
+ },
+ {
+ "name": "scss_style",
+ "type": "string",
+ "required": false,
+ "description": "SCSS styles for the template."
+ }
+ ]
+ }
+ ]
+ },
+ "create_template": {
+ "name": "Create Template",
+ "description": "Create a new document template.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "identifier",
+ "type": "string",
+ "required": true,
+ "description": "Human-readable identifier for the template."
+ },
+ {
+ "name": "edition_mode",
+ "type": "string",
+ "required": false,
+ "description": "Edition mode for the template (code or visual)."
+ },
+ {
+ "name": "body",
+ "type": "string",
+ "required": false,
+ "description": "HTML content of the template."
+ },
+ {
+ "name": "scss_style",
+ "type": "string",
+ "required": false,
+ "description": "SCSS styles for the template."
+ },
+ {
+ "name": "sample_data",
+ "type": "string",
+ "required": false,
+ "description": "Sample data for template testing."
+ },
+ {
+ "name": "settings",
+ "type": "object",
+ "required": false,
+ "description": "Template settings (orientation, paper format, margins)."
+ },
+ {
+ "name": "pdf_engine_id",
+ "type": "string",
+ "required": false,
+ "description": "ID of the PDF engine to use."
+ },
+ {
+ "name": "ttl",
+ "type": "number",
+ "required": false,
+ "description": "Time-to-live in seconds for generated documents."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "template",
+ "type": "object",
+ "required": true,
+ "description": "The created template object.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the template."
+ },
+ {
+ "name": "identifier",
+ "type": "string",
+ "required": true,
+ "description": "Human-readable identifier for the template."
+ }
+ ]
+ }
+ ]
+ },
+ "update_template": {
+ "name": "Update Template",
+ "description": "Update an existing document template.",
+ "recommendedHttpMethod": "PUT",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the template to update."
+ },
+ {
+ "name": "identifier",
+ "type": "string",
+ "required": false,
+ "description": "New human-readable identifier for the template."
+ },
+ {
+ "name": "edition_mode",
+ "type": "string",
+ "required": false,
+ "description": "New edition mode for the template."
+ },
+ {
+ "name": "body",
+ "type": "string",
+ "required": false,
+ "description": "New HTML content for the template."
+ },
+ {
+ "name": "scss_style",
+ "type": "string",
+ "required": false,
+ "description": "New SCSS styles for the template."
+ },
+ {
+ "name": "sample_data",
+ "type": "string",
+ "required": false,
+ "description": "New sample data for template testing."
+ },
+ {
+ "name": "settings",
+ "type": "object",
+ "required": false,
+ "description": "New template settings."
+ },
+ {
+ "name": "pdf_engine_id",
+ "type": "string",
+ "required": false,
+ "description": "New PDF engine ID."
+ },
+ {
+ "name": "ttl",
+ "type": "number",
+ "required": false,
+ "description": "New time-to-live value."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "template",
+ "type": "object",
+ "required": true,
+ "description": "The updated template object.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the template."
+ },
+ {
+ "name": "identifier",
+ "type": "string",
+ "required": true,
+ "description": "Human-readable identifier for the template."
+ }
+ ]
+ }
+ ]
+ },
+ "delete_template": {
+ "name": "Delete Template",
+ "description": "Delete a document template.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the template to delete."
+ }
+ ],
+ "outputType": []
+ },
+ "list_engines": {
+ "name": "List Engines",
+ "description": "List all available PDF engines.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of PDF engine objects.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the engine."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Name of the PDF engine."
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": true,
+ "description": "Description of the PDF engine."
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/integrations/resend.js b/src/integrations/resend.js
new file mode 100644
index 0000000..cb0f359
--- /dev/null
+++ b/src/integrations/resend.js
@@ -0,0 +1,715 @@
+export default {
+ "name": "Resend",
+ "slug": "resend",
+ "version": "0.1.30",
+ "shortDescription": "Access Resend API solutions",
+ "description": "Resend integration for WeWeb that provides a robust email sending service with features like transactional emails, HTML template support, attachments, and tracking capabilities.",
+ "svgLogo": "",
+ "secrets": [
+ {
+ "name": "RESEND_API_KEY",
+ "description": "Your Resend API Key"
+ }
+ ],
+ "methods": {
+ "send_email": {
+ "name": "Send Email",
+ "description": "Send an email through Resend API.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "from",
+ "type": "string",
+ "required": true,
+ "description": "The sender's email address. Must be a domain you've verified with Resend."
+ },
+ {
+ "name": "to",
+ "type": [
+ "string",
+ "array"
+ ],
+ "required": true,
+ "description": "The recipient's email address or array of addresses."
+ },
+ {
+ "name": "cc",
+ "type": [
+ "string",
+ "array"
+ ],
+ "required": false,
+ "description": "The carbon copy email address or array of addresses."
+ },
+ {
+ "name": "bcc",
+ "type": [
+ "string",
+ "array"
+ ],
+ "required": false,
+ "description": "The blind carbon copy email address or array of addresses."
+ },
+ {
+ "name": "reply_to",
+ "type": "string",
+ "required": false,
+ "description": "The email address for recipients to reply to."
+ },
+ {
+ "name": "subject",
+ "type": "string",
+ "required": true,
+ "description": "The subject of the email."
+ },
+ {
+ "name": "text",
+ "type": "string",
+ "required": false,
+ "description": "The plain text content of the email. Required if html is not provided."
+ },
+ {
+ "name": "html",
+ "type": "string",
+ "required": false,
+ "description": "The HTML content of the email. Required if text is not provided."
+ },
+ {
+ "name": "attachments",
+ "type": "array",
+ "required": false,
+ "description": "Array of attachments to include in the email. Each attachment should have filename, content (base64 encoded) and contentType."
+ },
+ {
+ "name": "tags",
+ "type": "array",
+ "required": false,
+ "description": "Array of tags to categorize the email. Each tag should have name and value properties."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the sent email."
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": false,
+ "description": "The sender's email address."
+ },
+ {
+ "name": "to",
+ "type": "string",
+ "required": false,
+ "description": "The recipient's email address."
+ }
+ ]
+ },
+ "get_email": {
+ "name": "Get Email",
+ "description": "Get information about a sent email.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the email to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type ('email')."
+ },
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the email."
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": true,
+ "description": "The sender's email address."
+ },
+ {
+ "name": "to",
+ "type": [
+ "string",
+ "array"
+ ],
+ "required": true,
+ "description": "The recipient's email address or addresses."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "The ISO-8601 timestamp when the email was created."
+ },
+ {
+ "name": "subject",
+ "type": "string",
+ "required": true,
+ "description": "The subject of the email."
+ },
+ {
+ "name": "html",
+ "type": "string",
+ "required": false,
+ "description": "The HTML content of the email (if sent)."
+ },
+ {
+ "name": "text",
+ "type": "string",
+ "required": false,
+ "description": "The plain text content of the email (if sent)."
+ },
+ {
+ "name": "bcc",
+ "type": [
+ "string",
+ "array"
+ ],
+ "required": false,
+ "description": "The BCC recipients of the email."
+ },
+ {
+ "name": "cc",
+ "type": [
+ "string",
+ "array"
+ ],
+ "required": false,
+ "description": "The CC recipients of the email."
+ },
+ {
+ "name": "reply_to",
+ "type": "string",
+ "required": false,
+ "description": "The reply-to address for the email."
+ },
+ {
+ "name": "last_event",
+ "type": "string",
+ "required": false,
+ "description": "The last event status of the email."
+ }
+ ]
+ },
+ "create_domain": {
+ "name": "Create Domain",
+ "description": "Add a new domain to your Resend account for sending emails.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "The domain name to add (e.g. example.com)."
+ },
+ {
+ "name": "region",
+ "type": "string",
+ "required": false,
+ "description": "The region for the domain (e.g. us-east-1, eu-west-1)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the created domain."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "The domain name that was added."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The verification status of the domain."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "The ISO-8601 timestamp when the domain was created."
+ },
+ {
+ "name": "region",
+ "type": "string",
+ "required": true,
+ "description": "The region of the domain."
+ },
+ {
+ "name": "records",
+ "type": "array",
+ "required": true,
+ "description": "The DNS records to verify the domain."
+ }
+ ]
+ },
+ "get_domain": {
+ "name": "Get Domain",
+ "description": "Get information about a specific domain in your Resend account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the domain to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the domain."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "The domain name."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The verification status of the domain."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "The ISO-8601 timestamp when the domain was created."
+ },
+ {
+ "name": "region",
+ "type": "string",
+ "required": true,
+ "description": "The region of the domain."
+ },
+ {
+ "name": "records",
+ "type": "array",
+ "required": true,
+ "description": "The DNS records to verify the domain."
+ }
+ ]
+ },
+ "list_domains": {
+ "name": "List Domains",
+ "description": "List all domains in your Resend account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "Array of domain objects."
+ }
+ ]
+ },
+ "delete_domain": {
+ "name": "Delete Domain",
+ "description": "Remove a domain from your Resend account.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the domain to delete."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "success",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the domain was successfully deleted."
+ }
+ ]
+ },
+ "verify_domain": {
+ "name": "Verify Domain",
+ "description": "Verify a domain's DNS records in your Resend account.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the domain to verify."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the domain."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "The domain name."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The verification status of the domain."
+ },
+ {
+ "name": "records",
+ "type": "array",
+ "required": true,
+ "description": "The DNS records with their verification status."
+ }
+ ]
+ },
+ "create_api_key": {
+ "name": "Create API Key",
+ "description": "Create a new API key for your Resend account.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "A name to identify the API key."
+ },
+ {
+ "name": "permission",
+ "type": "string",
+ "required": false,
+ "description": "The permission level for the API key (full_access or sending_access)."
+ },
+ {
+ "name": "domain_id",
+ "type": "string",
+ "required": false,
+ "description": "Restrict the API key to a specific domain (for sending_access permission)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the API key."
+ },
+ {
+ "name": "token",
+ "type": "string",
+ "required": true,
+ "description": "The API key token (only shown once)."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "The name of the API key."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "The ISO-8601 timestamp when the API key was created."
+ }
+ ]
+ },
+ "list_api_keys": {
+ "name": "List API Keys",
+ "description": "List all API keys in your Resend account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "Array of API key objects."
+ }
+ ]
+ },
+ "delete_api_key": {
+ "name": "Delete API Key",
+ "description": "Delete an API key from your Resend account.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the API key to delete."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "success",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the API key was successfully deleted."
+ }
+ ]
+ },
+ "create_audience": {
+ "name": "Create Audience",
+ "description": "Create a new audience for email campaigns.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "The name of the audience."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the created audience."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "The name of the audience."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "The ISO-8601 timestamp when the audience was created."
+ }
+ ]
+ },
+ "get_audience": {
+ "name": "Get Audience",
+ "description": "Get information about an audience.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the audience to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the audience."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "The name of the audience."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "The ISO-8601 timestamp when the audience was created."
+ }
+ ]
+ },
+ "list_audiences": {
+ "name": "List Audiences",
+ "description": "List all audiences in your Resend account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "Array of audience objects."
+ }
+ ]
+ },
+ "delete_audience": {
+ "name": "Delete Audience",
+ "description": "Remove an audience from your Resend account.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the audience to delete."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "success",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the audience was successfully deleted."
+ }
+ ]
+ },
+ "add_contacts": {
+ "name": "Add Contacts",
+ "description": "Add contacts to an audience.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "audience_id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the audience to add contacts to."
+ },
+ {
+ "name": "contacts",
+ "type": "array",
+ "required": true,
+ "description": "Array of contact objects. Each contact must have an email and can have optional fields."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "object",
+ "type": "string",
+ "required": true,
+ "description": "The object type ('batch')."
+ },
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the batch operation."
+ }
+ ]
+ },
+ "get_contact": {
+ "name": "Get Contact",
+ "description": "Get information about a contact.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "audience_id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the audience."
+ },
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the contact to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the contact."
+ },
+ {
+ "name": "email",
+ "type": "string",
+ "required": true,
+ "description": "The email address of the contact."
+ },
+ {
+ "name": "first_name",
+ "type": "string",
+ "required": false,
+ "description": "The first name of the contact."
+ },
+ {
+ "name": "last_name",
+ "type": "string",
+ "required": false,
+ "description": "The last name of the contact."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "The ISO-8601 timestamp when the contact was created."
+ },
+ {
+ "name": "unsubscribed",
+ "type": "boolean",
+ "required": false,
+ "description": "Whether the contact has unsubscribed."
+ }
+ ]
+ },
+ "list_contacts": {
+ "name": "List Contacts",
+ "description": "List all contacts in an audience.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "audience_id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the audience."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "Array of contact objects."
+ }
+ ]
+ },
+ "delete_contact": {
+ "name": "Delete Contact",
+ "description": "Remove a contact from an audience.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "audience_id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the audience."
+ },
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "The unique identifier of the contact to delete."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "success",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the contact was successfully deleted."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/integrations/sendgrid.js b/src/integrations/sendgrid.js
new file mode 100644
index 0000000..f236509
--- /dev/null
+++ b/src/integrations/sendgrid.js
@@ -0,0 +1,486 @@
+export default {
+ "name": "SendGrid",
+ "slug": "sendgrid",
+ "version": "0.1.29",
+ "shortDescription": "Access SendGrid API solutions",
+ "description": "SendGrid integration for WeWeb that provides a robust email sending service with features like transactional emails, HTML template support, attachments, tracking capabilities, and list management.",
+ "svgLogo": "",
+ "secrets": [
+ {
+ "name": "SENDGRID_API_KEY",
+ "description": "Your SendGrid API Key"
+ }
+ ],
+ "methods": {
+ "send_email": {
+ "name": "Send Email",
+ "description": "Send an email through SendGrid API.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "from",
+ "type": "object",
+ "required": true,
+ "description": "The sender's information containing email and optional name."
+ },
+ {
+ "name": "to",
+ "type": "array",
+ "required": true,
+ "description": "Array of recipient objects, each containing email and optional name."
+ },
+ {
+ "name": "cc",
+ "type": "array",
+ "required": false,
+ "description": "Array of CC recipient objects, each containing email and optional name."
+ },
+ {
+ "name": "bcc",
+ "type": "array",
+ "required": false,
+ "description": "Array of BCC recipient objects, each containing email and optional name."
+ },
+ {
+ "name": "reply_to",
+ "type": "object",
+ "required": false,
+ "description": "Reply-to email address with optional name."
+ },
+ {
+ "name": "subject",
+ "type": "string",
+ "required": true,
+ "description": "The subject of the email."
+ },
+ {
+ "name": "text",
+ "type": "string",
+ "required": false,
+ "description": "The plain text content of the email. Required if html is not provided."
+ },
+ {
+ "name": "html",
+ "type": "string",
+ "required": false,
+ "description": "The HTML content of the email. Required if text is not provided."
+ },
+ {
+ "name": "attachments",
+ "type": "array",
+ "required": false,
+ "description": "Array of attachments. Each attachment should have filename, content (base64 encoded), type, and disposition."
+ },
+ {
+ "name": "categories",
+ "type": "array",
+ "required": false,
+ "description": "Array of categories (strings) to tag the email with."
+ },
+ {
+ "name": "custom_args",
+ "type": "object",
+ "required": false,
+ "description": "Custom arguments to be carried through the mail send."
+ },
+ {
+ "name": "template_id",
+ "type": "string",
+ "required": false,
+ "description": "ID of a template that you would like to use."
+ },
+ {
+ "name": "dynamic_template_data",
+ "type": "object",
+ "required": false,
+ "description": "Dynamic data for template substitution."
+ },
+ {
+ "name": "send_at",
+ "type": "number",
+ "required": false,
+ "description": "Timestamp to schedule the email for. Must be at least 60 seconds in the future."
+ },
+ {
+ "name": "batch_id",
+ "type": "string",
+ "required": false,
+ "description": "Batch ID to group multiple sends together."
+ },
+ {
+ "name": "asm",
+ "type": "object",
+ "required": false,
+ "description": "Advanced Suppression Management options, including group_id and groups_to_display."
+ },
+ {
+ "name": "ip_pool_name",
+ "type": "string",
+ "required": false,
+ "description": "The IP Pool that you would like to send this email from."
+ },
+ {
+ "name": "mail_settings",
+ "type": "object",
+ "required": false,
+ "description": "Mail settings to determine how you would like this email to be handled."
+ },
+ {
+ "name": "tracking_settings",
+ "type": "object",
+ "required": false,
+ "description": "Settings to determine how you would like to track the metrics of the email."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "statusCode",
+ "type": "number",
+ "required": true,
+ "description": "HTTP status code of the response."
+ },
+ {
+ "name": "body",
+ "type": "string",
+ "required": false,
+ "description": "Response body (usually empty for successful sends)."
+ },
+ {
+ "name": "headers",
+ "type": "object",
+ "required": false,
+ "description": "Response headers."
+ }
+ ]
+ },
+ "create_contact": {
+ "name": "Create Contact",
+ "description": "Add a new contact to a list.",
+ "recommendedHttpMethod": "PUT",
+ "inputFields": [
+ {
+ "name": "list_ids",
+ "type": "array",
+ "required": true,
+ "description": "Array of list IDs to add the contact to."
+ },
+ {
+ "name": "contacts",
+ "type": "array",
+ "required": true,
+ "description": "Array of contact objects to add. Each should have an email and can have custom fields."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "job_id",
+ "type": "string",
+ "required": true,
+ "description": "Job ID for the contact creation task."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the job."
+ }
+ ]
+ },
+ "delete_contact": {
+ "name": "Delete Contact",
+ "description": "Delete a contact by email address.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "ids",
+ "type": "array",
+ "required": false,
+ "description": "Array of contact IDs to delete."
+ },
+ {
+ "name": "emails",
+ "type": "array",
+ "required": false,
+ "description": "Array of email addresses to delete."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "job_id",
+ "type": "string",
+ "required": true,
+ "description": "Job ID for the deletion task."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the job."
+ }
+ ]
+ },
+ "get_contact": {
+ "name": "Get Contact",
+ "description": "Get information about a contact by email address.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "email",
+ "type": "string",
+ "required": true,
+ "description": "Email address of the contact to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the contact."
+ },
+ {
+ "name": "email",
+ "type": "string",
+ "required": true,
+ "description": "Email address of the contact."
+ },
+ {
+ "name": "created_at",
+ "type": "string",
+ "required": true,
+ "description": "ISO8601 timestamp of when the contact was created."
+ },
+ {
+ "name": "updated_at",
+ "type": "string",
+ "required": true,
+ "description": "ISO8601 timestamp of when the contact was last updated."
+ },
+ {
+ "name": "list_ids",
+ "type": "array",
+ "required": false,
+ "description": "List IDs this contact belongs to."
+ },
+ {
+ "name": "custom_fields",
+ "type": "object",
+ "required": false,
+ "description": "Any custom fields associated with the contact."
+ }
+ ]
+ },
+ "search_contacts": {
+ "name": "Search Contacts",
+ "description": "Search for contacts using query conditions.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "query",
+ "type": "string",
+ "required": true,
+ "description": "Search query string (e.g., \"email LIKE '%@example.com'\")."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "result",
+ "type": "array",
+ "required": true,
+ "description": "Array of matching contact objects."
+ },
+ {
+ "name": "_metadata",
+ "type": "object",
+ "required": true,
+ "description": "Metadata about the search results, including count."
+ }
+ ]
+ },
+ "create_list": {
+ "name": "Create List",
+ "description": "Create a new contact list.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Name of the contact list."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the created list."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Name of the list."
+ },
+ {
+ "name": "contact_count",
+ "type": "number",
+ "required": true,
+ "description": "Number of contacts in the list (initially 0)."
+ }
+ ]
+ },
+ "get_list": {
+ "name": "Get List",
+ "description": "Get information about a specific list.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the list to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the list."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Name of the list."
+ },
+ {
+ "name": "contact_count",
+ "type": "number",
+ "required": true,
+ "description": "Number of contacts in the list."
+ }
+ ]
+ },
+ "get_lists": {
+ "name": "Get Lists",
+ "description": "Get all contact lists.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [],
+ "outputType": [
+ {
+ "name": "result",
+ "type": "array",
+ "required": true,
+ "description": "Array of list objects."
+ },
+ {
+ "name": "_metadata",
+ "type": "object",
+ "required": true,
+ "description": "Metadata about the lists, including count."
+ }
+ ]
+ },
+ "delete_list": {
+ "name": "Delete List",
+ "description": "Delete a contact list.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the list to delete."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the deleted list."
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the deletion."
+ }
+ ]
+ },
+ "get_template": {
+ "name": "Get Template",
+ "description": "Get information about an email template.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the template to retrieve."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the template."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Name of the template."
+ },
+ {
+ "name": "generation",
+ "type": "string",
+ "required": true,
+ "description": "Generation of the template (legacy or dynamic)."
+ },
+ {
+ "name": "updated_at",
+ "type": "string",
+ "required": true,
+ "description": "ISO8601 timestamp of when the template was last updated."
+ },
+ {
+ "name": "versions",
+ "type": "array",
+ "required": true,
+ "description": "Array of template versions."
+ }
+ ]
+ },
+ "get_templates": {
+ "name": "Get Templates",
+ "description": "Get all email templates.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "generations",
+ "type": "string",
+ "required": false,
+ "description": "Filter by template generation (legacy, dynamic, or both)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "templates",
+ "type": "array",
+ "required": true,
+ "description": "Array of template objects."
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": true,
+ "description": "Metadata about the templates, including count."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/integrations/slack.js b/src/integrations/slack.js
new file mode 100644
index 0000000..f9e1849
--- /dev/null
+++ b/src/integrations/slack.js
@@ -0,0 +1,720 @@
+export default {
+ "name": "Slack",
+ "slug": "slack",
+ "version": "0.1.34",
+ "shortDescription": "Access Slack API solutions",
+ "description": "Slack integration for WeWeb that provides comprehensive access to the Slack platform including sending messages, creating channels, managing users, handling files, and querying information about workspaces.",
+ "svgLogo": "",
+ "secrets": [
+ {
+ "name": "SLACK_BOT_TOKEN",
+ "description": "Your Slack Bot User OAuth Token"
+ },
+ {
+ "name": "SLACK_SIGNING_SECRET",
+ "description": "Your Slack Signing Secret for verifying webhook requests"
+ }
+ ],
+ "methods": {
+ "post_message": {
+ "name": "Post Message",
+ "description": "Send a message to a channel or user in Slack.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "channel",
+ "type": "string",
+ "required": true,
+ "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name."
+ },
+ {
+ "name": "text",
+ "type": "string",
+ "required": false,
+ "description": "Text of the message to send. This field is usually required, unless you're providing only attachments or blocks."
+ },
+ {
+ "name": "as_user",
+ "type": "boolean",
+ "required": false,
+ "description": "Pass true to post the message as the authenticated user."
+ },
+ {
+ "name": "attachments",
+ "type": "array",
+ "required": false,
+ "description": "A JSON-based array of structured attachments."
+ },
+ {
+ "name": "blocks",
+ "type": "array",
+ "required": false,
+ "description": "A JSON-based array of structured blocks."
+ },
+ {
+ "name": "thread_ts",
+ "type": "string",
+ "required": false,
+ "description": "Timestamp of the parent message to reply in a thread."
+ },
+ {
+ "name": "mrkdwn",
+ "type": "boolean",
+ "required": false,
+ "description": "Determines whether text field is rendered according to mrkdwn formatting or as plain text."
+ },
+ {
+ "name": "parse",
+ "type": "string",
+ "required": false,
+ "description": "Change how messages are treated (none or full)."
+ },
+ {
+ "name": "link_names",
+ "type": "boolean",
+ "required": false,
+ "description": "Find and link channel names and usernames."
+ },
+ {
+ "name": "unfurl_links",
+ "type": "boolean",
+ "required": false,
+ "description": "Pass true to enable unfurling of primarily text-based content."
+ },
+ {
+ "name": "unfurl_media",
+ "type": "boolean",
+ "required": false,
+ "description": "Pass false to disable unfurling of media content."
+ },
+ {
+ "name": "username",
+ "type": "string",
+ "required": false,
+ "description": "Set your bot's user name. Must be used in conjunction with as_user set to false."
+ },
+ {
+ "name": "icon_emoji",
+ "type": "string",
+ "required": false,
+ "description": "Emoji to use as the icon for this message. Overrides icon_url."
+ },
+ {
+ "name": "icon_url",
+ "type": "string",
+ "required": false,
+ "description": "URL to an image to use as the icon for this message."
+ },
+ {
+ "name": "reply_broadcast",
+ "type": "boolean",
+ "required": false,
+ "description": "Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "channel",
+ "type": "string",
+ "required": true,
+ "description": "Channel where the message was posted."
+ },
+ {
+ "name": "ts",
+ "type": "string",
+ "required": true,
+ "description": "Timestamp of the message."
+ },
+ {
+ "name": "message",
+ "type": "object",
+ "required": true,
+ "description": "Message that was posted.",
+ "fields": [
+ {
+ "name": "text",
+ "type": "string",
+ "required": true,
+ "description": "Text content of the message."
+ },
+ {
+ "name": "username",
+ "type": "string",
+ "required": false,
+ "description": "Username displayed for the message."
+ },
+ {
+ "name": "bot_id",
+ "type": "string",
+ "required": false,
+ "description": "Bot ID if the message was posted by a bot."
+ },
+ {
+ "name": "attachments",
+ "type": "array",
+ "required": false,
+ "description": "Attachments added to the message."
+ },
+ {
+ "name": "blocks",
+ "type": "array",
+ "required": false,
+ "description": "Blocks included in the message."
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "required": true,
+ "description": "Type of message (typically 'message')."
+ },
+ {
+ "name": "subtype",
+ "type": "string",
+ "required": false,
+ "description": "Subtype of message (e.g., 'bot_message')."
+ },
+ {
+ "name": "ts",
+ "type": "string",
+ "required": true,
+ "description": "Timestamp of the message."
+ }
+ ]
+ }
+ ]
+ },
+ "create_channel": {
+ "name": "Create Channel",
+ "description": "Creates a new channel in a workspace.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Name of the channel to create. Must be lowercase, without spaces or periods, and cannot be longer than 80 characters."
+ },
+ {
+ "name": "is_private",
+ "type": "boolean",
+ "required": false,
+ "description": "Set to true to create a private channel instead of a public one."
+ },
+ {
+ "name": "validate",
+ "type": "boolean",
+ "required": false,
+ "description": "Whether to validate the channel name or not."
+ },
+ {
+ "name": "team_id",
+ "type": "string",
+ "required": false,
+ "description": "The ID of the workspace to create the channel in."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "channel",
+ "type": "object",
+ "required": true,
+ "description": "Information about the created channel.",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the channel."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Name of the channel."
+ },
+ {
+ "name": "is_channel",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether it's a standard channel."
+ },
+ {
+ "name": "is_private",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether it's a private channel."
+ },
+ {
+ "name": "created",
+ "type": "number",
+ "required": true,
+ "description": "Timestamp when the channel was created."
+ },
+ {
+ "name": "creator",
+ "type": "string",
+ "required": true,
+ "description": "User ID of the creator."
+ },
+ {
+ "name": "is_member",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the authenticated user is a member."
+ }
+ ]
+ }
+ ]
+ },
+ "invite_to_channel": {
+ "name": "Invite to Channel",
+ "description": "Invites users to a channel.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "channel",
+ "type": "string",
+ "required": true,
+ "description": "Channel to invite users to (ID)."
+ },
+ {
+ "name": "users",
+ "type": "string",
+ "required": true,
+ "description": "Comma-separated list of user IDs to invite."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "channel",
+ "type": "object",
+ "required": true,
+ "description": "Information about the channel."
+ }
+ ]
+ },
+ "archive_channel": {
+ "name": "Archive Channel",
+ "description": "Archives a channel.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "channel",
+ "type": "string",
+ "required": true,
+ "description": "Channel to archive (ID)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ }
+ ]
+ },
+ "list_channels": {
+ "name": "List Channels",
+ "description": "Lists all channels in a workspace.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "exclude_archived",
+ "type": "boolean",
+ "required": false,
+ "description": "Don't return archived channels."
+ },
+ {
+ "name": "types",
+ "type": "string",
+ "required": false,
+ "description": "Types of conversations to include (default: public_channel)."
+ },
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of channels to return."
+ },
+ {
+ "name": "cursor",
+ "type": "string",
+ "required": false,
+ "description": "Pagination cursor for next page."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "channels",
+ "type": "array",
+ "required": true,
+ "description": "List of channels."
+ },
+ {
+ "name": "response_metadata",
+ "type": "object",
+ "required": false,
+ "description": "Metadata about the response.",
+ "fields": [
+ {
+ "name": "next_cursor",
+ "type": "string",
+ "required": false,
+ "description": "Cursor for next page of results."
+ }
+ ]
+ }
+ ]
+ },
+ "get_channel_info": {
+ "name": "Get Channel Info",
+ "description": "Gets information about a channel.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "channel",
+ "type": "string",
+ "required": true,
+ "description": "Channel to get info on (ID)."
+ },
+ {
+ "name": "include_locale",
+ "type": "boolean",
+ "required": false,
+ "description": "Set to true to receive the locale for this channel."
+ },
+ {
+ "name": "include_num_members",
+ "type": "boolean",
+ "required": false,
+ "description": "Set to true to include the number of members in the channel."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "channel",
+ "type": "object",
+ "required": true,
+ "description": "Information about the channel."
+ }
+ ]
+ },
+ "list_users": {
+ "name": "List Users",
+ "description": "Lists all users in a workspace.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of users to return."
+ },
+ {
+ "name": "cursor",
+ "type": "string",
+ "required": false,
+ "description": "Pagination cursor for next page."
+ },
+ {
+ "name": "include_locale",
+ "type": "boolean",
+ "required": false,
+ "description": "Set to true to receive the locale for users."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "members",
+ "type": "array",
+ "required": true,
+ "description": "List of users."
+ },
+ {
+ "name": "response_metadata",
+ "type": "object",
+ "required": false,
+ "description": "Metadata about the response.",
+ "fields": [
+ {
+ "name": "next_cursor",
+ "type": "string",
+ "required": false,
+ "description": "Cursor for next page of results."
+ }
+ ]
+ }
+ ]
+ },
+ "get_user_info": {
+ "name": "Get User Info",
+ "description": "Gets information about a user.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "user",
+ "type": "string",
+ "required": true,
+ "description": "User to get info on (ID)."
+ },
+ {
+ "name": "include_locale",
+ "type": "boolean",
+ "required": false,
+ "description": "Set to true to receive the locale for this user."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "user",
+ "type": "object",
+ "required": true,
+ "description": "Information about the user."
+ }
+ ]
+ },
+ "add_reaction": {
+ "name": "Add Reaction",
+ "description": "Adds a reaction to a message.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "channel",
+ "type": "string",
+ "required": true,
+ "description": "Channel containing the message (ID)."
+ },
+ {
+ "name": "timestamp",
+ "type": "string",
+ "required": true,
+ "description": "Timestamp of the message to add reaction to."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Reaction emoji name (without colons)."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ }
+ ]
+ },
+ "upload_file": {
+ "name": "Upload File",
+ "description": "Uploads a file to Slack.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "file",
+ "type": "string",
+ "required": false,
+ "description": "Base64-encoded file content to upload."
+ },
+ {
+ "name": "content",
+ "type": "string",
+ "required": false,
+ "description": "File content as string (text files only)."
+ },
+ {
+ "name": "filename",
+ "type": "string",
+ "required": false,
+ "description": "Filename of the file."
+ },
+ {
+ "name": "filetype",
+ "type": "string",
+ "required": false,
+ "description": "File type identifier (e.g., 'png', 'txt')."
+ },
+ {
+ "name": "title",
+ "type": "string",
+ "required": false,
+ "description": "Title of the file."
+ },
+ {
+ "name": "initial_comment",
+ "type": "string",
+ "required": false,
+ "description": "Initial comment to add to the file."
+ },
+ {
+ "name": "channels",
+ "type": "string",
+ "required": false,
+ "description": "Comma-separated list of channel IDs or names to share the file with."
+ },
+ {
+ "name": "thread_ts",
+ "type": "string",
+ "required": false,
+ "description": "Timestamp of a thread to share the file in."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "file",
+ "type": "object",
+ "required": true,
+ "description": "Information about the uploaded file."
+ }
+ ]
+ },
+ "search_messages": {
+ "name": "Search Messages",
+ "description": "Searches for messages matching a query.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "query",
+ "type": "string",
+ "required": true,
+ "description": "Search query to find messages."
+ },
+ {
+ "name": "sort",
+ "type": "string",
+ "required": false,
+ "description": "Sort direction (asc or desc)."
+ },
+ {
+ "name": "sort_by",
+ "type": "string",
+ "required": false,
+ "description": "Field to sort by (timestamp, score, relevance)."
+ },
+ {
+ "name": "count",
+ "type": "number",
+ "required": false,
+ "description": "Number of results to return per page."
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number of results to return."
+ },
+ {
+ "name": "highlight",
+ "type": "boolean",
+ "required": false,
+ "description": "Pass true to enable query term highlighting."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "messages",
+ "type": "object",
+ "required": true,
+ "description": "Search results for messages.",
+ "fields": [
+ {
+ "name": "matches",
+ "type": "array",
+ "required": true,
+ "description": "List of matching messages."
+ },
+ {
+ "name": "paging",
+ "type": "object",
+ "required": true,
+ "description": "Paging information."
+ }
+ ]
+ }
+ ]
+ },
+ "get_team_info": {
+ "name": "Get Team Info",
+ "description": "Gets information about a workspace.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "team",
+ "type": "string",
+ "required": false,
+ "description": "Team ID to get info on. If omitted, will return information about the current team."
+ }
+ ],
+ "outputType": [
+ {
+ "name": "ok",
+ "type": "boolean",
+ "required": true,
+ "description": "Indicates whether the API call was successful."
+ },
+ {
+ "name": "team",
+ "type": "object",
+ "required": true,
+ "description": "Information about the team/workspace."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/integrations/stripe.js b/src/integrations/stripe.js
new file mode 100644
index 0000000..19d6095
--- /dev/null
+++ b/src/integrations/stripe.js
@@ -0,0 +1,1618 @@
+export default {
+ "name": "Stripe",
+ "slug": "stripe",
+ "version": "1.0.28",
+ "shortDescription": "Access Stripe API solutions",
+ "description": "Stripe integration for WeWeb that provides comprehensive access to the Stripe platform including payment processing, customer management, subscriptions, products, and pricing.",
+ "svgLogo": "",
+ "secrets": [
+ {
+ "name": "STRIPE_SECRET_KEY",
+ "description": "Your Stripe Secret Key"
+ },
+ {
+ "name": "STRIPE_WEBHOOK_SECRET",
+ "description": "Your Stripe Webhook Secret for verifying webhook signatures"
+ }
+ ],
+ "methods": {
+ "create_payment_intent": {
+ "name": "Create Payment Intent",
+ "description": "Creates a PaymentIntent for collecting payment from a customer.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount intended to be collected (in smallest currency unit)"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ },
+ {
+ "name": "customer",
+ "type": "string",
+ "required": false,
+ "description": "ID of the customer this PaymentIntent belongs to"
+ },
+ {
+ "name": "payment_method_types",
+ "type": "array",
+ "required": false,
+ "description": "List of payment method types that this PaymentIntent is allowed to use"
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "Description of the payment intent"
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the PaymentIntent"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the PaymentIntent"
+ },
+ {
+ "name": "client_secret",
+ "type": "string",
+ "required": true,
+ "description": "Client secret used to initialize payment on the client"
+ }
+ ]
+ },
+ "get_payment_intent": {
+ "name": "Get Payment Intent",
+ "description": "Retrieves a PaymentIntent by its ID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the PaymentIntent to retrieve"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the PaymentIntent"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the PaymentIntent"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount intended to be collected"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ }
+ ]
+ },
+ "create_customer": {
+ "name": "Create Customer",
+ "description": "Creates a new customer in Stripe.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "email",
+ "type": "string",
+ "required": false,
+ "description": "Customer's email address"
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "Customer's full name"
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "Description of the customer"
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the customer"
+ },
+ {
+ "name": "email",
+ "type": "string",
+ "required": false,
+ "description": "Customer's email address"
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "Customer's full name"
+ }
+ ]
+ },
+ "get_customer": {
+ "name": "Get Customer",
+ "description": "Retrieves a customer by their ID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the customer to retrieve"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the customer"
+ },
+ {
+ "name": "email",
+ "type": "string",
+ "required": false,
+ "description": "Customer's email address"
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "Customer's full name"
+ }
+ ]
+ },
+ "update_customer": {
+ "name": "Update Customer",
+ "description": "Updates a customer's information.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the customer to update"
+ },
+ {
+ "name": "email",
+ "type": "string",
+ "required": false,
+ "description": "Customer's email address"
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "Customer's full name"
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "Description of the customer"
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the customer"
+ },
+ {
+ "name": "email",
+ "type": "string",
+ "required": false,
+ "description": "Customer's email address"
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "Customer's full name"
+ }
+ ]
+ },
+ "create_subscription": {
+ "name": "Create Subscription",
+ "description": "Creates a new subscription for a customer.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "customer",
+ "type": "string",
+ "required": true,
+ "description": "ID of the customer to subscribe"
+ },
+ {
+ "name": "items",
+ "type": "array",
+ "required": true,
+ "description": "List of prices and quantities for the subscription"
+ },
+ {
+ "name": "trial_period_days",
+ "type": "number",
+ "required": false,
+ "description": "Number of trial period days"
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the subscription"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the subscription"
+ },
+ {
+ "name": "current_period_end",
+ "type": "number",
+ "required": true,
+ "description": "End of the current period (Unix timestamp)"
+ }
+ ]
+ },
+ "get_subscription": {
+ "name": "Get Subscription",
+ "description": "Retrieves a subscription by its ID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the subscription to retrieve"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the subscription"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the subscription"
+ },
+ {
+ "name": "current_period_end",
+ "type": "number",
+ "required": true,
+ "description": "End of the current period (Unix timestamp)"
+ }
+ ]
+ },
+ "update_subscription": {
+ "name": "Update Subscription",
+ "description": "Updates a subscription.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the subscription to update"
+ },
+ {
+ "name": "items",
+ "type": "array",
+ "required": false,
+ "description": "List of prices and quantities for the subscription"
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the subscription"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the subscription"
+ },
+ {
+ "name": "current_period_end",
+ "type": "number",
+ "required": true,
+ "description": "End of the current period (Unix timestamp)"
+ }
+ ]
+ },
+ "create_product": {
+ "name": "Create Product",
+ "description": "Creates a new product in Stripe.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Product name"
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "Product description"
+ },
+ {
+ "name": "active",
+ "type": "boolean",
+ "required": false,
+ "description": "Whether the product is currently available for purchase"
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the product"
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Product name"
+ },
+ {
+ "name": "active",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the product is currently available"
+ }
+ ]
+ },
+ "create_price": {
+ "name": "Create Price",
+ "description": "Creates a new price for a product.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "product",
+ "type": "string",
+ "required": true,
+ "description": "ID of the product this price belongs to"
+ },
+ {
+ "name": "unit_amount",
+ "type": "number",
+ "required": true,
+ "description": "The unit amount in cents to be charged"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ },
+ {
+ "name": "recurring",
+ "type": "object",
+ "required": false,
+ "description": "The recurring components of a price"
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the price"
+ },
+ {
+ "name": "product",
+ "type": "string",
+ "required": true,
+ "description": "ID of the product this price belongs to"
+ },
+ {
+ "name": "active",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the price is currently available"
+ }
+ ]
+ },
+ "create_refund": {
+ "name": "Create Refund",
+ "description": "Creates a refund for a charge.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "charge",
+ "type": "string",
+ "required": true,
+ "description": "ID of the charge to refund"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": false,
+ "description": "Amount to refund in cents"
+ },
+ {
+ "name": "reason",
+ "type": "string",
+ "required": false,
+ "description": "Reason for the refund"
+ },
+ {
+ "name": "metadata",
+ "type": "object",
+ "required": false,
+ "description": "Set of key-value pairs for storing additional information"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the refund"
+ },
+ {
+ "name": "charge",
+ "type": "string",
+ "required": true,
+ "description": "ID of the charge that was refunded"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount refunded in cents"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the refund"
+ }
+ ]
+ },
+ "list_customers": {
+ "name": "List Customers",
+ "description": "Returns a list of customers.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of objects to be returned"
+ },
+ {
+ "name": "starting_after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of customers",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the customer"
+ },
+ {
+ "name": "email",
+ "type": "string",
+ "required": false,
+ "description": "Customer's email address"
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": false,
+ "description": "Customer's full name"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more customers available"
+ }
+ ]
+ },
+ "list_subscriptions": {
+ "name": "List Subscriptions",
+ "description": "Returns a list of subscriptions.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of objects to be returned"
+ },
+ {
+ "name": "starting_after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination"
+ },
+ {
+ "name": "customer",
+ "type": "string",
+ "required": false,
+ "description": "Filter by customer ID"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of subscriptions",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the subscription"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the subscription"
+ },
+ {
+ "name": "current_period_end",
+ "type": "number",
+ "required": true,
+ "description": "End of the current period (Unix timestamp)"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more subscriptions available"
+ }
+ ]
+ },
+ "list_products": {
+ "name": "List Products",
+ "description": "Returns a list of products.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of objects to be returned"
+ },
+ {
+ "name": "starting_after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination"
+ },
+ {
+ "name": "active",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by active status"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of products",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the product"
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "required": true,
+ "description": "Product name"
+ },
+ {
+ "name": "active",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the product is currently available"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more products available"
+ }
+ ]
+ },
+ "list_prices": {
+ "name": "List Prices",
+ "description": "Returns a list of prices.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of objects to be returned"
+ },
+ {
+ "name": "starting_after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination"
+ },
+ {
+ "name": "active",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by active status"
+ },
+ {
+ "name": "product",
+ "type": "string",
+ "required": false,
+ "description": "Filter by product ID"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of prices",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the price"
+ },
+ {
+ "name": "product",
+ "type": "string",
+ "required": true,
+ "description": "ID of the product this price belongs to"
+ },
+ {
+ "name": "active",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the price is currently available"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more prices available"
+ }
+ ]
+ },
+ "create_payment_method": {
+ "name": "Create Payment Method",
+ "description": "Creates a new payment method that can be attached to a customer.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "type",
+ "type": "string",
+ "required": true,
+ "description": "The type of payment method (e.g., 'card', 'sepa_debit', etc.)"
+ },
+ {
+ "name": "card",
+ "type": "object",
+ "required": false,
+ "description": "Card details if type is 'card'"
+ },
+ {
+ "name": "billing_details",
+ "type": "object",
+ "required": false,
+ "description": "Billing details associated with the payment method"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the payment method"
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "required": true,
+ "description": "The type of payment method"
+ },
+ {
+ "name": "customer",
+ "type": "string",
+ "required": false,
+ "description": "The customer this payment method is attached to"
+ }
+ ]
+ },
+ "attach_payment_method": {
+ "name": "Attach Payment Method",
+ "description": "Attaches a payment method to a customer.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "paymentMethodId",
+ "type": "string",
+ "required": true,
+ "description": "ID of the payment method to attach"
+ },
+ {
+ "name": "customerId",
+ "type": "string",
+ "required": true,
+ "description": "ID of the customer to attach the payment method to"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the payment method"
+ },
+ {
+ "name": "customer",
+ "type": "string",
+ "required": true,
+ "description": "The customer this payment method is now attached to"
+ }
+ ]
+ },
+ "list_payment_methods": {
+ "name": "List Payment Methods",
+ "description": "Lists payment methods for a customer.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "customerId",
+ "type": "string",
+ "required": true,
+ "description": "ID of the customer whose payment methods to list"
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "required": false,
+ "description": "Filter payment methods by type"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of payment methods",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the payment method"
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "required": true,
+ "description": "The type of payment method"
+ },
+ {
+ "name": "customer",
+ "type": "string",
+ "required": true,
+ "description": "The customer this payment method belongs to"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more payment methods available"
+ }
+ ]
+ },
+ "create_setup_intent": {
+ "name": "Create Setup Intent",
+ "description": "Creates a SetupIntent for saving payment methods.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "customer",
+ "type": "string",
+ "required": false,
+ "description": "ID of the customer this SetupIntent belongs to"
+ },
+ {
+ "name": "payment_method_types",
+ "type": "array",
+ "required": false,
+ "description": "List of payment method types that this SetupIntent is allowed to set up"
+ },
+ {
+ "name": "usage",
+ "type": "string",
+ "required": false,
+ "description": "The usage of the payment method being set up ('on_session' or 'off_session')"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the setup intent"
+ },
+ {
+ "name": "client_secret",
+ "type": "string",
+ "required": true,
+ "description": "Client secret used to complete the setup"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the setup intent"
+ }
+ ]
+ },
+ "create_charge": {
+ "name": "Create Charge",
+ "description": "Creates a new charge on a customer's card.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount to charge in smallest currency unit"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ },
+ {
+ "name": "customer",
+ "type": "string",
+ "required": false,
+ "description": "ID of the customer to charge"
+ },
+ {
+ "name": "source",
+ "type": "string",
+ "required": false,
+ "description": "Source to use for this charge"
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "Description of the charge"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the charge"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the charge"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount charged in smallest currency unit"
+ }
+ ]
+ },
+ "get_charge": {
+ "name": "Get Charge",
+ "description": "Retrieves a charge by its ID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the charge to retrieve"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the charge"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the charge"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount charged in smallest currency unit"
+ }
+ ]
+ },
+ "list_charges": {
+ "name": "List Charges",
+ "description": "Returns a list of charges.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of objects to be returned"
+ },
+ {
+ "name": "starting_after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination"
+ },
+ {
+ "name": "customer",
+ "type": "string",
+ "required": false,
+ "description": "Only return charges for a specific customer"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of charges",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the charge"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the charge"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount charged in smallest currency unit"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more charges available"
+ }
+ ]
+ },
+ "create_tax_rate": {
+ "name": "Create Tax Rate",
+ "description": "Creates a new tax rate.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "display_name",
+ "type": "string",
+ "required": true,
+ "description": "Display name of the tax rate"
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "Description of the tax rate"
+ },
+ {
+ "name": "percentage",
+ "type": "number",
+ "required": true,
+ "description": "Tax rate percentage"
+ },
+ {
+ "name": "inclusive",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the tax rate is inclusive or exclusive"
+ },
+ {
+ "name": "jurisdiction",
+ "type": "string",
+ "required": false,
+ "description": "Jurisdiction for the tax rate"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the tax rate"
+ },
+ {
+ "name": "display_name",
+ "type": "string",
+ "required": true,
+ "description": "Display name of the tax rate"
+ },
+ {
+ "name": "percentage",
+ "type": "number",
+ "required": true,
+ "description": "Tax rate percentage"
+ }
+ ]
+ },
+ "list_tax_rates": {
+ "name": "List Tax Rates",
+ "description": "Returns a list of tax rates.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of objects to be returned"
+ },
+ {
+ "name": "starting_after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination"
+ },
+ {
+ "name": "active",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by active status"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of tax rates",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the tax rate"
+ },
+ {
+ "name": "display_name",
+ "type": "string",
+ "required": true,
+ "description": "Display name of the tax rate"
+ },
+ {
+ "name": "percentage",
+ "type": "number",
+ "required": true,
+ "description": "Tax rate percentage"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more tax rates available"
+ }
+ ]
+ },
+ "create_webhook_endpoint": {
+ "name": "Create Webhook Endpoint",
+ "description": "Creates a webhook endpoint for receiving events from Stripe.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "url",
+ "type": "string",
+ "required": true,
+ "description": "The URL of the webhook endpoint"
+ },
+ {
+ "name": "enabled_events",
+ "type": "array",
+ "required": true,
+ "description": "List of events to enable for this endpoint"
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "Description of the webhook endpoint"
+ },
+ {
+ "name": "connect",
+ "type": "boolean",
+ "required": false,
+ "description": "Whether this endpoint should receive events from connected accounts"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the webhook endpoint"
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "required": true,
+ "description": "The URL of the webhook endpoint"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the webhook endpoint"
+ },
+ {
+ "name": "secret",
+ "type": "string",
+ "required": true,
+ "description": "The endpoint's secret, used to verify received events"
+ }
+ ]
+ },
+ "list_webhook_endpoints": {
+ "name": "List Webhook Endpoints",
+ "description": "Returns a list of webhook endpoints.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of objects to be returned"
+ },
+ {
+ "name": "starting_after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of webhook endpoints",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the webhook endpoint"
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "required": true,
+ "description": "The URL of the webhook endpoint"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "Status of the webhook endpoint"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more webhook endpoints available"
+ }
+ ]
+ },
+ "delete_webhook_endpoint": {
+ "name": "Delete Webhook Endpoint",
+ "description": "Deletes a webhook endpoint.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the webhook endpoint to delete"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the deleted webhook endpoint"
+ },
+ {
+ "name": "deleted",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the webhook endpoint was successfully deleted"
+ }
+ ]
+ },
+ "get_balance_transaction": {
+ "name": "Get Balance Transaction",
+ "description": "Retrieves a balance transaction.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the balance transaction to retrieve"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the balance transaction"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "The amount of the transaction"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "required": true,
+ "description": "Type of the balance transaction"
+ }
+ ]
+ },
+ "list_balance_transactions": {
+ "name": "List Balance Transactions",
+ "description": "Returns a list of balance transactions.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of objects to be returned"
+ },
+ {
+ "name": "starting_after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination"
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "required": false,
+ "description": "Only return transactions of this type"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of balance transactions",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the balance transaction"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "The amount of the transaction"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "required": true,
+ "description": "Type of the balance transaction"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more balance transactions available"
+ }
+ ]
+ },
+ "create_transfer": {
+ "name": "Create Transfer",
+ "description": "Creates a new transfer to a connected account.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount to transfer in smallest currency unit"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ },
+ {
+ "name": "destination",
+ "type": "string",
+ "required": true,
+ "description": "ID of the connected account to transfer to"
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "required": false,
+ "description": "Description of the transfer"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the transfer"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount transferred in smallest currency unit"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ }
+ ]
+ },
+ "get_transfer": {
+ "name": "Get Transfer",
+ "description": "Retrieves a transfer by its ID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "ID of the transfer to retrieve"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the transfer"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount transferred in smallest currency unit"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ }
+ ]
+ },
+ "list_transfers": {
+ "name": "List Transfers",
+ "description": "Returns a list of transfers.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "A limit on the number of objects to be returned"
+ },
+ {
+ "name": "starting_after",
+ "type": "string",
+ "required": false,
+ "description": "A cursor for pagination"
+ },
+ {
+ "name": "destination",
+ "type": "string",
+ "required": false,
+ "description": "Only return transfers to this connected account"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "data",
+ "type": "array",
+ "required": true,
+ "description": "List of transfers",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "required": true,
+ "description": "Unique identifier for the transfer"
+ },
+ {
+ "name": "amount",
+ "type": "number",
+ "required": true,
+ "description": "Amount transferred in smallest currency unit"
+ },
+ {
+ "name": "currency",
+ "type": "string",
+ "required": true,
+ "description": "Three-letter ISO currency code"
+ }
+ ]
+ },
+ {
+ "name": "has_more",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more transfers available"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/integrations/twilio.js b/src/integrations/twilio.js
new file mode 100644
index 0000000..5cd0029
--- /dev/null
+++ b/src/integrations/twilio.js
@@ -0,0 +1,2324 @@
+export default {
+ "name": "Twilio",
+ "slug": "twilio",
+ "version": "0.1.27",
+ "shortDescription": "Access Twilio API solutions",
+ "description": "Twilio integration for WeWeb that provides comprehensive access to Twilio's communication services including SMS, voice calls, conference calls, and phone number management.",
+ "svgLogo": "",
+ "secrets": [
+ {
+ "name": "TWILIO_ACCOUNT_SID",
+ "description": "Your Twilio Account SID"
+ },
+ {
+ "name": "TWILIO_AUTH_TOKEN",
+ "description": "Your Twilio Auth Token"
+ }
+ ],
+ "methods": {
+ "send_sms": {
+ "name": "Send SMS",
+ "description": "Send an SMS message to a phone number.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "to",
+ "type": "string",
+ "required": true,
+ "description": "The recipient's phone number"
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": true,
+ "description": "The sender's phone number"
+ },
+ {
+ "name": "body",
+ "type": "string",
+ "required": true,
+ "description": "The message content"
+ },
+ {
+ "name": "mediaUrl",
+ "type": "array",
+ "required": false,
+ "description": "URLs of media files to send with the message"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the message"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the message"
+ },
+ {
+ "name": "to",
+ "type": "string",
+ "required": true,
+ "description": "The recipient's phone number"
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": true,
+ "description": "The sender's phone number"
+ },
+ {
+ "name": "body",
+ "type": "string",
+ "required": true,
+ "description": "The message content"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the message was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the message was last updated"
+ },
+ {
+ "name": "dateSent",
+ "type": "string",
+ "required": false,
+ "description": "The date the message was sent"
+ }
+ ]
+ },
+ "make_call": {
+ "name": "Make Call",
+ "description": "Make a voice call to a phone number.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "to",
+ "type": "string",
+ "required": true,
+ "description": "The recipient's phone number"
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": true,
+ "description": "The sender's phone number"
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "required": true,
+ "description": "The URL that returns TwiML instructions for the call"
+ },
+ {
+ "name": "statusCallback",
+ "type": "string",
+ "required": false,
+ "description": "The URL to send status updates to"
+ },
+ {
+ "name": "statusCallbackEvent",
+ "type": "array",
+ "required": false,
+ "description": "The events to send status updates for"
+ },
+ {
+ "name": "statusCallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use for status callbacks"
+ },
+ {
+ "name": "twiml",
+ "type": "string",
+ "required": false,
+ "description": "TwiML instructions for the call"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the call"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the call"
+ },
+ {
+ "name": "to",
+ "type": "string",
+ "required": true,
+ "description": "The recipient's phone number"
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": true,
+ "description": "The sender's phone number"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the call was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the call was last updated"
+ },
+ {
+ "name": "startTime",
+ "type": "string",
+ "required": false,
+ "description": "The date the call started"
+ },
+ {
+ "name": "endTime",
+ "type": "string",
+ "required": false,
+ "description": "The date the call ended"
+ },
+ {
+ "name": "duration",
+ "type": "string",
+ "required": false,
+ "description": "The length of the call in seconds"
+ }
+ ]
+ },
+ "get_account": {
+ "name": "Get Account",
+ "description": "Get account information.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": false,
+ "description": "The unique string that identifies the account"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the account"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the account"
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "required": true,
+ "description": "The type of the account"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the account was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the account was last updated"
+ }
+ ]
+ },
+ "list_phone_numbers": {
+ "name": "List Phone Numbers",
+ "description": "List phone numbers in your account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of records to return"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "required": false,
+ "description": "Number of records per page"
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number"
+ },
+ {
+ "name": "pageToken",
+ "type": "string",
+ "required": false,
+ "description": "Token for the next page of results"
+ },
+ {
+ "name": "areaCode",
+ "type": "string",
+ "required": false,
+ "description": "Filter by area code"
+ },
+ {
+ "name": "contains",
+ "type": "string",
+ "required": false,
+ "description": "Filter by phone number containing this string"
+ },
+ {
+ "name": "smsEnabled",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by SMS capability"
+ },
+ {
+ "name": "mmsEnabled",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by MMS capability"
+ },
+ {
+ "name": "voiceEnabled",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by voice capability"
+ },
+ {
+ "name": "excludeAllAddressRequired",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by address requirement"
+ },
+ {
+ "name": "excludeLocalAddressRequired",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by local address requirement"
+ },
+ {
+ "name": "excludeForeignAddressRequired",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by foreign address requirement"
+ },
+ {
+ "name": "inRegion",
+ "type": "string",
+ "required": false,
+ "description": "Filter by region"
+ },
+ {
+ "name": "inLata",
+ "type": "string",
+ "required": false,
+ "description": "Filter by LATA"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "phoneNumbers",
+ "type": "array",
+ "required": true,
+ "description": "List of phone numbers"
+ },
+ {
+ "name": "hasMore",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more phone numbers available"
+ }
+ ]
+ },
+ "get_phone_number": {
+ "name": "Get Phone Number",
+ "description": "Get a phone number by its SID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the phone number"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the phone number"
+ },
+ {
+ "name": "phoneNumber",
+ "type": "string",
+ "required": true,
+ "description": "The phone number"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the phone number"
+ },
+ {
+ "name": "smsEnabled",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the phone number can receive SMS messages"
+ },
+ {
+ "name": "mmsEnabled",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the phone number can receive MMS messages"
+ },
+ {
+ "name": "voiceEnabled",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the phone number can receive calls"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the phone number was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the phone number was last updated"
+ }
+ ]
+ },
+ "update_phone_number": {
+ "name": "Update Phone Number",
+ "description": "Update a phone number's settings.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the phone number"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": false,
+ "description": "A human-readable description of the phone number"
+ },
+ {
+ "name": "smsUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when the phone number receives an SMS message"
+ },
+ {
+ "name": "smsMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the SMS URL"
+ },
+ {
+ "name": "smsFallbackUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when an error occurs while retrieving the SMS TwiML"
+ },
+ {
+ "name": "smsFallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the SMS fallback URL"
+ },
+ {
+ "name": "voiceUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when the phone number receives a call"
+ },
+ {
+ "name": "voiceMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the voice URL"
+ },
+ {
+ "name": "voiceFallbackUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when an error occurs while retrieving the voice TwiML"
+ },
+ {
+ "name": "voiceFallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the voice fallback URL"
+ },
+ {
+ "name": "statusCallback",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when the call status changes"
+ },
+ {
+ "name": "statusCallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the status callback URL"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the phone number"
+ },
+ {
+ "name": "phoneNumber",
+ "type": "string",
+ "required": true,
+ "description": "The phone number"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the phone number"
+ },
+ {
+ "name": "smsEnabled",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the phone number can receive SMS messages"
+ },
+ {
+ "name": "mmsEnabled",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the phone number can receive MMS messages"
+ },
+ {
+ "name": "voiceEnabled",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the phone number can receive calls"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the phone number was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the phone number was last updated"
+ }
+ ]
+ },
+ "release_phone_number": {
+ "name": "Release Phone Number",
+ "description": "Release a phone number from your account.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the phone number"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "success",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the phone number was successfully released"
+ }
+ ]
+ },
+ "search_available_phone_numbers": {
+ "name": "Search Available Phone Numbers",
+ "description": "Search for available phone numbers to purchase.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "country",
+ "type": "string",
+ "required": true,
+ "description": "The country code to search in"
+ },
+ {
+ "name": "areaCode",
+ "type": "string",
+ "required": false,
+ "description": "Filter by area code"
+ },
+ {
+ "name": "contains",
+ "type": "string",
+ "required": false,
+ "description": "Filter by phone number containing this string"
+ },
+ {
+ "name": "smsEnabled",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by SMS capability"
+ },
+ {
+ "name": "mmsEnabled",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by MMS capability"
+ },
+ {
+ "name": "voiceEnabled",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by voice capability"
+ },
+ {
+ "name": "excludeAllAddressRequired",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by address requirement"
+ },
+ {
+ "name": "excludeLocalAddressRequired",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by local address requirement"
+ },
+ {
+ "name": "excludeForeignAddressRequired",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by foreign address requirement"
+ },
+ {
+ "name": "inRegion",
+ "type": "string",
+ "required": false,
+ "description": "Filter by region"
+ },
+ {
+ "name": "inLata",
+ "type": "string",
+ "required": false,
+ "description": "Filter by LATA"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "availablePhoneNumbers",
+ "type": "array",
+ "required": true,
+ "description": "List of available phone numbers"
+ }
+ ]
+ },
+ "create_application": {
+ "name": "Create Application",
+ "description": "Create a TwiML application.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the application"
+ },
+ {
+ "name": "voiceUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when a call is received"
+ },
+ {
+ "name": "voiceMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the voice URL"
+ },
+ {
+ "name": "voiceFallbackUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when an error occurs while retrieving the voice TwiML"
+ },
+ {
+ "name": "voiceFallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the voice fallback URL"
+ },
+ {
+ "name": "statusCallback",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when the call status changes"
+ },
+ {
+ "name": "statusCallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the status callback URL"
+ },
+ {
+ "name": "smsUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when an SMS message is received"
+ },
+ {
+ "name": "smsMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the SMS URL"
+ },
+ {
+ "name": "smsFallbackUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when an error occurs while retrieving the SMS TwiML"
+ },
+ {
+ "name": "smsFallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the SMS fallback URL"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the application"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the application"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the application was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the application was last updated"
+ }
+ ]
+ },
+ "list_applications": {
+ "name": "List Applications",
+ "description": "List TwiML applications in your account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of records to return"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "required": false,
+ "description": "Number of records per page"
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number"
+ },
+ {
+ "name": "pageToken",
+ "type": "string",
+ "required": false,
+ "description": "Token for the next page of results"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": false,
+ "description": "Filter by friendly name"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "applications",
+ "type": "array",
+ "required": true,
+ "description": "List of applications"
+ },
+ {
+ "name": "hasMore",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more applications available"
+ }
+ ]
+ },
+ "get_application": {
+ "name": "Get Application",
+ "description": "Get a TwiML application by its SID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the application"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the application"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the application"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the application was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the application was last updated"
+ }
+ ]
+ },
+ "update_application": {
+ "name": "Update Application",
+ "description": "Update a TwiML application.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the application"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": false,
+ "description": "A human-readable description of the application"
+ },
+ {
+ "name": "voiceUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when a call is received"
+ },
+ {
+ "name": "voiceMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the voice URL"
+ },
+ {
+ "name": "voiceFallbackUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when an error occurs while retrieving the voice TwiML"
+ },
+ {
+ "name": "voiceFallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the voice fallback URL"
+ },
+ {
+ "name": "statusCallback",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when the call status changes"
+ },
+ {
+ "name": "statusCallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the status callback URL"
+ },
+ {
+ "name": "smsUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when an SMS message is received"
+ },
+ {
+ "name": "smsMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the SMS URL"
+ },
+ {
+ "name": "smsFallbackUrl",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when an error occurs while retrieving the SMS TwiML"
+ },
+ {
+ "name": "smsFallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use when calling the SMS fallback URL"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the application"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the application"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the application was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the application was last updated"
+ }
+ ]
+ },
+ "delete_application": {
+ "name": "Delete Application",
+ "description": "Delete a TwiML application.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the application"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "success",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the application was successfully deleted"
+ }
+ ]
+ },
+ "list_recordings": {
+ "name": "List Recordings",
+ "description": "List call recordings in your account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of records to return"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "required": false,
+ "description": "Number of records per page"
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number"
+ },
+ {
+ "name": "pageToken",
+ "type": "string",
+ "required": false,
+ "description": "Token for the next page of results"
+ },
+ {
+ "name": "callSid",
+ "type": "string",
+ "required": false,
+ "description": "Filter by call SID"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": false,
+ "description": "Filter by date created"
+ },
+ {
+ "name": "dateCreatedBefore",
+ "type": "string",
+ "required": false,
+ "description": "Filter by date created before"
+ },
+ {
+ "name": "dateCreatedAfter",
+ "type": "string",
+ "required": false,
+ "description": "Filter by date created after"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "recordings",
+ "type": "array",
+ "required": true,
+ "description": "List of recordings"
+ },
+ {
+ "name": "hasMore",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more recordings available"
+ }
+ ]
+ },
+ "get_recording": {
+ "name": "Get Recording",
+ "description": "Get a call recording by its SID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the recording"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the recording"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "callSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the call"
+ },
+ {
+ "name": "duration",
+ "type": "string",
+ "required": true,
+ "description": "The length of the recording in seconds"
+ },
+ {
+ "name": "channels",
+ "type": "number",
+ "required": true,
+ "description": "The number of channels in the recording"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the recording"
+ },
+ {
+ "name": "source",
+ "type": "string",
+ "required": true,
+ "description": "The source of the recording"
+ },
+ {
+ "name": "errorCode",
+ "type": "string",
+ "required": false,
+ "description": "The error code if the recording failed"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the recording was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the recording was last updated"
+ },
+ {
+ "name": "uri",
+ "type": "string",
+ "required": true,
+ "description": "The URI of the recording"
+ }
+ ]
+ },
+ "delete_recording": {
+ "name": "Delete Recording",
+ "description": "Delete a call recording.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the recording"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "success",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the recording was successfully deleted"
+ }
+ ]
+ },
+ "list_messages": {
+ "name": "List Messages",
+ "description": "List SMS messages in your account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of records to return"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "required": false,
+ "description": "Number of records per page"
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number"
+ },
+ {
+ "name": "pageToken",
+ "type": "string",
+ "required": false,
+ "description": "Token for the next page of results"
+ },
+ {
+ "name": "to",
+ "type": "string",
+ "required": false,
+ "description": "Filter by recipient phone number"
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": false,
+ "description": "Filter by sender phone number"
+ },
+ {
+ "name": "dateSent",
+ "type": "string",
+ "required": false,
+ "description": "Filter by date sent"
+ },
+ {
+ "name": "dateSentBefore",
+ "type": "string",
+ "required": false,
+ "description": "Filter by date sent before"
+ },
+ {
+ "name": "dateSentAfter",
+ "type": "string",
+ "required": false,
+ "description": "Filter by date sent after"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "messages",
+ "type": "array",
+ "required": true,
+ "description": "List of messages"
+ },
+ {
+ "name": "hasMore",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more messages available"
+ }
+ ]
+ },
+ "get_message": {
+ "name": "Get Message",
+ "description": "Get an SMS message by its SID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the message"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the message"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "to",
+ "type": "string",
+ "required": true,
+ "description": "The recipient's phone number"
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": true,
+ "description": "The sender's phone number"
+ },
+ {
+ "name": "body",
+ "type": "string",
+ "required": true,
+ "description": "The message content"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the message"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the message was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the message was last updated"
+ },
+ {
+ "name": "dateSent",
+ "type": "string",
+ "required": false,
+ "description": "The date the message was sent"
+ }
+ ]
+ },
+ "list_calls": {
+ "name": "List Calls",
+ "description": "List voice calls in your account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of records to return"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "required": false,
+ "description": "Number of records per page"
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number"
+ },
+ {
+ "name": "pageToken",
+ "type": "string",
+ "required": false,
+ "description": "Token for the next page of results"
+ },
+ {
+ "name": "to",
+ "type": "string",
+ "required": false,
+ "description": "Filter by recipient phone number"
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": false,
+ "description": "Filter by sender phone number"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": false,
+ "description": "Filter by call status"
+ },
+ {
+ "name": "startTime",
+ "type": "string",
+ "required": false,
+ "description": "Filter by start time"
+ },
+ {
+ "name": "startTimeBefore",
+ "type": "string",
+ "required": false,
+ "description": "Filter by start time before"
+ },
+ {
+ "name": "startTimeAfter",
+ "type": "string",
+ "required": false,
+ "description": "Filter by start time after"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "calls",
+ "type": "array",
+ "required": true,
+ "description": "List of calls"
+ },
+ {
+ "name": "hasMore",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more calls available"
+ }
+ ]
+ },
+ "get_call": {
+ "name": "Get Call",
+ "description": "Get a voice call by its SID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the call"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the call"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "to",
+ "type": "string",
+ "required": true,
+ "description": "The recipient's phone number"
+ },
+ {
+ "name": "from",
+ "type": "string",
+ "required": true,
+ "description": "The sender's phone number"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the call"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the call was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the call was last updated"
+ },
+ {
+ "name": "startTime",
+ "type": "string",
+ "required": false,
+ "description": "The date the call started"
+ },
+ {
+ "name": "endTime",
+ "type": "string",
+ "required": false,
+ "description": "The date the call ended"
+ },
+ {
+ "name": "duration",
+ "type": "string",
+ "required": false,
+ "description": "The length of the call in seconds"
+ }
+ ]
+ },
+ "create_twiml": {
+ "name": "Create TwiML",
+ "description": "Create TwiML instructions for voice or messaging.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "type",
+ "type": "string",
+ "required": true,
+ "description": "The type of TwiML to create (voice or messaging)"
+ },
+ {
+ "name": "content",
+ "type": "object",
+ "required": true,
+ "description": "The content of the TwiML"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "twiml",
+ "type": "string",
+ "required": true,
+ "description": "The generated TwiML"
+ }
+ ]
+ },
+ "create_conference": {
+ "name": "Create Conference",
+ "description": "Create a conference call.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the conference"
+ },
+ {
+ "name": "statusCallback",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when the conference status changes"
+ },
+ {
+ "name": "statusCallbackEvent",
+ "type": "array",
+ "required": false,
+ "description": "The events to send status updates for"
+ },
+ {
+ "name": "statusCallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use for status callbacks"
+ },
+ {
+ "name": "participantLabel",
+ "type": "string",
+ "required": false,
+ "description": "A label for the participant"
+ },
+ {
+ "name": "participants",
+ "type": "array",
+ "required": false,
+ "description": "List of phone numbers to add as participants"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the conference"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the conference"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the conference"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the conference was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the conference was last updated"
+ }
+ ]
+ },
+ "list_conferences": {
+ "name": "List Conferences",
+ "description": "List conference calls in your account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of records to return"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "required": false,
+ "description": "Number of records per page"
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number"
+ },
+ {
+ "name": "pageToken",
+ "type": "string",
+ "required": false,
+ "description": "Token for the next page of results"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": false,
+ "description": "Filter by conference status"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": false,
+ "description": "Filter by friendly name"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": false,
+ "description": "Filter by date created"
+ },
+ {
+ "name": "dateCreatedBefore",
+ "type": "string",
+ "required": false,
+ "description": "Filter by date created before"
+ },
+ {
+ "name": "dateCreatedAfter",
+ "type": "string",
+ "required": false,
+ "description": "Filter by date created after"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "conferences",
+ "type": "array",
+ "required": true,
+ "description": "List of conferences"
+ },
+ {
+ "name": "hasMore",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more conferences available"
+ }
+ ]
+ },
+ "get_conference": {
+ "name": "Get Conference",
+ "description": "Get a conference call by its SID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the conference"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the conference"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the conference"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the conference"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the conference was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the conference was last updated"
+ }
+ ]
+ },
+ "list_conference_participants": {
+ "name": "List Conference Participants",
+ "description": "List participants in a conference call.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "conferenceSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the conference"
+ },
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of records to return"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "required": false,
+ "description": "Number of records per page"
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number"
+ },
+ {
+ "name": "pageToken",
+ "type": "string",
+ "required": false,
+ "description": "Token for the next page of results"
+ },
+ {
+ "name": "muted",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by muted status"
+ },
+ {
+ "name": "hold",
+ "type": "boolean",
+ "required": false,
+ "description": "Filter by hold status"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "participants",
+ "type": "array",
+ "required": true,
+ "description": "List of participants"
+ },
+ {
+ "name": "hasMore",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more participants available"
+ }
+ ]
+ },
+ "mute_conference_participant": {
+ "name": "Mute Conference Participant",
+ "description": "Mute a participant in a conference call.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "conferenceSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the conference"
+ },
+ {
+ "name": "participantSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the participant"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the participant"
+ },
+ {
+ "name": "conferenceSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the conference"
+ },
+ {
+ "name": "muted",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the participant is muted"
+ }
+ ]
+ },
+ "unmute_conference_participant": {
+ "name": "Unmute Conference Participant",
+ "description": "Unmute a participant in a conference call.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "conferenceSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the conference"
+ },
+ {
+ "name": "participantSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the participant"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the participant"
+ },
+ {
+ "name": "conferenceSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the conference"
+ },
+ {
+ "name": "muted",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the participant is muted"
+ }
+ ]
+ },
+ "list_message_media": {
+ "name": "List Message Media",
+ "description": "List media associated with a message.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "messageSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the message"
+ },
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of records to return"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "required": false,
+ "description": "Number of records per page"
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number"
+ },
+ {
+ "name": "pageToken",
+ "type": "string",
+ "required": false,
+ "description": "Token for the next page of results"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "media",
+ "type": "array",
+ "required": true,
+ "description": "List of media"
+ },
+ {
+ "name": "hasMore",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more media available"
+ }
+ ]
+ },
+ "get_message_media": {
+ "name": "Get Message Media",
+ "description": "Get media associated with a message.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "messageSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the message"
+ },
+ {
+ "name": "mediaSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the media"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the media"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "parentAccountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the parent account"
+ },
+ {
+ "name": "messageSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the message"
+ },
+ {
+ "name": "uri",
+ "type": "string",
+ "required": true,
+ "description": "The URI of the media"
+ },
+ {
+ "name": "contentType",
+ "type": "string",
+ "required": true,
+ "description": "The content type of the media"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the media was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the media was last updated"
+ }
+ ]
+ },
+ "delete_message_media": {
+ "name": "Delete Message Media",
+ "description": "Delete media associated with a message.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "messageSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the message"
+ },
+ {
+ "name": "mediaSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the media"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "success",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the media was successfully deleted"
+ }
+ ]
+ },
+ "create_webhook": {
+ "name": "Create Webhook",
+ "description": "Create a webhook endpoint.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "url",
+ "type": "string",
+ "required": true,
+ "description": "The URL to call when the webhook is triggered"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": false,
+ "description": "A human-readable description of the webhook"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": false,
+ "description": "The status of the webhook"
+ },
+ {
+ "name": "statusCallback",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when the webhook status changes"
+ },
+ {
+ "name": "statusCallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use for status callbacks"
+ },
+ {
+ "name": "filters",
+ "type": "array",
+ "required": false,
+ "description": "List of filters to apply to the webhook"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the webhook"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the webhook"
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "required": true,
+ "description": "The URL to call when the webhook is triggered"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the webhook"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the webhook was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the webhook was last updated"
+ }
+ ]
+ },
+ "list_webhooks": {
+ "name": "List Webhooks",
+ "description": "List webhook endpoints in your account.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "limit",
+ "type": "number",
+ "required": false,
+ "description": "Maximum number of records to return"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "required": false,
+ "description": "Number of records per page"
+ },
+ {
+ "name": "page",
+ "type": "number",
+ "required": false,
+ "description": "Page number"
+ },
+ {
+ "name": "pageToken",
+ "type": "string",
+ "required": false,
+ "description": "Token for the next page of results"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "webhooks",
+ "type": "array",
+ "required": true,
+ "description": "List of webhooks"
+ },
+ {
+ "name": "hasMore",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether there are more webhooks available"
+ }
+ ]
+ },
+ "get_webhook": {
+ "name": "Get Webhook",
+ "description": "Get a webhook endpoint by its SID.",
+ "recommendedHttpMethod": "GET",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the webhook"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the webhook"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the webhook"
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "required": true,
+ "description": "The URL to call when the webhook is triggered"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the webhook"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the webhook was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the webhook was last updated"
+ }
+ ]
+ },
+ "update_webhook": {
+ "name": "Update Webhook",
+ "description": "Update a webhook endpoint.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the webhook"
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when the webhook is triggered"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": false,
+ "description": "A human-readable description of the webhook"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": false,
+ "description": "The status of the webhook"
+ },
+ {
+ "name": "statusCallback",
+ "type": "string",
+ "required": false,
+ "description": "The URL to call when the webhook status changes"
+ },
+ {
+ "name": "statusCallbackMethod",
+ "type": "string",
+ "required": false,
+ "description": "The HTTP method to use for status callbacks"
+ },
+ {
+ "name": "filters",
+ "type": "array",
+ "required": false,
+ "description": "List of filters to apply to the webhook"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the webhook"
+ },
+ {
+ "name": "accountSid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the account"
+ },
+ {
+ "name": "friendlyName",
+ "type": "string",
+ "required": true,
+ "description": "A human-readable description of the webhook"
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "required": true,
+ "description": "The URL to call when the webhook is triggered"
+ },
+ {
+ "name": "status",
+ "type": "string",
+ "required": true,
+ "description": "The status of the webhook"
+ },
+ {
+ "name": "dateCreated",
+ "type": "string",
+ "required": true,
+ "description": "The date the webhook was created"
+ },
+ {
+ "name": "dateUpdated",
+ "type": "string",
+ "required": true,
+ "description": "The date the webhook was last updated"
+ }
+ ]
+ },
+ "delete_webhook": {
+ "name": "Delete Webhook",
+ "description": "Delete a webhook endpoint.",
+ "recommendedHttpMethod": "DELETE",
+ "inputFields": [
+ {
+ "name": "sid",
+ "type": "string",
+ "required": true,
+ "description": "The unique string that identifies the webhook"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "success",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the webhook was successfully deleted"
+ }
+ ]
+ },
+ "validate_webhook_signature": {
+ "name": "Validate Webhook Signature",
+ "description": "Validate the signature of a webhook request.",
+ "recommendedHttpMethod": "POST",
+ "inputFields": [
+ {
+ "name": "url",
+ "type": "string",
+ "required": true,
+ "description": "The URL that was called"
+ },
+ {
+ "name": "params",
+ "type": "object",
+ "required": true,
+ "description": "The parameters that were sent with the request"
+ },
+ {
+ "name": "signature",
+ "type": "string",
+ "required": true,
+ "description": "The signature to validate"
+ },
+ {
+ "name": "authToken",
+ "type": "string",
+ "required": false,
+ "description": "The auth token to use for validation"
+ }
+ ],
+ "outputType": [
+ {
+ "name": "valid",
+ "type": "boolean",
+ "required": true,
+ "description": "Whether the signature is valid"
+ },
+ {
+ "name": "expectedSignature",
+ "type": "string",
+ "required": true,
+ "description": "The expected signature"
+ },
+ {
+ "name": "providedSignature",
+ "type": "string",
+ "required": true,
+ "description": "The provided signature"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/wwPlugin.js b/src/wwPlugin.js
index 5efe394..ffda5ab 100644
--- a/src/wwPlugin.js
+++ b/src/wwPlugin.js
@@ -31,6 +31,7 @@ import './components/Functions/InvokeEdge.vue';
import { createClient, FunctionsHttpError, FunctionsRelayError, FunctionsFetchError } from '@supabase/supabase-js';
import { generateFilter } from './helpers/filters';
+import integrations from './integrations/index';
export default {
instance: null,
@@ -38,6 +39,8 @@ export default {
/* wwEditor:start */
doc: null,
projectInfo: null,
+ backendEngineVersion: '0.2.48',
+ integrations,
/* wwEditor:end */
/*=============================================m_ÔÔ_m=============================================\
Plugin API
@@ -53,14 +56,13 @@ export default {
wwLib.wwNotification.open({ text: 'Connecting supabase account...', color: 'blue' });
window.localStorage.removeItem('supabase_oauth');
await wwAxios.post(
- `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${
- wwLib.$store.getters['websiteData/getDesignInfo'].id
+ `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${wwLib.$store.getters['websiteData/getDesignInfo'].id
}/supabase/connect`,
{ code, redirectUri: wwLib.wwApiRequests._getPluginsUrl() + '/supabase/redirect' }
);
wwLib.wwNotification.open({ text: 'Your supabase account has been linked.', color: 'green' });
wwLib.$emit('wwTopBar:open', 'WEBSITE_PLUGINS');
- wwLib.$emit('wwTopBar:plugins:setPlugin', wwLib.wwPlugins.supabase.id);
+ wwLib.$emit('wwTopBar:plugins:setPluginId', wwLib.wwPlugins.supabase.id);
}
await this.fetchProjectInfo(settings.publicData.projectUrl, settings.privateData.accessToken);
/* wwEditor:end */
@@ -83,8 +85,7 @@ export default {
},
async syncSettings(settings) {
await wwAxios.post(
- `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${
- wwLib.$store.getters['websiteData/getDesignInfo'].id
+ `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${wwLib.$store.getters['websiteData/getDesignInfo'].id
}/supabase/sync`,
{ source: 'supabase', settings }
);
@@ -92,12 +93,51 @@ export default {
// driver: core, roles
async install(driver = 'core') {
await wwAxios.post(
- `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${
- wwLib.$store.getters['websiteData/getDesignInfo'].id
+ `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${wwLib.$store.getters['websiteData/getDesignInfo'].id
}/supabase/install`,
{ driver }
);
},
+ async enableBackendWorkflows() {
+ if (this.settings.privateData.backendWorkflowsEnabled) return;
+ await wwLib.$store.dispatch('websiteData/updatePluginSettings', {
+ pluginId: wwLib.wwPlugins.supabase.id,
+ settings: {
+ id: wwLib.wwPlugins.supabase.settings.id,
+ designId: wwLib.wwPlugins.supabase.settings.designId,
+ publicData: wwLib.wwPlugins.supabase.settings.publicData,
+ privateData: {
+ ...wwLib.wwPlugins.supabase.settings.privateData,
+ backendWorkflowsEnabled: true,
+ },
+ },
+ });
+ this.checkBackendUpdates();
+ },
+ checkBackendUpdates() {
+ if (wwLib.$store.getters['manager/getIsBackup']) return;
+ if (!this.settings.privateData.backendWorkflowsEnabled) return;
+ // check in settings and compare with current versions
+ const hasEngineUpdates = this.settings.privateData.backendEngineVersion !== this.backendEngineVersion;
+ const installedIntegrationsVersions = this.settings.privateData.backendIntegrations || {};
+ const latestIntegrationsVersions = this.integrations.reduce((acc, integration) => {
+ acc[integration.slug] = integration.version;
+ return acc;
+ }, {});
+
+ // check if any integration has an update
+ let hasIntegrationsUpdates = false;
+ for (const integrationKey in installedIntegrationsVersions) {
+ if (installedIntegrationsVersions[integrationKey] !== latestIntegrationsVersions[integrationKey]) {
+ hasIntegrationsUpdates = true;
+ break;
+ }
+ }
+ if (hasEngineUpdates || hasIntegrationsUpdates) {
+ // Request wwedge deploy
+ wwLib.$emit('wwTopBar:supabase:deploy');
+ }
+ },
async fetchProjectInfo(
projectUrl = wwLib.wwPlugins.supabase.settings.publicData?.projectUrl,
accessToken = wwLib.wwPlugins.supabase.settings.privateData?.accessToken
@@ -124,6 +164,7 @@ export default {
settings.publicData.apiKey,
settings.privateData.apiKey
);
+ this.checkBackendUpdates();
} else {
await this.load(settings.publicData.projectUrl, settings.publicData.apiKey);
this.subscribeTables(settings.publicData.realtimeTables || {});
@@ -133,17 +174,15 @@ export default {
try {
return await wwAxios({
method,
- url: `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${
- wwLib.$store.getters['websiteData/getDesignInfo'].id
- }/supabase${path}`,
+ url: `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${wwLib.$store.getters['websiteData/getDesignInfo'].id
+ }/supabase${path}`,
data,
});
} catch (error) {
const isOauthToken = wwLib.wwPlugins.supabase.settings.privateData.accessToken?.startsWith('sbp_oauth');
if (retry && [401, 403].includes(error.response?.status) && isOauthToken) {
const { data } = await wwAxios.post(
- `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${
- wwLib.$store.getters['websiteData/getDesignInfo'].id
+ `${wwLib.wwApiRequests._getPluginsUrl()}/designs/${wwLib.$store.getters['websiteData/getDesignInfo'].id
}/supabase/refresh`
);
return await this.requestAPI({ method, path, data }, false);
@@ -223,6 +262,7 @@ export default {
if (!this.instance) throw new Error('Invalid Supabase configuration.');
/* wwEditor:start */
+ this.checkBackendUpdates();
await this.fetchDoc(projectUrl, apiKey);
/* wwEditor:end */
} catch (err) {
@@ -414,8 +454,8 @@ export default {
const query = Array.isArray(queries)
? queries
: queries && typeof queries === 'object'
- ? Object.keys(queries).map(k => ({ key: k, value: queries[k] }))
- : [];
+ ? Object.keys(queries).map(k => ({ key: k, value: queries[k] }))
+ : [];
const queryString = query.length
? query.reduce((result, item) => `${result}${item.key}=${item.value}&`, '?')
: '';
@@ -482,14 +522,14 @@ export default {
path,
options.transform
? {
- transform: {
- ...(options.transform.format ? { format: options.transform.format } : {}),
- ...(options.transform.quality ? { quality: options.transform.quality } : {}),
- ...(options.transform.resize ? { resize: options.transform.resize } : {}),
- ...(options.transform.width ? { width: options.transform.width } : {}),
- ...(options.transform.height ? { height: options.transform.height } : {}),
- },
- }
+ transform: {
+ ...(options.transform.format ? { format: options.transform.format } : {}),
+ ...(options.transform.quality ? { quality: options.transform.quality } : {}),
+ ...(options.transform.resize ? { resize: options.transform.resize } : {}),
+ ...(options.transform.width ? { width: options.transform.width } : {}),
+ ...(options.transform.height ? { height: options.transform.height } : {}),
+ },
+ }
: {}
);
if (error) throw new Error(error.message, { cause: error });
@@ -541,12 +581,12 @@ export default {
download: options.download ? options.download.filename || true : false,
transform: options.transform
? {
- ...(options.transform.format ? { format: options.transform.format } : {}),
- ...(options.transform.quality ? { quality: options.transform.quality } : {}),
- ...(options.transform.resize ? { resize: options.transform.resize } : {}),
- ...(options.transform.width ? { width: options.transform.width } : {}),
- ...(options.transform.height ? { height: options.transform.height } : {}),
- }
+ ...(options.transform.format ? { format: options.transform.format } : {}),
+ ...(options.transform.quality ? { quality: options.transform.quality } : {}),
+ ...(options.transform.resize ? { resize: options.transform.resize } : {}),
+ ...(options.transform.width ? { width: options.transform.width } : {}),
+ ...(options.transform.height ? { height: options.transform.height } : {}),
+ }
: null,
});
} else {
@@ -567,14 +607,14 @@ export default {
download: options.download ? options.download.filename || true : false,
...(options.transform
? {
- transform: {
- ...(options.transform.format ? { format: options.transform.format } : {}),
- ...(options.transform.quality ? { quality: options.transform.quality } : {}),
- ...(options.transform.resize ? { resize: options.transform.resize } : {}),
- ...(options.transform.width ? { width: options.transform.width } : {}),
- ...(options.transform.height ? { height: options.transform.height } : {}),
- },
- }
+ transform: {
+ ...(options.transform.format ? { format: options.transform.format } : {}),
+ ...(options.transform.quality ? { quality: options.transform.quality } : {}),
+ ...(options.transform.resize ? { resize: options.transform.resize } : {}),
+ ...(options.transform.width ? { width: options.transform.width } : {}),
+ ...(options.transform.height ? { height: options.transform.height } : {}),
+ },
+ }
: {}),
});
if (error) throw new Error(error.message, { cause: error });
@@ -743,10 +783,10 @@ const applyModifiers = (query, { select, order, limit, range, single, maybeSingl
select.mode === 'minimal'
? ''
: select.mode === 'guided'
- ? select?.fields.length
- ? select.fields.join(', ')
- : '*'
- : select?.fieldsAdvanced
+ ? select?.fields.length
+ ? select.fields.join(', ')
+ : '*'
+ : select?.fieldsAdvanced
);
}