@bubblelab/bubble-core 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bubble-bundle.d.ts +803 -351
- package/dist/bubble-factory.d.ts.map +1 -1
- package/dist/bubble-factory.js +130 -35
- package/dist/bubble-factory.js.map +1 -1
- package/dist/bubble-flow/bubble-flow-class.d.ts +5 -0
- package/dist/bubble-flow/bubble-flow-class.d.ts.map +1 -1
- package/dist/bubble-flow/bubble-flow-class.js +20 -0
- package/dist/bubble-flow/bubble-flow-class.js.map +1 -1
- package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts.map +1 -1
- package/dist/bubble-flow/sample/simplified-data-analysis.flow.js +6 -3
- package/dist/bubble-flow/sample/simplified-data-analysis.flow.js.map +1 -1
- package/dist/bubbles/service-bubble/agi-inc.d.ts +1121 -0
- package/dist/bubbles/service-bubble/agi-inc.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/agi-inc.js +730 -0
- package/dist/bubbles/service-bubble/agi-inc.js.map +1 -0
- package/dist/bubbles/service-bubble/ai-agent.d.ts +273 -61
- package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/ai-agent.js +536 -405
- package/dist/bubbles/service-bubble/ai-agent.js.map +1 -1
- package/dist/bubbles/service-bubble/airtable.d.ts +1753 -0
- package/dist/bubbles/service-bubble/airtable.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/airtable.js +1173 -0
- package/dist/bubbles/service-bubble/airtable.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts +240 -0
- package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.js +119 -0
- package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +4 -4
- package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +14 -14
- package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts +137 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.js +81 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +6 -6
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +32 -32
- package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +488 -0
- package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.js +463 -0
- package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +262 -0
- package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.js +291 -0
- package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +12 -12
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +1301 -170
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.js +32 -0
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.js.map +1 -1
- package/dist/bubbles/service-bubble/apify/apify.d.ts +158 -13
- package/dist/bubbles/service-bubble/apify/apify.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/apify/apify.js +222 -37
- package/dist/bubbles/service-bubble/apify/apify.js.map +1 -1
- package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +542 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.d.ts +37 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.js +203 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.js.map +1 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.js +593 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.js.map +1 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +518 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js +311 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/browserbase/index.d.ts +3 -0
- package/dist/bubbles/service-bubble/browserbase/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/browserbase/index.js +3 -0
- package/dist/bubbles/service-bubble/browserbase/index.js.map +1 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +1358 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.js +219 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.js.map +1 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +1604 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.js +194 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/crustdata/index.d.ts +3 -0
- package/dist/bubbles/service-bubble/crustdata/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/crustdata/index.js +3 -0
- package/dist/bubbles/service-bubble/crustdata/index.js.map +1 -0
- package/dist/bubbles/service-bubble/eleven-labs.d.ts +421 -0
- package/dist/bubbles/service-bubble/eleven-labs.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/eleven-labs.js +479 -0
- package/dist/bubbles/service-bubble/eleven-labs.js.map +1 -0
- package/dist/bubbles/service-bubble/firecrawl.d.ts +37748 -0
- package/dist/bubbles/service-bubble/firecrawl.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/firecrawl.js +1489 -0
- package/dist/bubbles/service-bubble/firecrawl.js.map +1 -0
- package/dist/bubbles/service-bubble/followupboss.d.ts +6822 -0
- package/dist/bubbles/service-bubble/followupboss.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/followupboss.js +1394 -0
- package/dist/bubbles/service-bubble/followupboss.js.map +1 -0
- package/dist/bubbles/service-bubble/github.d.ts +2393 -0
- package/dist/bubbles/service-bubble/github.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/github.js +1046 -0
- package/dist/bubbles/service-bubble/github.js.map +1 -0
- package/dist/bubbles/service-bubble/gmail.d.ts +180 -180
- package/dist/bubbles/service-bubble/google-calendar.d.ts +60 -60
- package/dist/bubbles/service-bubble/google-drive.d.ts +69 -68
- package/dist/bubbles/service-bubble/google-drive.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/google-drive.js +35 -3
- package/dist/bubbles/service-bubble/google-drive.js.map +1 -1
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +943 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.d.ts +31 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.js +184 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.js.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.js +401 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.js.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts +1024 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/{google-sheets.js → google-sheets/google-sheets.schema.js} +45 -409
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.d.ts +38 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.js +183 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.js.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/index.d.ts +4 -0
- package/dist/bubbles/service-bubble/google-sheets/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/index.js +4 -0
- package/dist/bubbles/service-bubble/google-sheets/index.js.map +1 -0
- package/dist/bubbles/service-bubble/hello-world.d.ts +4 -4
- package/dist/bubbles/service-bubble/http.d.ts +17 -5
- package/dist/bubbles/service-bubble/http.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/http.integration.flow.d.ts +49 -0
- package/dist/bubbles/service-bubble/http.integration.flow.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/http.integration.flow.js +425 -0
- package/dist/bubbles/service-bubble/http.integration.flow.js.map +1 -0
- package/dist/bubbles/service-bubble/http.js +47 -5
- package/dist/bubbles/service-bubble/http.js.map +1 -1
- package/dist/bubbles/service-bubble/insforge-db.d.ts +140 -0
- package/dist/bubbles/service-bubble/insforge-db.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/insforge-db.js +260 -0
- package/dist/bubbles/service-bubble/insforge-db.js.map +1 -0
- package/dist/bubbles/service-bubble/notion/index.d.ts +3 -0
- package/dist/bubbles/service-bubble/notion/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/notion/index.js +3 -0
- package/dist/bubbles/service-bubble/notion/index.js.map +1 -0
- package/dist/bubbles/service-bubble/notion/notion.d.ts +35405 -0
- package/dist/bubbles/service-bubble/notion/notion.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/notion/notion.js +1492 -0
- package/dist/bubbles/service-bubble/notion/notion.js.map +1 -0
- package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +1148 -0
- package/dist/bubbles/service-bubble/notion/property-schemas.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/notion/property-schemas.js +341 -0
- package/dist/bubbles/service-bubble/notion/property-schemas.js.map +1 -0
- package/dist/bubbles/service-bubble/postgresql.d.ts +12 -12
- package/dist/bubbles/service-bubble/resend.d.ts +30 -9
- package/dist/bubbles/service-bubble/resend.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/resend.js +133 -2
- package/dist/bubbles/service-bubble/resend.js.map +1 -1
- package/dist/bubbles/service-bubble/slack.d.ts +1741 -798
- package/dist/bubbles/service-bubble/slack.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/slack.js +322 -28
- package/dist/bubbles/service-bubble/slack.js.map +1 -1
- package/dist/bubbles/service-bubble/storage.d.ts +26 -22
- package/dist/bubbles/service-bubble/storage.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/storage.js +45 -4
- package/dist/bubbles/service-bubble/storage.js.map +1 -1
- package/dist/bubbles/service-bubble/telegram.d.ts +7742 -0
- package/dist/bubbles/service-bubble/telegram.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/telegram.js +1132 -0
- package/dist/bubbles/service-bubble/telegram.js.map +1 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +494 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.d.ts +31 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.js +100 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.js.map +1 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.js +1301 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +473 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.js +230 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.js.map +1 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.d.ts +3 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.js +3 -0
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.js.map +1 -0
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +76 -20
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js +12 -0
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +14 -14
- package/dist/bubbles/tool-bubble/code-edit-tool.d.ts +188 -0
- package/dist/bubbles/tool-bubble/code-edit-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/code-edit-tool.js +321 -0
- package/dist/bubbles/tool-bubble/code-edit-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +740 -0
- package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/company-enrichment-tool.js +350 -0
- package/dist/bubbles/tool-bubble/company-enrichment-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +8 -4
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.js +115 -10
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +455 -0
- package/dist/bubbles/tool-bubble/google-maps-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/google-maps-tool.js +206 -0
- package/dist/bubbles/tool-bubble/google-maps-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/instagram-tool.d.ts +36 -36
- package/dist/bubbles/tool-bubble/instagram-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/instagram-tool.js +4 -2
- package/dist/bubbles/tool-bubble/instagram-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +830 -453
- package/dist/bubbles/tool-bubble/linkedin-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/linkedin-tool.js +236 -14
- package/dist/bubbles/tool-bubble/linkedin-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +66 -66
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +17 -16
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/research-agent-tool.js +32 -17
- package/dist/bubbles/tool-bubble/research-agent-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +485 -0
- package/dist/bubbles/tool-bubble/tiktok-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/tiktok-tool.js +226 -0
- package/dist/bubbles/tool-bubble/tiktok-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/tool-template.d.ts +8 -8
- package/dist/bubbles/tool-bubble/twitter-tool.d.ts +947 -0
- package/dist/bubbles/tool-bubble/twitter-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/twitter-tool.js +497 -0
- package/dist/bubbles/tool-bubble/twitter-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +22 -16
- package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/web-crawl-tool.js +58 -59
- package/dist/bubbles/tool-bubble/web-crawl-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/web-extract-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/web-extract-tool.js +17 -17
- package/dist/bubbles/tool-bubble/web-extract-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +21 -113
- package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/web-scrape-tool.js +55 -73
- package/dist/bubbles/tool-bubble/web-scrape-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/web-search-tool.d.ts +20 -9
- package/dist/bubbles/tool-bubble/web-search-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/web-search-tool.js +45 -35
- package/dist/bubbles/tool-bubble/web-search-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/youtube-tool.d.ts +25 -25
- package/dist/bubbles/tool-bubble/youtube-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/youtube-tool.js +8 -5
- package/dist/bubbles/tool-bubble/youtube-tool.js.map +1 -1
- package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts +4 -4
- package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +30 -30
- package/dist/bubbles/workflow-bubble/generate-document.workflow.js +1 -1
- package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +22 -22
- package/dist/bubbles/workflow-bubble/parse-document.workflow.js +1 -1
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +70 -70
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts.map +1 -1
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js +4 -4
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js.map +1 -1
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +36 -36
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js +1 -1
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +14 -14
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts.map +1 -1
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js +6 -6
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js.map +1 -1
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +18 -18
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts.map +1 -1
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.js +24 -4
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.js.map +1 -1
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +19 -19
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts.map +1 -1
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js +8 -8
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js.map +1 -1
- package/dist/bubbles.json +260 -77
- package/dist/index.d.ts +25 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/logging/BubbleLogger.d.ts +55 -16
- package/dist/logging/BubbleLogger.d.ts.map +1 -1
- package/dist/logging/BubbleLogger.js +192 -77
- package/dist/logging/BubbleLogger.js.map +1 -1
- package/dist/logging/StreamingBubbleLogger.d.ts +21 -1
- package/dist/logging/StreamingBubbleLogger.d.ts.map +1 -1
- package/dist/logging/StreamingBubbleLogger.js +80 -8
- package/dist/logging/StreamingBubbleLogger.js.map +1 -1
- package/dist/logging/WebhookStreamLogger.d.ts +66 -0
- package/dist/logging/WebhookStreamLogger.d.ts.map +1 -0
- package/dist/logging/WebhookStreamLogger.js +291 -0
- package/dist/logging/WebhookStreamLogger.js.map +1 -0
- package/dist/types/available-tools.d.ts +1 -1
- package/dist/types/available-tools.d.ts.map +1 -1
- package/dist/types/available-tools.js +7 -0
- package/dist/types/available-tools.js.map +1 -1
- package/dist/types/base-bubble-class.d.ts +6 -4
- package/dist/types/base-bubble-class.d.ts.map +1 -1
- package/dist/types/base-bubble-class.js +30 -23
- package/dist/types/base-bubble-class.js.map +1 -1
- package/dist/types/bubble.d.ts +2 -0
- package/dist/types/bubble.d.ts.map +1 -1
- package/dist/types/service-bubble-class.d.ts +1 -1
- package/dist/types/service-bubble-class.d.ts.map +1 -1
- package/dist/types/service-bubble-class.js +2 -2
- package/dist/types/service-bubble-class.js.map +1 -1
- package/dist/types/tool-bubble-class.d.ts +1 -1
- package/dist/types/tool-bubble-class.d.ts.map +1 -1
- package/dist/types/tool-bubble-class.js +60 -10
- package/dist/types/tool-bubble-class.js.map +1 -1
- package/dist/types/workflow-bubble-class.d.ts +1 -1
- package/dist/types/workflow-bubble-class.d.ts.map +1 -1
- package/dist/types/workflow-bubble-class.js +2 -2
- package/dist/types/workflow-bubble-class.js.map +1 -1
- package/dist/utils/agent-formatter.d.ts +14 -2
- package/dist/utils/agent-formatter.d.ts.map +1 -1
- package/dist/utils/agent-formatter.js +174 -26
- package/dist/utils/agent-formatter.js.map +1 -1
- package/dist/utils/bubbleflow-validation.d.ts +7 -0
- package/dist/utils/bubbleflow-validation.d.ts.map +1 -1
- package/dist/utils/bubbleflow-validation.js +171 -6
- package/dist/utils/bubbleflow-validation.js.map +1 -1
- package/dist/utils/json-parsing.d.ts.map +1 -1
- package/dist/utils/json-parsing.js +146 -0
- package/dist/utils/json-parsing.js.map +1 -1
- package/dist/utils/safe-gemini-chat.d.ts +31 -0
- package/dist/utils/safe-gemini-chat.d.ts.map +1 -0
- package/dist/utils/safe-gemini-chat.js +93 -0
- package/dist/utils/safe-gemini-chat.js.map +1 -0
- package/dist/utils/schema-comparison.d.ts +92 -0
- package/dist/utils/schema-comparison.d.ts.map +1 -0
- package/dist/utils/schema-comparison.js +716 -0
- package/dist/utils/schema-comparison.js.map +1 -0
- package/dist/utils/zod-schema.d.ts +24 -0
- package/dist/utils/zod-schema.d.ts.map +1 -0
- package/dist/utils/zod-schema.js +56 -0
- package/dist/utils/zod-schema.js.map +1 -0
- package/package.json +6 -4
- package/dist/bubbles/service-bubble/google-sheets.d.ts +0 -1811
- package/dist/bubbles/service-bubble/google-sheets.d.ts.map +0 -1
- package/dist/bubbles/service-bubble/google-sheets.js.map +0 -1
- package/dist/bubbles/service-bubble/x-twitter.d.ts +0 -814
- package/dist/bubbles/service-bubble/x-twitter.d.ts.map +0 -1
- package/dist/bubbles/service-bubble/x-twitter.js +0 -445
- package/dist/bubbles/service-bubble/x-twitter.js.map +0 -1
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts +0 -125
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts.map +0 -1
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js +0 -808
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js.map +0 -1
- package/dist/test-gm.d.ts +0 -10
- package/dist/test-gm.d.ts.map +0 -1
- package/dist/test-gm.js +0 -95
- package/dist/test-gm.js.map +0 -1
- package/dist/utils/param-helper.d.ts +0 -2
- package/dist/utils/param-helper.d.ts.map +0 -1
- package/dist/utils/param-helper.js +0 -5
- package/dist/utils/param-helper.js.map +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ServiceBubble } from '../../types/service-bubble-class.js';
|
|
3
|
+
import type { BubbleContext } from '../../types/bubble.js';
|
|
4
|
+
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
5
|
+
export declare const SqlOperations: z.ZodEnum<["SELECT", "INSERT", "UPDATE", "DELETE", "CREATE", "WITH", "EXPLAIN"]>;
|
|
6
|
+
declare const InsForgeDbParamsSchema: z.ZodObject<{
|
|
7
|
+
query: z.ZodString;
|
|
8
|
+
allowedOperations: z.ZodDefault<z.ZodArray<z.ZodEnum<["SELECT", "INSERT", "UPDATE", "DELETE", "CREATE", "WITH", "EXPLAIN"]>, "many">>;
|
|
9
|
+
parameters: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
|
|
10
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
maxRows: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
parameters: unknown[];
|
|
15
|
+
timeout: number;
|
|
16
|
+
query: string;
|
|
17
|
+
allowedOperations: ("SELECT" | "INSERT" | "UPDATE" | "DELETE" | "WITH" | "EXPLAIN" | "CREATE")[];
|
|
18
|
+
maxRows: number;
|
|
19
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
query: string;
|
|
22
|
+
parameters?: unknown[] | undefined;
|
|
23
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
24
|
+
timeout?: number | undefined;
|
|
25
|
+
allowedOperations?: ("SELECT" | "INSERT" | "UPDATE" | "DELETE" | "WITH" | "EXPLAIN" | "CREATE")[] | undefined;
|
|
26
|
+
maxRows?: number | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
type InsForgeDbParamsInput = z.input<typeof InsForgeDbParamsSchema>;
|
|
29
|
+
type InsForgeDbParams = z.output<typeof InsForgeDbParamsSchema>;
|
|
30
|
+
declare const InsForgeDbResultSchema: z.ZodObject<{
|
|
31
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
32
|
+
rowCount: z.ZodNullable<z.ZodNumber>;
|
|
33
|
+
command: z.ZodString;
|
|
34
|
+
executionTime: z.ZodNumber;
|
|
35
|
+
success: z.ZodBoolean;
|
|
36
|
+
error: z.ZodString;
|
|
37
|
+
cleanedJSONString: z.ZodString;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
executionTime: number;
|
|
40
|
+
error: string;
|
|
41
|
+
success: boolean;
|
|
42
|
+
rows: Record<string, unknown>[];
|
|
43
|
+
rowCount: number | null;
|
|
44
|
+
command: string;
|
|
45
|
+
cleanedJSONString: string;
|
|
46
|
+
}, {
|
|
47
|
+
executionTime: number;
|
|
48
|
+
error: string;
|
|
49
|
+
success: boolean;
|
|
50
|
+
rows: Record<string, unknown>[];
|
|
51
|
+
rowCount: number | null;
|
|
52
|
+
command: string;
|
|
53
|
+
cleanedJSONString: string;
|
|
54
|
+
}>;
|
|
55
|
+
type InsForgeDbResult = z.output<typeof InsForgeDbResultSchema>;
|
|
56
|
+
export type { InsForgeDbParamsInput };
|
|
57
|
+
/**
|
|
58
|
+
* InsForge Database Bubble
|
|
59
|
+
*
|
|
60
|
+
* Execute SQL queries against an InsForge backend database.
|
|
61
|
+
* Works similarly to the PostgreSQL bubble but uses InsForge's REST API.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const result = await new InsForgeDbBubble({
|
|
66
|
+
* query: 'SELECT * FROM users WHERE active = $1',
|
|
67
|
+
* parameters: [true],
|
|
68
|
+
* allowedOperations: ['SELECT'],
|
|
69
|
+
* maxRows: 100,
|
|
70
|
+
* }).action();
|
|
71
|
+
*
|
|
72
|
+
* console.log(result.data.rows);
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare class InsForgeDbBubble extends ServiceBubble<InsForgeDbParams, InsForgeDbResult> {
|
|
76
|
+
static readonly type: "service";
|
|
77
|
+
static readonly service = "insforge";
|
|
78
|
+
static readonly authType: "apikey";
|
|
79
|
+
static readonly bubbleName = "insforge-db";
|
|
80
|
+
static readonly schema: z.ZodObject<{
|
|
81
|
+
query: z.ZodString;
|
|
82
|
+
allowedOperations: z.ZodDefault<z.ZodArray<z.ZodEnum<["SELECT", "INSERT", "UPDATE", "DELETE", "CREATE", "WITH", "EXPLAIN"]>, "many">>;
|
|
83
|
+
parameters: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
|
|
84
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
85
|
+
maxRows: z.ZodDefault<z.ZodNumber>;
|
|
86
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
parameters: unknown[];
|
|
89
|
+
timeout: number;
|
|
90
|
+
query: string;
|
|
91
|
+
allowedOperations: ("SELECT" | "INSERT" | "UPDATE" | "DELETE" | "WITH" | "EXPLAIN" | "CREATE")[];
|
|
92
|
+
maxRows: number;
|
|
93
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
query: string;
|
|
96
|
+
parameters?: unknown[] | undefined;
|
|
97
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
98
|
+
timeout?: number | undefined;
|
|
99
|
+
allowedOperations?: ("SELECT" | "INSERT" | "UPDATE" | "DELETE" | "WITH" | "EXPLAIN" | "CREATE")[] | undefined;
|
|
100
|
+
maxRows?: number | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
static readonly resultSchema: z.ZodObject<{
|
|
103
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
104
|
+
rowCount: z.ZodNullable<z.ZodNumber>;
|
|
105
|
+
command: z.ZodString;
|
|
106
|
+
executionTime: z.ZodNumber;
|
|
107
|
+
success: z.ZodBoolean;
|
|
108
|
+
error: z.ZodString;
|
|
109
|
+
cleanedJSONString: z.ZodString;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
executionTime: number;
|
|
112
|
+
error: string;
|
|
113
|
+
success: boolean;
|
|
114
|
+
rows: Record<string, unknown>[];
|
|
115
|
+
rowCount: number | null;
|
|
116
|
+
command: string;
|
|
117
|
+
cleanedJSONString: string;
|
|
118
|
+
}, {
|
|
119
|
+
executionTime: number;
|
|
120
|
+
error: string;
|
|
121
|
+
success: boolean;
|
|
122
|
+
rows: Record<string, unknown>[];
|
|
123
|
+
rowCount: number | null;
|
|
124
|
+
command: string;
|
|
125
|
+
cleanedJSONString: string;
|
|
126
|
+
}>;
|
|
127
|
+
static readonly shortDescription = "InsForge is the backend built for AI-assisted development. Connect InsForge with any agent. Add authentication, database, storage, functions, and AI integrations to your app in seconds.";
|
|
128
|
+
static readonly longDescription = "\n Authentication - Complete user management system\n Database - Flexible data storage and retrieval\n Storage - File management and organization\n AI Integration - Chat completions and image generation (OpenAI-compatible)\n Serverless Functions - Scalable compute power\n Site Deployment (coming soon) - Easy application deployment\n ";
|
|
129
|
+
static readonly alias = "insforge";
|
|
130
|
+
constructor(params?: InsForgeDbParamsInput, context?: BubbleContext);
|
|
131
|
+
testCredential(): Promise<boolean>;
|
|
132
|
+
protected chooseCredential(): string | undefined;
|
|
133
|
+
private getCredentials;
|
|
134
|
+
/**
|
|
135
|
+
* Validate that the SQL query operation is allowed
|
|
136
|
+
*/
|
|
137
|
+
private validateSqlOperation;
|
|
138
|
+
protected performAction(context?: BubbleContext): Promise<InsForgeDbResult>;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=insforge-db.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insforge-db.d.ts","sourceRoot":"","sources":["../../../src/bubbles/service-bubble/insforge-db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK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S,CAAC,gBAAgB,IAAI,MAAM,GAAG,SAAS;IAKhD,OAAO,CAAC,cAAc;IAwBtB;;OAEG;IACH,OAAO,CAAC,oBAAoB;cA8CZ,aAAa,CAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,gBAAgB,CAAC;CAsE7B"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ServiceBubble } from '../../types/service-bubble-class.js';
|
|
3
|
+
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
4
|
+
// Define available SQL operations (same as PostgreSQL for consistency)
|
|
5
|
+
export const SqlOperations = z.enum([
|
|
6
|
+
'SELECT',
|
|
7
|
+
'INSERT',
|
|
8
|
+
'UPDATE',
|
|
9
|
+
'DELETE',
|
|
10
|
+
'CREATE',
|
|
11
|
+
'WITH',
|
|
12
|
+
'EXPLAIN',
|
|
13
|
+
]);
|
|
14
|
+
// Define the parameters schema for the InsForge DB bubble
|
|
15
|
+
const InsForgeDbParamsSchema = z.object({
|
|
16
|
+
query: z
|
|
17
|
+
.string()
|
|
18
|
+
.min(1, 'Query is required')
|
|
19
|
+
.describe('SQL query to execute against the InsForge database'),
|
|
20
|
+
allowedOperations: z
|
|
21
|
+
.array(SqlOperations)
|
|
22
|
+
.default(['SELECT', 'WITH'])
|
|
23
|
+
.describe('List of allowed SQL operations for security (defaults to read-only operations)'),
|
|
24
|
+
parameters: z
|
|
25
|
+
.array(z.unknown())
|
|
26
|
+
.optional()
|
|
27
|
+
.default([])
|
|
28
|
+
.describe('Parameters for parameterized queries (e.g., [value1, value2] for $1, $2)'),
|
|
29
|
+
timeout: z
|
|
30
|
+
.number()
|
|
31
|
+
.positive()
|
|
32
|
+
.default(30000)
|
|
33
|
+
.describe('Query timeout in milliseconds (default: 30 seconds)'),
|
|
34
|
+
maxRows: z
|
|
35
|
+
.number()
|
|
36
|
+
.positive()
|
|
37
|
+
.default(1000)
|
|
38
|
+
.describe('Maximum number of rows to return (default: 1000)'),
|
|
39
|
+
credentials: z
|
|
40
|
+
.record(z.nativeEnum(CredentialType), z.string())
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Object mapping credential types to values (injected at runtime)'),
|
|
43
|
+
});
|
|
44
|
+
// Define the result schema
|
|
45
|
+
const InsForgeDbResultSchema = z.object({
|
|
46
|
+
rows: z.array(z.record(z.unknown())).describe('Array of result rows'),
|
|
47
|
+
rowCount: z
|
|
48
|
+
.number()
|
|
49
|
+
.nullable()
|
|
50
|
+
.describe('Number of rows affected by the query'),
|
|
51
|
+
command: z.string().describe('SQL command that was executed'),
|
|
52
|
+
executionTime: z.number().describe('Query execution time in milliseconds'),
|
|
53
|
+
success: z.boolean().describe('Whether the query executed successfully'),
|
|
54
|
+
error: z.string().describe('Error message if query execution failed'),
|
|
55
|
+
cleanedJSONString: z
|
|
56
|
+
.string()
|
|
57
|
+
.describe('Clean JSON string representation of the row data'),
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* InsForge Database Bubble
|
|
61
|
+
*
|
|
62
|
+
* Execute SQL queries against an InsForge backend database.
|
|
63
|
+
* Works similarly to the PostgreSQL bubble but uses InsForge's REST API.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* const result = await new InsForgeDbBubble({
|
|
68
|
+
* query: 'SELECT * FROM users WHERE active = $1',
|
|
69
|
+
* parameters: [true],
|
|
70
|
+
* allowedOperations: ['SELECT'],
|
|
71
|
+
* maxRows: 100,
|
|
72
|
+
* }).action();
|
|
73
|
+
*
|
|
74
|
+
* console.log(result.data.rows);
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export class InsForgeDbBubble extends ServiceBubble {
|
|
78
|
+
static type = 'service';
|
|
79
|
+
static service = 'insforge';
|
|
80
|
+
static authType = 'apikey';
|
|
81
|
+
static bubbleName = 'insforge-db';
|
|
82
|
+
static schema = InsForgeDbParamsSchema;
|
|
83
|
+
static resultSchema = InsForgeDbResultSchema;
|
|
84
|
+
static shortDescription = 'InsForge is the backend built for AI-assisted development. Connect InsForge with any agent. Add authentication, database, storage, functions, and AI integrations to your app in seconds.';
|
|
85
|
+
static longDescription = `
|
|
86
|
+
Authentication - Complete user management system
|
|
87
|
+
Database - Flexible data storage and retrieval
|
|
88
|
+
Storage - File management and organization
|
|
89
|
+
AI Integration - Chat completions and image generation (OpenAI-compatible)
|
|
90
|
+
Serverless Functions - Scalable compute power
|
|
91
|
+
Site Deployment (coming soon) - Easy application deployment
|
|
92
|
+
`;
|
|
93
|
+
static alias = 'insforge';
|
|
94
|
+
constructor(params = {
|
|
95
|
+
query: 'SELECT 1',
|
|
96
|
+
allowedOperations: ['SELECT'],
|
|
97
|
+
parameters: [],
|
|
98
|
+
timeout: 30000,
|
|
99
|
+
maxRows: 1000,
|
|
100
|
+
}, context) {
|
|
101
|
+
super(params, context);
|
|
102
|
+
// Validate SQL operation
|
|
103
|
+
this.validateSqlOperation(this.params.query, this.params.allowedOperations);
|
|
104
|
+
}
|
|
105
|
+
async testCredential() {
|
|
106
|
+
const { credentials } = this.params;
|
|
107
|
+
if (!credentials || typeof credentials !== 'object') {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
const baseUrl = credentials[CredentialType.INSFORGE_BASE_URL]?.replace(/\/$/, '');
|
|
111
|
+
const apiKey = credentials[CredentialType.INSFORGE_API_KEY];
|
|
112
|
+
// If only base URL provided, check if server is reachable
|
|
113
|
+
if (baseUrl && !apiKey) {
|
|
114
|
+
try {
|
|
115
|
+
const response = await fetch(`${baseUrl}/api/health`, {
|
|
116
|
+
method: 'GET',
|
|
117
|
+
});
|
|
118
|
+
return response.ok;
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// If only API key provided, can't validate without URL - return true
|
|
125
|
+
if (apiKey && !baseUrl) {
|
|
126
|
+
// Can't validate API key without base URL, assume valid
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
// If both provided, do full validation
|
|
130
|
+
if (baseUrl && apiKey) {
|
|
131
|
+
try {
|
|
132
|
+
const response = await fetch(`${baseUrl}/api/database/advance/rawsql/unrestricted`, {
|
|
133
|
+
method: 'POST',
|
|
134
|
+
headers: {
|
|
135
|
+
'Content-Type': 'application/json',
|
|
136
|
+
Authorization: `Bearer ${apiKey}`,
|
|
137
|
+
},
|
|
138
|
+
body: JSON.stringify({
|
|
139
|
+
query: 'SELECT 1 as test',
|
|
140
|
+
params: [],
|
|
141
|
+
}),
|
|
142
|
+
});
|
|
143
|
+
return response.ok;
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
chooseCredential() {
|
|
152
|
+
// InsForge uses multiple credentials, handled in getCredentials()
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
getCredentials() {
|
|
156
|
+
const { credentials } = this.params;
|
|
157
|
+
if (!credentials || typeof credentials !== 'object') {
|
|
158
|
+
throw new Error('No InsForge credentials provided');
|
|
159
|
+
}
|
|
160
|
+
const baseUrl = credentials[CredentialType.INSFORGE_BASE_URL];
|
|
161
|
+
const apiKey = credentials[CredentialType.INSFORGE_API_KEY];
|
|
162
|
+
if (!baseUrl) {
|
|
163
|
+
throw new Error('InsForge base URL not provided');
|
|
164
|
+
}
|
|
165
|
+
if (!apiKey) {
|
|
166
|
+
throw new Error('InsForge API key not provided');
|
|
167
|
+
}
|
|
168
|
+
// Remove trailing slash from base URL
|
|
169
|
+
return {
|
|
170
|
+
baseUrl: baseUrl.replace(/\/$/, ''),
|
|
171
|
+
apiKey,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Validate that the SQL query operation is allowed
|
|
176
|
+
*/
|
|
177
|
+
validateSqlOperation(query, allowedOperations) {
|
|
178
|
+
const trimmedQuery = query.trim().toUpperCase();
|
|
179
|
+
const firstKeyword = trimmedQuery.split(/\s+/)[0];
|
|
180
|
+
const isAllowed = allowedOperations.some((op) => firstKeyword.startsWith(op));
|
|
181
|
+
if (!isAllowed) {
|
|
182
|
+
throw new Error(`SQL operation '${firstKeyword}' is not allowed. Allowed operations: ${allowedOperations.join(', ')}`);
|
|
183
|
+
}
|
|
184
|
+
// Safety checks for dangerous operations
|
|
185
|
+
if (firstKeyword === 'DELETE' && !trimmedQuery.includes('WHERE')) {
|
|
186
|
+
throw new Error('DELETE queries must include a WHERE clause for safety');
|
|
187
|
+
}
|
|
188
|
+
if (firstKeyword === 'UPDATE' && !trimmedQuery.includes('WHERE')) {
|
|
189
|
+
throw new Error('UPDATE queries must include a WHERE clause for safety');
|
|
190
|
+
}
|
|
191
|
+
// Block dangerous keywords
|
|
192
|
+
const dangerousKeywords = [
|
|
193
|
+
'\\bDROP\\b',
|
|
194
|
+
'\\bALTER\\b',
|
|
195
|
+
'\\bTRUNCATE\\b',
|
|
196
|
+
'\\bGRANT\\b',
|
|
197
|
+
'\\bREVOKE\\b',
|
|
198
|
+
];
|
|
199
|
+
const containsDangerous = dangerousKeywords.some((keyword) => new RegExp(keyword, 'i').test(trimmedQuery));
|
|
200
|
+
if (containsDangerous) {
|
|
201
|
+
throw new Error(`Query contains potentially dangerous operations. Only allowed: ${allowedOperations.join(', ')}`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
async performAction(context) {
|
|
205
|
+
void context;
|
|
206
|
+
const { query, parameters, maxRows } = this.params;
|
|
207
|
+
const { baseUrl, apiKey } = this.getCredentials();
|
|
208
|
+
const startTime = Date.now();
|
|
209
|
+
try {
|
|
210
|
+
// Call InsForge raw SQL endpoint
|
|
211
|
+
const response = await fetch(`${baseUrl}/api/database/advance/rawsql/unrestricted`, {
|
|
212
|
+
method: 'POST',
|
|
213
|
+
headers: {
|
|
214
|
+
'Content-Type': 'application/json',
|
|
215
|
+
Authorization: `Bearer ${apiKey}`,
|
|
216
|
+
},
|
|
217
|
+
body: JSON.stringify({
|
|
218
|
+
query,
|
|
219
|
+
params: parameters,
|
|
220
|
+
}),
|
|
221
|
+
});
|
|
222
|
+
if (!response.ok) {
|
|
223
|
+
const errorBody = await response.text();
|
|
224
|
+
throw new Error(`InsForge query failed: ${response.status} - ${errorBody}`);
|
|
225
|
+
}
|
|
226
|
+
const data = (await response.json());
|
|
227
|
+
const executionTime = Date.now() - startTime;
|
|
228
|
+
// Handle response - InsForge returns array of rows or object with rows property
|
|
229
|
+
const rows = Array.isArray(data)
|
|
230
|
+
? data
|
|
231
|
+
: data.rows || [];
|
|
232
|
+
const truncatedRows = rows.slice(0, maxRows);
|
|
233
|
+
// Extract command from query
|
|
234
|
+
const command = query.trim().split(/\s+/)[0].toUpperCase();
|
|
235
|
+
return {
|
|
236
|
+
rows: truncatedRows,
|
|
237
|
+
rowCount: rows.length,
|
|
238
|
+
command,
|
|
239
|
+
executionTime,
|
|
240
|
+
success: true,
|
|
241
|
+
error: '',
|
|
242
|
+
cleanedJSONString: JSON.stringify(truncatedRows, null, 2),
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
const executionTime = Date.now() - startTime;
|
|
247
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
248
|
+
return {
|
|
249
|
+
rows: [],
|
|
250
|
+
rowCount: null,
|
|
251
|
+
command: query.trim().split(/\s+/)[0].toUpperCase(),
|
|
252
|
+
executionTime,
|
|
253
|
+
success: false,
|
|
254
|
+
error: errorMessage,
|
|
255
|
+
cleanedJSONString: '[]',
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=insforge-db.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insforge-db.js","sourceRoot":"","sources":["../../../src/bubbles/service-bubble/insforge-db.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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E,aAAa;gBACnB,QAAQ,EAAE,IAAI,CAAC,MAAM;gBACrB,OAAO;gBACP,aAAa;gBACb,OAAO,EAAE,IAAI;gBACb,KAAK,EAAE,EAAE;gBACT,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;aAC1D,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YAC7C,MAAM,YAAY,GAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;YAEpE,OAAO;gBACL,IAAI,EAAE,EAAE;gBACR,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;gBACnD,aAAa;gBACb,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,YAAY;gBACnB,iBAAiB,EAAE,IAAI;aACxB,CAAC;QACJ,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/notion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/notion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,cAAc,uBAAuB,CAAC"}
|